Starting persistent apps on init

This commit is contained in:
Andreas Völker 2018-12-30 15:55:59 +01:00
parent d941445ad9
commit 78fed2ce31

View File

@ -250,6 +250,14 @@ class AppRunner(threading.Thread):
self.serial = SerialWriter(self.datasource)
self.serial.start()
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:
self.gui = Gui(self.datasource)
self.gui.start()