Create toggle_output_enable.py

This commit is contained in:
chrys87 2016-07-25 16:34:47 +02:00 committed by GitHub
parent 1c0893c26a
commit 315c7dc113

View File

@ -0,0 +1,23 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
if environment['speech']['enabled'] or \
environment['sound']['enabled'] or \
environment['braille']['enabled']:
environment['runtime']['outputManager'].presentText(environment, "fenrir muted")
environment['speech']['enabled'] = False
environment['sound']['enabled'] = False
environment['braille']['enabled'] = False
else:
environment['runtime']['outputManager'].presentText(environment, "fenrir unmuted")
environment['speech']['enabled'] = True
environment['sound']['enabled'] = True
environment['braille']['enabled'] = True
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass