Skip to content

Commit 0696abd

Browse files
committed
usb mouse: Return the result of send_report().
Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent eb583b4 commit 0696abd

File tree

1 file changed

+5
-5
lines changed
  • micropython/usb/usb-device-mouse/usb/device

1 file changed

+5
-5
lines changed

micropython/usb/usb-device-mouse/usb/device/mouse.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,26 @@ def send_report(self, dx=0, dy=0):
3838
# same buffer, before the previous one has completed.
3939
report = struct.pack("Bbb", b, dx, dy)
4040

41-
super().send_report(report)
41+
return super().send_report(report)
4242

4343
def click_left(self, down=True):
4444
self._l = down
45-
self.send_report()
45+
return self.send_report()
4646

4747
def click_middle(self, down=True):
4848
self._m = down
49-
self.send_report()
49+
return self.send_report()
5050

5151
def click_right(self, down=True):
5252
self._r = down
53-
self.send_report()
53+
return self.send_report()
5454

5555
def move_by(self, dx, dy):
5656
if not -127 <= dx <= 127:
5757
raise ValueError("dx")
5858
if not -127 <= dy <= 127:
5959
raise ValueError("dy")
60-
self.send_report(dx, dy)
60+
return self.send_report(dx, dy)
6161

6262

6363
# Basic 3-button mouse HID Report Descriptor.

0 commit comments

Comments
 (0)