higher timeout value
This commit is contained in:
parent
024885ed60
commit
b666b57c4a
1 changed files with 2 additions and 2 deletions
|
|
@ -48,9 +48,9 @@ buf = array.array("b", [0] * 8)
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
# attempt to read data from the mouse
|
# attempt to read data from the mouse
|
||||||
# 10ms timeout, so we don't block long if there
|
# 20ms timeout, so we don't block long if there
|
||||||
# is no data
|
# is no data
|
||||||
count = mouse.read(0x81, buf, timeout=10)
|
count = mouse.read(0x81, buf, timeout=20)
|
||||||
except usb.core.USBTimeoutError:
|
except usb.core.USBTimeoutError:
|
||||||
# skip the rest of the loop if there is no data
|
# skip the rest of the loop if there is no data
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue