From d6e8c5857b9896b3453c1db2876bfd14d5c96ce5 Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 13 Jul 2016 10:37:05 +0200 Subject: [PATCH] fix interrupted speech --- .../commands/onInput/10000-shut_up.py | 3 ++- .../commands/onScreenChanged/10000-shut_up.py | 13 ------------- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 src/fenrir-package/commands/onScreenChanged/10000-shut_up.py diff --git a/src/fenrir-package/commands/onInput/10000-shut_up.py b/src/fenrir-package/commands/onInput/10000-shut_up.py index ee761207..a6dc5767 100644 --- a/src/fenrir-package/commands/onInput/10000-shut_up.py +++ b/src/fenrir-package/commands/onInput/10000-shut_up.py @@ -4,7 +4,8 @@ class command(): def __init__(self): pass def run(self, environment): - environment['runtime']['speechDriver'].cancel() + if environment['screenData']['newDelta'] != environment['screenData']['oldDelta']: + environment['runtime']['speechDriver'].cancel() return environment def setCallback(self, callback): pass diff --git a/src/fenrir-package/commands/onScreenChanged/10000-shut_up.py b/src/fenrir-package/commands/onScreenChanged/10000-shut_up.py deleted file mode 100644 index 624e1868..00000000 --- a/src/fenrir-package/commands/onScreenChanged/10000-shut_up.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/python - -class command(): - def __init__(self): - pass - def run(self, environment): - if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: - environment['runtime']['speechDriver'].cancel() - return environment - def setCallback(self, callback): - pass - def shutdown(self): - pass