remove some more unneeded return values
This commit is contained in:
parent
0729d2daf2
commit
5ad6cbbb68
@ -18,7 +18,7 @@ class screenManager():
|
||||
|
||||
def update(self, environment):
|
||||
if not self.isSuspendingScreen(environment):
|
||||
environment = environment['runtime']['screenDriver'].update(environment)
|
||||
environment['runtime']['screenDriver'].update(environment)
|
||||
environment['screenData']['lastScreenUpdate'] = time.time()
|
||||
|
||||
def isSuspendingScreen(self, environment):
|
||||
|
@ -10,10 +10,10 @@ class driver():
|
||||
self.vcsaDevicePath = '/dev/vcsa'
|
||||
|
||||
def initialize(self, environment):
|
||||
return environment
|
||||
pass
|
||||
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
|
||||
def insert_newlines(self, string, every=64):
|
||||
return '\n'.join(string[i:i+every] for i in range(0, len(string), every))
|
||||
@ -26,7 +26,6 @@ class driver():
|
||||
currScreenFile.close()
|
||||
except Exception as e:
|
||||
environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR)
|
||||
|
||||
return currScreen
|
||||
|
||||
def getIgnoreScreens(self):
|
||||
@ -114,5 +113,3 @@ class driver():
|
||||
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('- '))
|
||||
|
||||
return environment
|
||||
|
||||
|
0
src/fenrir-package/sound.py
Normal file → Executable file
0
src/fenrir-package/sound.py
Normal file → Executable file
@ -15,10 +15,10 @@ class driver():
|
||||
self.soundFileCommand = 'play -q -v fenrirVolume fenrirSoundFile'
|
||||
if self.frequenceCommand == '':
|
||||
self.frequenceCommand = '=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence'
|
||||
return environment
|
||||
return
|
||||
def shutdown(self, environment):
|
||||
self.cancel()
|
||||
return environment
|
||||
return
|
||||
def playFrequence(self, frequence, duration, adjustVolume):
|
||||
if interrupt:
|
||||
self.cancel()
|
||||
|
@ -20,9 +20,9 @@ class driver:
|
||||
return
|
||||
def initialize(self, environment):
|
||||
if self._initialized:
|
||||
return environment
|
||||
return
|
||||
if not _gstreamerAvailable:
|
||||
return environment
|
||||
return
|
||||
|
||||
self._player = Gst.ElementFactory.make('playbin', 'player')
|
||||
bus = self._player.get_bus()
|
||||
@ -41,9 +41,14 @@ class driver:
|
||||
self._source.link(self._sink)
|
||||
|
||||
self._initialized = True
|
||||
return environment
|
||||
return
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
global _gstreamerAvailable
|
||||
if not _gstreamerAvailable:
|
||||
return
|
||||
self.cancel()
|
||||
self._initialized = False
|
||||
_gstreamerAvailable = False
|
||||
|
||||
def _onPlayerMessage(self, bus, message):
|
||||
if message.type == Gst.MessageType.EOS:
|
||||
@ -92,12 +97,6 @@ class driver:
|
||||
self._pipeline.set_state(Gst.State.NULL)
|
||||
def setVolume(self, volume):
|
||||
self.volume = volume
|
||||
def shutdown(self):
|
||||
global _gstreamerAvailable
|
||||
if not _gstreamerAvailable:
|
||||
return
|
||||
self.cancel()
|
||||
self._initialized = False
|
||||
_gstreamerAvailable = False
|
||||
|
||||
|
||||
|
||||
|
@ -13,9 +13,9 @@ class driver():
|
||||
except:
|
||||
self._initialized = False
|
||||
def initialize(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
|
||||
def speak(self,text, queueable=True):
|
||||
if not self._isInitialized:
|
||||
|
@ -7,9 +7,8 @@ class driver():
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self._isInitialized = False
|
||||
return environment
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
|
||||
def speak(self,text, queueable=True):
|
||||
if not self._isInitialized:
|
||||
|
Loading…
Reference in New Issue
Block a user