mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
dist/tools/pyterm: fix handling of reset ANSI escape code
This commit is contained in:
parent
04d33973f4
commit
9ea3b2e04f
8
dist/tools/pyterm/pyterm
vendored
8
dist/tools/pyterm/pyterm
vendored
@ -665,6 +665,14 @@ class SerCmd(cmd.Cmd):
|
||||
else:
|
||||
output += c
|
||||
|
||||
# Hack to correctly handle reset ANSI escape code in the stream
|
||||
# When the reset escape sequence is detected, it is written and
|
||||
# flushed immediately to stdout
|
||||
if output == '\033[0m':
|
||||
sys.stdout.write(output)
|
||||
sys.stdout.flush()
|
||||
output = ""
|
||||
|
||||
crreceived = c == '\r'
|
||||
nlreceived = c == '\n'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user