-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
38 lines (36 loc) · 1.31 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
import subprocess
from threads.statusThread import StatusThread
from settings import Settings
from radioControl import RadioControl
from threads.piFaceThread import PiFaceThread
from threads.standbyThread import StandByThread
from threads.rcThread import RCThread
if __name__ == "__main__":
print('Internet radio starting...')
subprocess.Popen(['mocp', '--clear'])
subprocess.Popen(['mocp', '--stop'])
radioControl = RadioControl()
statusThread = StatusThread()
piFaceThread = PiFaceThread()
standbyThread = StandByThread()
rcThread = RCThread()
rcThread.radioControl = radioControl
rcThread.standByThread = standbyThread
rcThread.piFaceThread = piFaceThread
standbyThread.piFaceThread = piFaceThread
standbyThread.statusThread = statusThread
settings = Settings()
piFaceThread.standbyThread = standbyThread
piFaceThread.radioControl = radioControl
piFaceThread.settings = settings
statusThread.piFaceThread = piFaceThread
radioControl.statusThread = statusThread
radioControl.piFaceThread = piFaceThread
statusThread.radioControl = radioControl
piFaceThread.start()
piFaceThread.processSettings()
statusThread.start()
standbyThread.start()
rcThread.start()
piFaceThread.enableBacklight()
print('Internet radio started...')