We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a55b6a commit 9c9db3aCopy full SHA for 9c9db3a
1 file changed
tools/pyboard.py
@@ -71,7 +71,10 @@ def eval(self, expression):
71
return ret
72
73
def exec(self, command):
74
- command_bytes = bytes(command, encoding='ascii')
+ if isinstance(command, bytes):
75
+ command_bytes = command
76
+ else:
77
+ command_bytes = bytes(command, encoding='ascii')
78
for i in range(0, len(command_bytes), 32):
79
self.serial.write(command_bytes[i:min(i+32, len(command_bytes))])
80
time.sleep(0.01)
0 commit comments