add more debug

This commit is contained in:
chrys 2017-06-30 23:59:05 +02:00
parent c633197b43
commit 02b1668815
3 changed files with 7 additions and 8 deletions

View File

@ -44,7 +44,7 @@ class eventManager():
self.eventDispatcher(event)
#print('NET loop ' + str(time.time() - st))
def eventDispatcher(self, event):
print(event['Type'], self._eventQueue.qsize())
self.env['runtime']['debug'].writeDebugOut('eventManager:eventDispatcher:start: event:' + str(event['Type']) + ' QueueSize:' + str( self._eventQueue.qsize()),debug.debugLevel.INFO)
if not event:
return
if event['Type'] == fenrirEventType.Ignore:
@ -53,11 +53,9 @@ class eventManager():
self.handleStopMainLoop()
return
elif event['Type'] == fenrirEventType.ScreenUpdate:
pass
self.env['runtime']['fenrirManager'].handleScreenUpdate()
elif event['Type'] == fenrirEventType.KeyboardInput:
self.env['runtime']['fenrirManager'].handleInput()
#self.env['runtime']['fenrirManager'].handleScreenUpdate()
elif event['Type'] == fenrirEventType.BrailleInput:
pass
elif event['Type'] == fenrirEventType.PlugInputDevice:
@ -68,7 +66,6 @@ class eventManager():
self.env['runtime']['fenrirManager'].handleScreenChange()
elif event['Type'] == fenrirEventType.HeartBeat:
self.env['runtime']['fenrirManager'].handleHeartBeat()
#print('HeartBeat at {0} {1}'.format(event['Type'], event['Data'] ))
def isMainEventLoopRunning(self):
return self._mainLoopRunning.value == 1
def startMainEventLoop(self):
@ -76,7 +73,7 @@ class eventManager():
while( self.isMainEventLoopRunning()):
st = time.time()
self.proceedEventLoop()
print('ALL loop ' + str(time.time() - st))
def handleStopMainLoop(self):
self._mainLoopRunning.value = 0
time.sleep(0.1)
@ -141,8 +138,7 @@ class eventManager():
else:
Data = function()
except Exception as e:
pass
print(e)
self.env['runtime']['debug'].writeDebugOut('eventManager:simpleEventWorkerThread:function():' + st(e),debug.debugLevel.ERROR)
self.putToEventQueue(event, Data)
if runOnce:
break

View File

@ -21,9 +21,11 @@ class screenManager():
self.env['runtime']['settingsManager'].shutdownDriver('screenDriver')
def update(self, trigger='onUpdate'):
self.env['runtime']['screenDriver'].getCurrScreen()
self.env['runtime']['screenDriver'].getCurrScreen()
if trigger == 'onScreenChange':
self.env['runtime']['screenDriver'].getSessionInformation()
self.env['screen']['oldApplication'] = self.env['screen']['newApplication']
if self.isScreenChange():
self.changeBrailleScreen()

View File

@ -135,6 +135,7 @@ class driver():
def update(self, trigger='onUpdate'):
if trigger == 'onInput': # no need for an update on input for VCSA
return
#print(self.env['screen']['newTTY'], self.env['screen']['oldTTY'])
newContentBytes = b''
try:
# read screen