-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
53 lines (38 loc) · 1.04 KB
/
main.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
#!/usr/bin/env python
from src.GUI import GUI
import sys, threading, time, _thread, os
# Hello Testing
def initClasses():
if sys.platform == "linux2":
# SpeedHandler
from src.SpeedHandler import SpeedHandler
speedHandler = SpeedHandler(environment)
speedHandler.start()
# ButtonHandler
from src.ButtonHandler import ButtonHandler
buttonHandler = ButtonHandler(environment)
buttonHandler.start()
# GPSHandler
from src.GPSHandler import GPSHandler
gpsHandler = GPSHandler(environment)
gpsHandler.start()
# Initiate LiveData
from src.LiveData import LiveData
liveData = LiveData(environment)
liveData.start()
# ECUHandler
from src.ECUHandler import ECUHandler
ecuHandler = ECUHandler(environment)
ecuHandler.start()
try:
# Environment
from src.Environment import Environment
environment = Environment()
environment.start()
gui = GUI(environment)
_thread.start_new_thread(initClasses, ())
#Start gui and enter its mainloop
gui.start()
except (KeyboardInterrupt, SystemExit):
print("Exiting...")
sys.exit()