add lock, initial outputManager
This commit is contained in:
@ -4,15 +4,14 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview']['y'] == -1:
|
||||
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
|
||||
|
||||
if environment['screenData']['newContentText'].replace(" ","") == '':
|
||||
environment['runtime']['speechDriver'].speak("empty line")
|
||||
environment['runtime']['outputManager'].speakText(environment, "empty line")
|
||||
else:
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -4,10 +4,9 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['screenData']['oldCursorReview'] = {'x':-1,'y':-1}
|
||||
environment['screenData']['newCursorReview'] = {'x':-1,'y':-1}
|
||||
environment['runtime']['speechDriver'].speak("leve review mode")
|
||||
environment['runtime']['outputManager'].speakText(environment, "leve review mode")
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -4,7 +4,6 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview']['y'] == -1:
|
||||
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
|
||||
@ -12,9 +11,9 @@ class command():
|
||||
environment['screenData']['newCursorReview']['y'] = environment['screenData']['newCursorReview']['y'] + 1
|
||||
|
||||
if environment['screenData']['newContentText'].replace(" ","") == '':
|
||||
environment['runtime']['speechDriver'].speak("empty line")
|
||||
environment['runtime']['outputManager'].speakText(environment, "empty line")
|
||||
else:
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -4,7 +4,6 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview']
|
||||
if environment['screenData']['newCursorReview']['y'] == -1:
|
||||
environment['screenData']['newCursorReview'] = environment['screenData']['newCursor'].copy()
|
||||
@ -12,9 +11,9 @@ class command():
|
||||
environment['screenData']['newCursorReview']['y'] = environment['screenData']['newCursorReview']['y'] - 1
|
||||
|
||||
if environment['screenData']['newContentText'].replace(" ","") == '':
|
||||
environment['runtime']['speechDriver'].speak("empty line")
|
||||
environment['runtime']['outputManager'].speakText(environment, "empty line")
|
||||
else:
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursorReview']['y']])
|
||||
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
|
@ -4,7 +4,7 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def run(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['runtime']['outputManager'].interruptOutput(environment)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
def shutdown(self):
|
||||
|
@ -5,7 +5,7 @@ class command():
|
||||
pass
|
||||
def run(self, environment):
|
||||
if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']:
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
environment['runtime']['outputManager'].interruptOutput(environment)
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -6,7 +6,7 @@ class command():
|
||||
def run(self, environment):
|
||||
if environment['screenData']['newDelta'] != environment['screenData']['oldDelta'] or \
|
||||
environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||
environment['runtime']['speechDriver'].speak(environment['screenData']['newDelta'])
|
||||
environment['runtime']['outputManager'].speakText(environment, environment['screenData']['newDelta'], Interrupt=False)
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user