diff --git a/src/fenrir-package/core/inputManager.py b/src/fenrir-package/core/inputManager.py index 7a47c893..b66c1ebd 100644 --- a/src/fenrir-package/core/inputManager.py +++ b/src/fenrir-package/core/inputManager.py @@ -27,7 +27,6 @@ class inputManager(): if self.isFenrirKey(environment, event): environment['input']['consumeKey'] = not environment['input']['keyForeward'] and not environment['generalInformation']['suspend'] if self.isConsumeKeypress(environment): - environment['runtime']['debug'].writeDebugOut(environment, str(event)+' consume'+str(time.time()),debug.debugLevel.ERROR) self.writeUInput(self.uDevices[fd], event,environment) keyString = '' if self.isFenrirKey(environment, event): @@ -43,6 +42,7 @@ class inputManager(): except: pass except Exception as e: + environment['runtime']['debug'].writeDebugOut(environment,"Error while inputHandling",debug.debugLevel.ERROR) environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR) self.freeDevices() time.sleep(0.01) @@ -64,11 +64,11 @@ class inputManager(): def writeUInput(self, uDevice, event,environment): try: - environment['runtime']['debug'].writeDebugOut(environment, str(event)+' write event '+str(time.time()),debug.debugLevel.ERROR) uDevice.write_event(event) uDevice.syn() - except Exception as a: - environment['runtime']['debug'].writeDebugOut(environment, str(e)+' error exception '+str(time.time()),debug.debugLevel.ERROR) + except Exception as e: + environment['runtime']['debug'].writeDebugOut(environment,"Error while writeUInput",debug.debugLevel.ERROR) + environment['runtime']['debug'].writeDebugOut(environment, str(e),debug.debugLevel.ERROR) def getShortcutString(self, environment): if environment['input']['currShortcut'] == {}: diff --git a/src/fenrir-package/core/outputManager.py b/src/fenrir-package/core/outputManager.py index 46051e65..99147b56 100644 --- a/src/fenrir-package/core/outputManager.py +++ b/src/fenrir-package/core/outputManager.py @@ -7,7 +7,7 @@ class outputManager(): def presentText(self, environment, text, interrupt=True, soundIcon = ''): environment['runtime']['debug'].writeDebugOut(environment,"presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO) if self.playSoundIcon(environment, soundIcon, interrupt): - environment['runtime']['debug'].writeDebugOut(environment,"presentText:\n" + text ,debug.debugLevel.INFO) + environment['runtime']['debug'].writeDebugOut(environment,"soundIcon found" ,debug.debugLevel.INFO) return self.speakText(environment, text, interrupt) self.brailleText(environment, text, interrupt) diff --git a/src/fenrir-package/fenrir.py b/src/fenrir-package/fenrir.py index c0d56954..1e68083d 100755 --- a/src/fenrir-package/fenrir.py +++ b/src/fenrir-package/fenrir.py @@ -25,8 +25,7 @@ class fenrir(): try: self.handleProcess() except Exception as e: - self.environment['runtime']['debug'].writeDebugOut(self.environment,str(e)+'error in happy loop at'+str(time.time()),debug.debugLevel.ERROR) - self.environment['runtime']['debug'].writeDebugOut(self.environment,'happy loop at'+str(time.time()),debug.debugLevel.ERROR) + self.environment['runtime']['debug'].writeDebugOut(self.environment,str(e),debug.debugLevel.ERROR) self.shutdown() @@ -35,7 +34,7 @@ class fenrir(): try: self.environment = self.environment['runtime']['screenDriver'].analyzeScreen(self.environment) except Exception as e: - self.environment['runtime']['debug'].writeDebugOut(self.environment, str(e)+' error happy loop at'+str(time.time()),debug.debugLevel.ERROR) + self.environment['runtime']['debug'].writeDebugOut(self.environment, str(e),debug.debugLevel.ERROR) if not self.environment['input']['keyForeward']: self.environment = self.environment['runtime']['commandManager'].getCommandForShortcut(self.environment) if not timeout: diff --git a/src/fenrir-package/screen/linux.py b/src/fenrir-package/screen/linux.py index c1f5ab6a..b1d0ea60 100644 --- a/src/fenrir-package/screen/linux.py +++ b/src/fenrir-package/screen/linux.py @@ -14,7 +14,6 @@ class screen(): return '\n'.join(string[i:i+every] for i in range(0, len(string), every)) def analyzeScreen(self, environment, trigger='updateScreen'): - environment['runtime']['debug'].writeDebugOut(environment,"start-------------"+ str(time.time()),0) newTTY = '' newContentBytes = b'' try: @@ -68,9 +67,6 @@ class screen(): environment['screenData']['newDelta'] = '' environment['screenData']['oldNegativeDelta'] = '' environment['screenData']['newNegativeDelta'] = '' - environment['runtime']['debug'].writeDebugOut(environment,'____CONT START_____',debug.debugLevel.ERROR) - environment['runtime']['debug'].writeDebugOut(environment,environment['screenData']['newContentText']+ str(time.time()),debug.debugLevel.ERROR) - environment['runtime']['debug'].writeDebugOut(environment,'____CONT END____',debug.debugLevel.ERROR) # changes on the screen if (environment['screenData']['oldContentText'] != environment['screenData']['newContentText']) and \ @@ -79,7 +75,6 @@ class screen(): environment['screenData']['newContentText'] != '': environment['screenData']['newDelta'] = environment['screenData']['newContentText'] else: - environment['runtime']['debug'].writeDebugOut(environment,"diff start-------------"+ str(time.time()),debug.debugLevel.ERROR) diffStart = 0 if environment['screenData']['oldCursor']['x'] != environment['screenData']['newCursor']['x'] and \ environment['screenData']['oldCursor']['y'] == environment['screenData']['newCursor']['y'] and \ @@ -92,7 +87,6 @@ class screen(): environment['screenData']['newContentText'][diffStart:].split('\n')) diffList = list(diff) - environment['runtime']['debug'].writeDebugOut(environment,"diff end-------------"+ str(time.time()),debug.debugLevel.ERROR) environment['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x.startswith('+ ')) environment['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x.startswith('- '))