change default braille to dummy

This commit is contained in:
chrys 2017-07-24 21:51:12 +02:00
parent 103cdf531e
commit 030435c9ac
4 changed files with 19 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)
if self.printMessages:
print('BrailleDummyDriver: Initialize') print('BrailleDummyDriver: Initialize')
def getDeviceSize(self): def getDeviceSize(self):
if not self._isInitialized: if not self._isInitialized:
return (0,0) return (0,0)
if self.printMessages:
print('BrailleDummyDriver: getDeviceSize ' + str(self.deviceSize)) 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
if self.printMessages:
print('BrailleDummyDriver: writeText:' + str(text)) print('BrailleDummyDriver: writeText:' + str(text))
print('BrailleDummyDriver: -----------------------------------') print('BrailleDummyDriver: -----------------------------------')
def connectDevice(self): def connectDevice(self):
if self.printMessages:
print('BrailleDummyDriver: connectDevice') print('BrailleDummyDriver: connectDevice')
def enterScreen(self, screen): def enterScreen(self, screen):
if not self._isInitialized: if not self._isInitialized:
return return
if self.printMessages:
print('BrailleDummyDriver: enterScreen') print('BrailleDummyDriver: enterScreen')
def leveScreen(self): def leveScreen(self):
if not self._isInitialized: if not self._isInitialized:
return return
if self.printMessages:
print('BrailleDummyDriver: leveScreen') print('BrailleDummyDriver: leveScreen')
def shutdown(self): def shutdown(self):
if not self._isInitialized: if not self._isInitialized:
return return
if self.printMessages:
print('BrailleDummyDriver: Shutdown') print('BrailleDummyDriver: Shutdown')