Starting persistent apps on init
This commit is contained in:
parent
d941445ad9
commit
78fed2ce31
8
main.py
8
main.py
@ -250,6 +250,14 @@ class AppRunner(threading.Thread):
|
|||||||
self.serial = SerialWriter(self.datasource)
|
self.serial = SerialWriter(self.datasource)
|
||||||
self.serial.start()
|
self.serial.start()
|
||||||
self.persistent_apps = {}
|
self.persistent_apps = {}
|
||||||
|
#start persistent apps
|
||||||
|
for app, i in zip(config.Apps, range(len(config.Apps))):
|
||||||
|
if app["persistent"]:
|
||||||
|
newapp = App(app["cmd"], "", self.cv, is_persistent=True)
|
||||||
|
newapp.datasource.addListener(self.cv)
|
||||||
|
newapp.start()
|
||||||
|
self.persistent_apps[i] = newapp
|
||||||
|
|
||||||
if config.UseGui:
|
if config.UseGui:
|
||||||
self.gui = Gui(self.datasource)
|
self.gui = Gui(self.datasource)
|
||||||
self.gui.start()
|
self.gui.start()
|
||||||
|
Loading…
Reference in New Issue
Block a user