diff --git a/config/settings/espeak.settings.conf b/config/settings/espeak.settings.conf index 3c7800e3..eab064b5 100644 --- a/config/settings/espeak.settings.conf +++ b/config/settings/espeak.settings.conf @@ -86,7 +86,7 @@ fenrirMaxRate=450 [braille] enabled=False -driver=brlapiDriver +driver=dummyDriver layout=en # to what should the flush timeout relate to # word = flush after (number of words to display) * seconds diff --git a/config/settings/settings.conf b/config/settings/settings.conf index f8d78ce7..68f7e7ab 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -88,7 +88,7 @@ fenrirMaxRate=450 [braille] enabled=False -driver=brlapiDriver +driver=dummyDriver layout=en # to what should the flush timeout relate to # word = flush after (number of words to display) * seconds diff --git a/config/settings/settings.conf.storm b/config/settings/settings.conf.storm index db5ce8f6..09af4df0 100644 --- a/config/settings/settings.conf.storm +++ b/config/settings/settings.conf.storm @@ -45,7 +45,7 @@ fenrirMaxRate=890 [braille] enabled=False -driver=brlapiDriver +driver=dummyDriver layout=en # to what should the flush timeout relate to # word = flush after (number of words to display) * seconds diff --git a/src/fenrir/brailleDriver/dummyDriver.py b/src/fenrir/brailleDriver/dummyDriver.py index 08902ce6..91a7c2ba 100644 --- a/src/fenrir/brailleDriver/dummyDriver.py +++ b/src/fenrir/brailleDriver/dummyDriver.py @@ -8,41 +8,48 @@ from core import debug class driver(): def __init__(self): - pass + self.printMessages = False def initialize(self, environment): self.env = environment self._isInitialized = True self.deviceSize = (40,0) - print('BrailleDummyDriver: Initialize') + if self.printMessages: + print('BrailleDummyDriver: Initialize') def getDeviceSize(self): if not self._isInitialized: return (0,0) - print('BrailleDummyDriver: getDeviceSize ' + str(self.deviceSize)) + if self.printMessages: + print('BrailleDummyDriver: getDeviceSize ' + str(self.deviceSize)) return self.deviceSize def writeText(self,text): if not self._isInitialized: return - print('BrailleDummyDriver: writeText:' + str(text)) - print('BrailleDummyDriver: -----------------------------------') + if self.printMessages: + print('BrailleDummyDriver: writeText:' + str(text)) + print('BrailleDummyDriver: -----------------------------------') def connectDevice(self): - print('BrailleDummyDriver: connectDevice') + if self.printMessages: + print('BrailleDummyDriver: connectDevice') def enterScreen(self, screen): if not self._isInitialized: return - print('BrailleDummyDriver: enterScreen') + if self.printMessages: + print('BrailleDummyDriver: enterScreen') def leveScreen(self): if not self._isInitialized: return - print('BrailleDummyDriver: leveScreen') + if self.printMessages: + print('BrailleDummyDriver: leveScreen') def shutdown(self): if not self._isInitialized: return - print('BrailleDummyDriver: Shutdown') + if self.printMessages: + print('BrailleDummyDriver: Shutdown') diff --git a/src/fenrir/commands/onScreenUpdate/70000-incoming.py b/src/fenrir/commands/onScreenUpdate/70000-incoming.py index d632a1cc..863f6eae 100644 --- a/src/fenrir/commands/onScreenUpdate/70000-incoming.py +++ b/src/fenrir/commands/onScreenUpdate/70000-incoming.py @@ -21,19 +21,15 @@ class command(): return # is there something to read? if not self.env['runtime']['screenManager'].isDelta(): - return + return + # this must be a keyecho or something if len(self.env['screen']['newDelta']) <=2: - return - # its a cursor movement (experimental) - maybe also check current shortcut string? - - #if not '$' in self.env['screen']['newDelta'] and - # not '#' in self.env['screen']['newDelta']: - if abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) == 1: - # if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2: - return - if abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y']) == 1: - # if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2: - return + if abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) == 1: + # if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2: + return + if abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y']) == 1: + # if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2: + return self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False) def setCallback(self, callback): diff --git a/src/fenrir/core/fenrirManager.py b/src/fenrir/core/fenrirManager.py index 8d99ff50..a52355f1 100644 --- a/src/fenrir/core/fenrirManager.py +++ b/src/fenrir/core/fenrirManager.py @@ -101,7 +101,6 @@ class fenrirManager(): def handleScreenUpdate(self, event): #startTime = time.time() - self.environment['runtime']['screenManager'].update('onUpdate') ''' if self.environment['runtime']['applicationManager'].isApplicationChange():