Merge branch 'master' into processing
This commit is contained in:
commit
dbce6013bb
@ -86,7 +86,7 @@ fenrirMaxRate=450
|
|||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
enabled=False
|
enabled=False
|
||||||
driver=brlapiDriver
|
driver=dummyDriver
|
||||||
layout=en
|
layout=en
|
||||||
# to what should the flush timeout relate to
|
# to what should the flush timeout relate to
|
||||||
# word = flush after (number of words to display) * seconds
|
# word = flush after (number of words to display) * seconds
|
||||||
|
@ -88,7 +88,7 @@ fenrirMaxRate=450
|
|||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
enabled=False
|
enabled=False
|
||||||
driver=brlapiDriver
|
driver=dummyDriver
|
||||||
layout=en
|
layout=en
|
||||||
# to what should the flush timeout relate to
|
# to what should the flush timeout relate to
|
||||||
# word = flush after (number of words to display) * seconds
|
# word = flush after (number of words to display) * seconds
|
||||||
|
@ -45,7 +45,7 @@ fenrirMaxRate=890
|
|||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
enabled=False
|
enabled=False
|
||||||
driver=brlapiDriver
|
driver=dummyDriver
|
||||||
layout=en
|
layout=en
|
||||||
# to what should the flush timeout relate to
|
# to what should the flush timeout relate to
|
||||||
# word = flush after (number of words to display) * seconds
|
# word = flush after (number of words to display) * seconds
|
||||||
|
@ -8,41 +8,48 @@ from core import debug
|
|||||||
|
|
||||||
class driver():
|
class driver():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
self.printMessages = False
|
||||||
|
|
||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
self.env = environment
|
self.env = environment
|
||||||
self._isInitialized = True
|
self._isInitialized = True
|
||||||
self.deviceSize = (40,0)
|
self.deviceSize = (40,0)
|
||||||
print('BrailleDummyDriver: Initialize')
|
if self.printMessages:
|
||||||
|
print('BrailleDummyDriver: Initialize')
|
||||||
|
|
||||||
|
|
||||||
def getDeviceSize(self):
|
def getDeviceSize(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return (0,0)
|
return (0,0)
|
||||||
print('BrailleDummyDriver: getDeviceSize ' + str(self.deviceSize))
|
if self.printMessages:
|
||||||
|
print('BrailleDummyDriver: getDeviceSize ' + str(self.deviceSize))
|
||||||
return self.deviceSize
|
return self.deviceSize
|
||||||
|
|
||||||
def writeText(self,text):
|
def writeText(self,text):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
print('BrailleDummyDriver: writeText:' + str(text))
|
if self.printMessages:
|
||||||
print('BrailleDummyDriver: -----------------------------------')
|
print('BrailleDummyDriver: writeText:' + str(text))
|
||||||
|
print('BrailleDummyDriver: -----------------------------------')
|
||||||
|
|
||||||
def connectDevice(self):
|
def connectDevice(self):
|
||||||
print('BrailleDummyDriver: connectDevice')
|
if self.printMessages:
|
||||||
|
print('BrailleDummyDriver: connectDevice')
|
||||||
|
|
||||||
def enterScreen(self, screen):
|
def enterScreen(self, screen):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
print('BrailleDummyDriver: enterScreen')
|
if self.printMessages:
|
||||||
|
print('BrailleDummyDriver: enterScreen')
|
||||||
|
|
||||||
def leveScreen(self):
|
def leveScreen(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
print('BrailleDummyDriver: leveScreen')
|
if self.printMessages:
|
||||||
|
print('BrailleDummyDriver: leveScreen')
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
print('BrailleDummyDriver: Shutdown')
|
if self.printMessages:
|
||||||
|
print('BrailleDummyDriver: Shutdown')
|
||||||
|
@ -22,18 +22,14 @@ class command():
|
|||||||
# is there something to read?
|
# is there something to read?
|
||||||
if not self.env['runtime']['screenManager'].isDelta():
|
if not self.env['runtime']['screenManager'].isDelta():
|
||||||
return
|
return
|
||||||
|
# this must be a keyecho or something
|
||||||
if len(self.env['screen']['newDelta']) <=2:
|
if len(self.env['screen']['newDelta']) <=2:
|
||||||
return
|
if abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) == 1:
|
||||||
# its a cursor movement (experimental) - maybe also check current shortcut string?
|
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
||||||
|
return
|
||||||
#if not '$' in self.env['screen']['newDelta'] and
|
if abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y']) == 1:
|
||||||
# not '#' in self.env['screen']['newDelta']:
|
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
||||||
if abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) == 1:
|
return
|
||||||
# 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)
|
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
|
@ -101,7 +101,6 @@ class fenrirManager():
|
|||||||
|
|
||||||
def handleScreenUpdate(self, event):
|
def handleScreenUpdate(self, event):
|
||||||
#startTime = time.time()
|
#startTime = time.time()
|
||||||
|
|
||||||
self.environment['runtime']['screenManager'].update('onUpdate')
|
self.environment['runtime']['screenManager'].update('onUpdate')
|
||||||
'''
|
'''
|
||||||
if self.environment['runtime']['applicationManager'].isApplicationChange():
|
if self.environment['runtime']['applicationManager'].isApplicationChange():
|
||||||
|
Loading…
Reference in New Issue
Block a user