Skip to content

Commit 836bb98

Browse files
authored
Merge pull request #31 from dhalbert/gamepad-struct-format-fix
gamepad: Use signed bytes for joystick values in struct.pack_into()
2 parents dbfabac + a5ff147 commit 836bb98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_hid/gamepad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _send(self, always=False):
152152
"""Send a report with all the existing settings.
153153
If ``always`` is ``False`` (the default), send only if there have been changes.
154154
"""
155-
struct.pack_into('<HBBBB', self._report, 0,
155+
struct.pack_into('<Hbbbb', self._report, 0,
156156
self._buttons_state,
157157
self._joy_x, self._joy_y,
158158
self._joy_z, self._joy_r_z)

0 commit comments

Comments
 (0)