Command IDs sent to the Arduino which are greater than 32767 will be returned as negative values instead (i.e. Arduino is implicitly casting an unsigned 16-bit int to a signed 16-bit int).
robotd log:
: Sending to servo assembly: b'@64015 gpio-read 10\n'
: Got back from servo: b'# @64015 gpio-read 10\n'
: Got back from servo: b'@-1521 > low\r\n'
: Got back from servo: b'@-1521 + OK\r\n'
robotd works around this because it bitwise ANDs returned command IDs with 0xFFFF before examining them, but it would be nice if servo-firmware didn't do this in the first place.
Command IDs sent to the Arduino which are greater than 32767 will be returned as negative values instead (i.e. Arduino is implicitly casting an unsigned 16-bit int to a signed 16-bit int).
robotd log:
robotd works around this because it bitwise ANDs returned command IDs with 0xFFFF before examining them, but it would be nice if servo-firmware didn't do this in the first place.