diff --git a/src/fenrir/commands/onInput/45000-present_char_if_cursor_change_horizontal.py b/src/fenrir/commands/onInput/45000-present_char_if_cursor_change_horizontal.py index 0926b53e..7fd753e4 100644 --- a/src/fenrir/commands/onInput/45000-present_char_if_cursor_change_horizontal.py +++ b/src/fenrir/commands/onInput/45000-present_char_if_cursor_change_horizontal.py @@ -37,7 +37,7 @@ class command(): return x, y, currChar = char_utils.getCurrentChar(self.env['screenData']['newCursor']['x'], self.env['screenData']['newCursor']['y'], self.env['screenData']['newContentText']) if not currChar.isspace(): - self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True) + self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/50000-char_echo.py b/src/fenrir/commands/onInput/50000-char_echo.py index 3e282650..cb42eda9 100644 --- a/src/fenrir/commands/onInput/50000-char_echo.py +++ b/src/fenrir/commands/onInput/50000-char_echo.py @@ -33,7 +33,7 @@ class command(): if len(currDelta.strip()) != len(currDelta) and \ currDelta.strip() != '': currDelta = currDelta.strip() - self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True) + self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py b/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py index 14a840c3..ba1282f0 100644 --- a/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py +++ b/src/fenrir/commands/onInput/55000-present_line_if_cursor_change_vertical.py @@ -33,7 +33,7 @@ class command(): x, y, currLine = line_utils.getCurrentLine(self.env['screenData']['newCursor']['x'], self.env['screenData']['newCursor']['y'], self.env['screenData']['newContentText']) if currLine.isspace(): - self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True) + self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False) else: self.env['runtime']['outputManager'].presentText(currLine, interrupt=True) diff --git a/src/fenrir/commands/onInput/60000-word_echo.py b/src/fenrir/commands/onInput/60000-word_echo.py index bb03357c..fd5391af 100644 --- a/src/fenrir/commands/onInput/60000-word_echo.py +++ b/src/fenrir/commands/onInput/60000-word_echo.py @@ -50,7 +50,7 @@ class command(): return if currWord != '': - self.env['runtime']['outputManager'].presentText(currWord, interrupt=True) + self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/62000-spell_check.py b/src/fenrir/commands/onInput/62000-spell_check.py index 53b7aad0..c0fd4a4c 100644 --- a/src/fenrir/commands/onInput/62000-spell_check.py +++ b/src/fenrir/commands/onInput/62000-spell_check.py @@ -126,7 +126,7 @@ class command(): pass if not self.spellChecker.check(currWord): - self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False) + self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/65000-char_delete_echo.py b/src/fenrir/commands/onInput/65000-char_delete_echo.py index ead8360e..66b87b9f 100644 --- a/src/fenrir/commands/onInput/65000-char_delete_echo.py +++ b/src/fenrir/commands/onInput/65000-char_delete_echo.py @@ -42,7 +42,7 @@ class command(): if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \ currNegativeDelta.strip() != '': currNegativeDelta = currNegativeDelta.strip() - self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True) + self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/commands/onInput/72000-history.py b/src/fenrir/commands/onInput/72000-history.py index 4437ce7a..fd6788fe 100644 --- a/src/fenrir/commands/onInput/72000-history.py +++ b/src/fenrir/commands/onInput/72000-history.py @@ -47,7 +47,7 @@ class command(): announce = currLine if currLine.isspace(): - self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True) + self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False) else: self.env['runtime']['outputManager'].presentText(announce, interrupt=True) self.env['commandsIgnore']['onScreenUpdate']['CHAR_DELETE_ECHO'] = True diff --git a/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py b/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py index 39b473bd..8da3e405 100644 --- a/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py +++ b/src/fenrir/commands/onScreenChanged/80000-screen_change_announcement.py @@ -17,8 +17,8 @@ class command(): return 'No Description found' def run(self): - self.env['runtime']['outputManager'].presentText("screen " + str(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True) - self.env['runtime']['outputManager'].presentText(self.env['screenData']['newContentText'], interrupt=False) + self.env['runtime']['outputManager'].presentText("screen " + str(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True, flush=False) + self.env['runtime']['outputManager'].presentText(self.env['screenData']['newContentText'], interrupt=False, flush=False) def setCallback(self, callback): pass diff --git a/src/fenrir/core/outputManager.py b/src/fenrir/core/outputManager.py index 9fd6d21c..4457b643 100644 --- a/src/fenrir/core/outputManager.py +++ b/src/fenrir/core/outputManager.py @@ -24,7 +24,7 @@ class outputManager(): self.env['runtime']['settingsManager'].shutdownDriver('speechDriver') self.env['runtime']['settingsManager'].shutdownDriver('brailleDriver') - def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=False): + def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=True): if text == '': return self.env['runtime']['debug'].writeDebugOut("presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO) @@ -100,7 +100,7 @@ class outputManager(): self.env['runtime']['debug'].writeDebugOut("\"speak\" in outputManager.speakText ",debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR) - def brailleText(self, text='', flush=False): + def brailleText(self, text='', flush=True): if not self.env['runtime']['settingsManager'].getSettingAsBool('braille', 'enabled'): return if self.env['runtime']['brailleDriver'] == None: diff --git a/src/fenrir/fenrir.py b/src/fenrir/fenrir.py index 5e237416..3b39343b 100644 --- a/src/fenrir/fenrir.py +++ b/src/fenrir/fenrir.py @@ -64,7 +64,7 @@ class fenrir(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged') else: self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate') - self.environment['runtime']['outputManager'].brailleText() + self.environment['runtime']['outputManager'].brailleText(flush=False) self.handleCommands() #print(time.time()-startTime)