forked from log0/video_streaming_with_flask_example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaintest.py
executable file
·68 lines (45 loc) · 1.06 KB
/
maintest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env python
from flask import Flask, render_template, Response, send_from_directory, make_response, request, current_app
app = Flask(__name__, static_url_path='')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/startup')
def startup():
# TODO call 0
return "startup"
@app.route('/stop')
def stop():
# TODO call 1
return "stop"
@app.route('/tinyleft')
def tinyleft():
# TODO call 8
return "tinyleft"
@app.route('/tinyright')
def tinyright():
# TODO call 9
return "tinyright"
@app.route('/left')
def left():
# TODO call 3
return "left"
@app.route('/right')
def right():
# TODO call 4
return "right"
@app.route('/speedup')
def speedup():
# TODO call 5
return "speedup"
@app.route('/speeddown')
def speeddown():
# TODO call 6
return "speeddown"
@app.route('/backward')
def backward():
# TODO call 7
return "backward"
if __name__ == '__main__':
app.run(host='127.0.0.1', port=5001, debug=True)
# app.run(host='0.0.0.0', port=5001, debug=True)