add more debug
This commit is contained in:
parent
c633197b43
commit
02b1668815
@ -44,7 +44,7 @@ class eventManager():
|
|||||||
self.eventDispatcher(event)
|
self.eventDispatcher(event)
|
||||||
#print('NET loop ' + str(time.time() - st))
|
#print('NET loop ' + str(time.time() - st))
|
||||||
def eventDispatcher(self, event):
|
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:
|
if not event:
|
||||||
return
|
return
|
||||||
if event['Type'] == fenrirEventType.Ignore:
|
if event['Type'] == fenrirEventType.Ignore:
|
||||||
@ -53,11 +53,9 @@ class eventManager():
|
|||||||
self.handleStopMainLoop()
|
self.handleStopMainLoop()
|
||||||
return
|
return
|
||||||
elif event['Type'] == fenrirEventType.ScreenUpdate:
|
elif event['Type'] == fenrirEventType.ScreenUpdate:
|
||||||
pass
|
|
||||||
self.env['runtime']['fenrirManager'].handleScreenUpdate()
|
self.env['runtime']['fenrirManager'].handleScreenUpdate()
|
||||||
elif event['Type'] == fenrirEventType.KeyboardInput:
|
elif event['Type'] == fenrirEventType.KeyboardInput:
|
||||||
self.env['runtime']['fenrirManager'].handleInput()
|
self.env['runtime']['fenrirManager'].handleInput()
|
||||||
#self.env['runtime']['fenrirManager'].handleScreenUpdate()
|
|
||||||
elif event['Type'] == fenrirEventType.BrailleInput:
|
elif event['Type'] == fenrirEventType.BrailleInput:
|
||||||
pass
|
pass
|
||||||
elif event['Type'] == fenrirEventType.PlugInputDevice:
|
elif event['Type'] == fenrirEventType.PlugInputDevice:
|
||||||
@ -68,7 +66,6 @@ class eventManager():
|
|||||||
self.env['runtime']['fenrirManager'].handleScreenChange()
|
self.env['runtime']['fenrirManager'].handleScreenChange()
|
||||||
elif event['Type'] == fenrirEventType.HeartBeat:
|
elif event['Type'] == fenrirEventType.HeartBeat:
|
||||||
self.env['runtime']['fenrirManager'].handleHeartBeat()
|
self.env['runtime']['fenrirManager'].handleHeartBeat()
|
||||||
#print('HeartBeat at {0} {1}'.format(event['Type'], event['Data'] ))
|
|
||||||
def isMainEventLoopRunning(self):
|
def isMainEventLoopRunning(self):
|
||||||
return self._mainLoopRunning.value == 1
|
return self._mainLoopRunning.value == 1
|
||||||
def startMainEventLoop(self):
|
def startMainEventLoop(self):
|
||||||
@ -76,7 +73,7 @@ class eventManager():
|
|||||||
while( self.isMainEventLoopRunning()):
|
while( self.isMainEventLoopRunning()):
|
||||||
st = time.time()
|
st = time.time()
|
||||||
self.proceedEventLoop()
|
self.proceedEventLoop()
|
||||||
print('ALL loop ' + str(time.time() - st))
|
|
||||||
def handleStopMainLoop(self):
|
def handleStopMainLoop(self):
|
||||||
self._mainLoopRunning.value = 0
|
self._mainLoopRunning.value = 0
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
@ -141,8 +138,7 @@ class eventManager():
|
|||||||
else:
|
else:
|
||||||
Data = function()
|
Data = function()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
self.env['runtime']['debug'].writeDebugOut('eventManager:simpleEventWorkerThread:function():' + st(e),debug.debugLevel.ERROR)
|
||||||
print(e)
|
|
||||||
self.putToEventQueue(event, Data)
|
self.putToEventQueue(event, Data)
|
||||||
if runOnce:
|
if runOnce:
|
||||||
break
|
break
|
||||||
|
@ -22,8 +22,10 @@ class screenManager():
|
|||||||
|
|
||||||
def update(self, trigger='onUpdate'):
|
def update(self, trigger='onUpdate'):
|
||||||
self.env['runtime']['screenDriver'].getCurrScreen()
|
self.env['runtime']['screenDriver'].getCurrScreen()
|
||||||
|
|
||||||
if trigger == 'onScreenChange':
|
if trigger == 'onScreenChange':
|
||||||
self.env['runtime']['screenDriver'].getSessionInformation()
|
self.env['runtime']['screenDriver'].getSessionInformation()
|
||||||
|
|
||||||
self.env['screen']['oldApplication'] = self.env['screen']['newApplication']
|
self.env['screen']['oldApplication'] = self.env['screen']['newApplication']
|
||||||
if self.isScreenChange():
|
if self.isScreenChange():
|
||||||
self.changeBrailleScreen()
|
self.changeBrailleScreen()
|
||||||
|
@ -135,6 +135,7 @@ class driver():
|
|||||||
def update(self, trigger='onUpdate'):
|
def update(self, trigger='onUpdate'):
|
||||||
if trigger == 'onInput': # no need for an update on input for VCSA
|
if trigger == 'onInput': # no need for an update on input for VCSA
|
||||||
return
|
return
|
||||||
|
#print(self.env['screen']['newTTY'], self.env['screen']['oldTTY'])
|
||||||
newContentBytes = b''
|
newContentBytes = b''
|
||||||
try:
|
try:
|
||||||
# read screen
|
# read screen
|
||||||
|
Loading…
Reference in New Issue
Block a user