fix typo and copy paste in dummyDrivers
This commit is contained in:
parent
a9381d87d4
commit
04459e8eb7
@ -10,7 +10,7 @@ class driver():
|
||||
def __init__(self):
|
||||
self._isInitialized = False
|
||||
self._brl = None
|
||||
self._deviceSize = 0
|
||||
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
try:
|
||||
@ -26,6 +26,8 @@ class driver():
|
||||
def getDeviceSize(self):
|
||||
if not self._isInitialized:
|
||||
return (0,0)
|
||||
if not self._deviceSize:
|
||||
return (0,0)
|
||||
return self._deviceSize
|
||||
|
||||
def flush(self):
|
||||
|
@ -13,35 +13,35 @@ class driver():
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self._isInitialized = True
|
||||
pirnt('BrailleDummyDriver: Initialize')
|
||||
print('BrailleDummyDriver: Initialize')
|
||||
|
||||
|
||||
def getDeviceSize(self):
|
||||
if not self._isInitialized:
|
||||
return (0,0)
|
||||
pirnt('BrailleDummyDriver: getDeviceSize 20')
|
||||
print('BrailleDummyDriver: getDeviceSize 20')
|
||||
return (20,0)
|
||||
|
||||
def writeText(self,text):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('BrailleDummyDriver: writeText:' + str(text))
|
||||
pirnt('BrailleDummyDriver: -----------------------------------')
|
||||
print('BrailleDummyDriver: writeText:' + str(text))
|
||||
print('BrailleDummyDriver: -----------------------------------')
|
||||
|
||||
def connectDevice(self):
|
||||
pirnt('BrailleDummyDriver: connectDevice')
|
||||
print('BrailleDummyDriver: connectDevice')
|
||||
|
||||
def enterScreen(self, screen):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('BrailleDummyDriver: enterScreen')
|
||||
print('BrailleDummyDriver: enterScreen')
|
||||
|
||||
def leveScreen(self):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('BrailleDummyDriver: leveScreen')
|
||||
print('BrailleDummyDriver: leveScreen')
|
||||
|
||||
def shutdown(self):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('BrailleDummyDriver: Shutdown')
|
||||
print('BrailleDummyDriver: Shutdown')
|
||||
|
@ -14,42 +14,42 @@ class driver():
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self._initialized = True
|
||||
pirnt('SoundDummyDriver: Initialize')
|
||||
print('SoundDummyDriver: Initialize')
|
||||
|
||||
def shutdown(self):
|
||||
if not self._initialized:
|
||||
return
|
||||
self.cancel()
|
||||
pirnt('SoundDummyDriver: Shutdown')
|
||||
print('SoundDummyDriver: Shutdown')
|
||||
|
||||
def playFrequence(self, frequence = 1000, duration = 0.3, adjustVolume = 0):
|
||||
if not self._initialized:
|
||||
return
|
||||
if interrupt:
|
||||
self.cancel()
|
||||
pirnt('SoundDummyDriver: playFrequence:' + ' freq:' + str(frequence) + ' duration:' + str(duration) + ' adjustVolume:' + str(adjustVolume) )
|
||||
pirnt('SoundDummyDriver: -----------------------------------')')
|
||||
print('SoundDummyDriver: playFrequence:' + ' freq:' + str(frequence) + ' duration:' + str(duration) + ' adjustVolume:' + str(adjustVolume) )
|
||||
print('SoundDummyDriver: -----------------------------------')')
|
||||
|
||||
def playSoundFile(self, filePath, interrupt = True):
|
||||
if not self._initialized:
|
||||
return
|
||||
if interrupt:
|
||||
self.cancel()
|
||||
pirnt('SoundDummyDriver: playSoundFile:' + str(filePath))
|
||||
pirnt('SoundDummyDriver: -----------------------------------')
|
||||
print('SoundDummyDriver: playSoundFile:' + str(filePath))
|
||||
print('SoundDummyDriver: -----------------------------------')
|
||||
|
||||
def cancel(self):
|
||||
if not self._initialized:
|
||||
return
|
||||
pirnt('SoundDummyDriver: Cancel')
|
||||
print('SoundDummyDriver: Cancel')
|
||||
|
||||
def setCallback(self, callback):
|
||||
if not self._initialized:
|
||||
return
|
||||
pirnt('SoundDummyDriver: setCallback')
|
||||
print('SoundDummyDriver: setCallback')
|
||||
|
||||
def setVolume(self, volume):
|
||||
if not self._initialized:
|
||||
return
|
||||
self.volume = volume
|
||||
pirnt('SoundDummyDriver: setVolume:' + str(self.volume))
|
||||
print('SoundDummyDriver: setVolume:' + str(self.volume))
|
||||
|
@ -13,58 +13,58 @@ class driver():
|
||||
def initialize(self, environment):
|
||||
self._isInitialized = True
|
||||
self.env = environment
|
||||
pirnt('SpeechDummyDriver: Iitialize')
|
||||
print('SpeechDummyDriver: Iitialize')
|
||||
|
||||
def shutdown(self):
|
||||
pirnt('SpeechDummyDriver: Shutdown')
|
||||
print('SpeechDummyDriver: Shutdown')
|
||||
|
||||
def speak(self,text, queueable=True):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
if not queueable:
|
||||
self.cancel()
|
||||
pirnt('SpeechDummyDriver: Speak:'+text)
|
||||
pirnt('SpeechDummyDriver: -----------------------------------')
|
||||
print('SpeechDummyDriver: Speak:'+text)
|
||||
print('SpeechDummyDriver: -----------------------------------')
|
||||
|
||||
def cancel(self):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: Cancel')
|
||||
print('SpeechDummyDriver: Cancel')
|
||||
|
||||
def setCallback(self, callback):
|
||||
pirnt('SpeechDummyDriver: setCallback')
|
||||
print('SpeechDummyDriver: setCallback')
|
||||
|
||||
def clear_buffer(self):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: clear_buffer')
|
||||
print('SpeechDummyDriver: clear_buffer')
|
||||
|
||||
def setVoice(self, voice):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: setVoice:' + str(voice))
|
||||
print('SpeechDummyDriver: setVoice:' + str(voice))
|
||||
|
||||
def setPitch(self, pitch):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: setPitch:' + str(pitch))
|
||||
print('SpeechDummyDriver: setPitch:' + str(pitch))
|
||||
|
||||
def setRate(self, rate):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: setRate:' + str(rate))
|
||||
print('SpeechDummyDriver: setRate:' + str(rate))
|
||||
|
||||
def setModule(self, module):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: setModule:' + str(module))
|
||||
print('SpeechDummyDriver: setModule:' + str(module))
|
||||
|
||||
def setLanguage(self, language):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: setLanguage:' + str(language))
|
||||
print('SpeechDummyDriver: setLanguage:' + str(language))
|
||||
|
||||
def setVolume(self, volume):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
pirnt('SpeechDummyDriver: setVolume:' + str(volume))
|
||||
print('SpeechDummyDriver: setVolume:' + str(volume))
|
||||
|
Loading…
Reference in New Issue
Block a user