-
Notifications
You must be signed in to change notification settings - Fork 0
/
gyroman.py
43 lines (36 loc) · 996 Bytes
/
gyroman.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
#!/usr/bin/python
from gyromon import GyroMon
from usermon import UserMon
from serialsend import SerialSend
from webserver import WebServer
import cherrypy
import os
import os.path
def main():
print(open("banner").read())
print("")
gyro = GyroMon()
user = UserMon()
serial_send = SerialSend(user, gyro)
gyro.start()
#user.start()
serial_send.start()
raw_input("Press any key to start sending real data\n")
serial_send.start_real()
dirname = os.getcwd()
cherrypy.log.screen = None
cherrypy.quickstart(WebServer(user, gyro, serial_send), '/', {
'global':
{
'server.socket_host': '0.0.0.0',
'server.socket_port': 8080
},
'/remote.html':
{
'tools.staticfile.on': True,
'tools.staticfile.filename':
os.path.join(dirname, 'remote/remote.html')
}
})
if __name__ == '__main__':
main()