MicroPythonDevices: finetuned the sendCommands() method. micropython

Thu, 11 Jul 2019 19:42:36 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 11 Jul 2019 19:42:36 +0200
branch
micropython
changeset 7061
9db5a73217bb
parent 7059
a8fad276cbd5
child 7062
ac12da95958b

MicroPythonDevices: finetuned the sendCommands() method.

eric6/MicroPython/MicroPythonDevices.py file | annotate | diff | comparison | revisions
--- a/eric6/MicroPython/MicroPythonDevices.py	Wed Jul 10 20:21:57 2019 +0200
+++ b/eric6/MicroPython/MicroPythonDevices.py	Thu Jul 11 19:42:36 2019 +0200
@@ -280,11 +280,9 @@
         @type list of str
         """
         rawOn = [       # sequence of commands to enter raw mode
-            b'\x02',
-            b'\r\x03',
-            b'\r\x03',
-            b'\r\x03',
-            b'\r\x01',
+            b'\x02',        # Ctrl-B: exit raw repl (just in case)
+            b'\r\x03\x03',  # Ctrl-C twice: interrupt any running program
+            b'\r\x01',      # Ctrl-A: enter raw REPL
         ]
         newLine = [b'print("\\n")\r',]
         commands = [c.encode("utf-8)") + b'\r' for c in commandsList]

eric ide

mercurial