prepare for use etc as config

This commit is contained in:
chrys
2016-09-14 23:27:19 +02:00
parent cb1feb35ae
commit 7dad7e413c
3 changed files with 18 additions and 19 deletions

View File

@@ -4,18 +4,18 @@ from utils import debug
class screenManager():
def __init__(self):
pass
def initialize(self, environment):
self.autoIgnoreScreens = []
def initialize(self, environment):
if environment['runtime']['settingsManager'].getSettingAsBool(environment,'screen', 'autodetectSuspendingScreen'):
self.autoIgnoreScreens = environment['runtime']['screenDriver'].getIgnoreScreens()
return environment
def shutdown(self, environment):
return environment
def update(self, environment):
environment['generalInformation']['suspend'] = self.isSuspendingScreen(environment)
if not environment['generalInformation']['suspend']:
if not self.isSuspendingScreen(environment):
environment = environment['runtime']['screenDriver'].update(environment)
environment['screenData']['lastScreenUpdate'] = time.time()
return environment