I have started to add more checks, like making sure that the input strings are at least same size or longer than the strings we are comparing with. Also if the command arguments recieved with the commands are right type (e.g. angle.isdigit() etc.). Here are examples of the checks I added:
I’m interested in what you were using as your command sequences. Are they things like CMS_START = “START”?
I’m also interested in the data you are sending. Is it binary data? Like 15 would be 1111 or would it be “15”. I’m looking at the Status Message STX,EXT!xC0,x80 STX would be x02 and ETX would be x03.
This chart Control character - Wikipedia has the mappings to other control characters. When I’ve done data between systems, using binary has tripped me up more times than I’d like to admit on a public robotics forum.
I don’t use RobotMesh often, but I think you just select different download methods from the dropdown. The debugger uses the same USB serial link you have going to the RasPi.
Did some troubleshooting with Andy8Kahn and BotWorld offline. In case anyone has a similar problem: Exception: 0xEE Value error is thrown when the int() builtin is given a value it can’t parse.
For a contrived example, int('13') will return 13 just fine, but int('thirteen') will blow up. It also cannot handle hex notation when given as a string: int(0x13) correctly returns 19, (probably because the tokenizer is canonicalizing it) but int('0x13') dies with Value error. This is identical behavior to CPython.
for anyone using VEXcode python (which is based on micropython so nothing I did that micropython wouldn’t do), it at least handles the int('0x13') case
MicroPython v1.12-164-g7708f98 on 2020-08-17; Vex V5 with Zynq (v0.2)
Type "help()" for more information.
>>>
>>> int(0x13)
19
>>> int('0x13')
19
>>> int('thirteen')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid syntax for integer
>>>
On Pi I use vex_user_port.write( cmd_str.encode() ) to send messages to VEX ( code uses Pyton3 PySerial)
The other character on error after STX ETX is NULL