Simplified UART has wrong byte format: int8 instead of uint8 #1366
Labels
bug
Something isn't working
software: pybricks-micropython
Issues with Pybricks MicroPython firmware (or EV3 runtime)
After this commit,
PUPDevice.write(1, (-127, -128, -126, -1, 127, 128, 129, 130) )
results in 7F, 7F, 81, FF, 7F, 7F, 7Fpybricks/pybricks-micropython@1ae92c3
So signed bytes become unsigned, every out-of-range number becomes 7F, and the number 128 is unreachable.
The code should probably have uint8 everywhere.
The text was updated successfully, but these errors were encountered: