also silence while changeing TTY
This commit is contained in:
parent
d745d8a9c0
commit
3af9434216
@ -29,7 +29,7 @@ runtime = {
|
|||||||
'oldTTY':'0',
|
'oldTTY':'0',
|
||||||
'newTTY':'0',
|
'newTTY':'0',
|
||||||
'speechDriverString':'es',
|
'speechDriverString':'es',
|
||||||
'speechDriver': es.speech()
|
'speechDriver': sd.speech()
|
||||||
}
|
}
|
||||||
|
|
||||||
while(runtime['running']):
|
while(runtime['running']):
|
||||||
@ -67,7 +67,7 @@ while(runtime['running']):
|
|||||||
|
|
||||||
# changes on the screen
|
# changes on the screen
|
||||||
if runtime['oldContentBytes'] != runtime['newContentBytes']:
|
if runtime['oldContentBytes'] != runtime['newContentBytes']:
|
||||||
if len(runtime['delta']) < 3:
|
if ((len(runtime['delta']) < 3) or runtime['oldTTY'] != runtime['newTTY']):
|
||||||
runtime['speechDriver'].cancel()
|
runtime['speechDriver'].cancel()
|
||||||
diff = difflib.ndiff(runtime['oldContentText'], runtime['newContentText'])
|
diff = difflib.ndiff(runtime['oldContentText'], runtime['newContentText'])
|
||||||
runtime['delta'] = ''.join(x[2:] for x in diff if x.startswith('+ '))
|
runtime['delta'] = ''.join(x[2:] for x in diff if x.startswith('+ '))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user