virantha / bricknil

Control LEGO Bluetooth Sensors and Motors with Python
https://virantha.github.io/bricknil
Apache License 2.0
142 stars 39 forks source link

Treat all sensor values and signed integers #10

Open janvrany opened 4 years ago

janvrany commented 4 years ago

Based on @dlech's suggestion that in LEGO BT protocol all sensor values are signed. This commit changes Peripheral._convert_bytes() to treat values as signed (as opposed to unsigned).

This commit fixes issue #7.