undera / pylgbst

Python library for LEGO® PoweredUp devices
MIT License
559 stars 121 forks source link

Incorrect fmt passed for goto_position #40

Closed nakermann1973 closed 4 years ago

nakermann1973 commented 4 years ago

Lines 406 and 408 uses unsigned int format:

params += pack("<I", degrees_primary)

This should be signed (lowercase i). The spec uses INT32 for the AbsPos parameter (https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#output-sub-command-gotoabsoluteposition-abspos-speed-maxpower-endstate-useprofile-0x0d)

undera commented 4 years ago

Good find! Thanks for reporting this.