Skip to content

Commit 63227d9

Browse files
committed
Convert signed mouse values to 8-bit unsigned values for report.
1 parent 890c4c1 commit 63227d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_hid/mouse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def move(self, x=0, y=0, wheel=0):
144144
partial_x = self._limit(x)
145145
partial_y = self._limit(y)
146146
partial_wheel = self._limit(wheel)
147-
self.report[1] = partial_x
148-
self.report[2] = partial_y
149-
self.report[3] = partial_wheel
147+
self.report[1] = partial_x & 0xff
148+
self.report[2] = partial_y & 0xff
149+
self.report[3] = partial_wheel & 0xff
150150
self.hid_mouse.send_report(self.report)
151151
x -= partial_x
152152
y -= partial_y

0 commit comments

Comments
 (0)