-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
When the project is run on Raspberry Pi unfortunately there are timeouts while reading from the USB. There is a hack that involves magic numbers and adding timeout to the read and sleep when the buffer size exceeds a certain size. The hack was found on stackoverflow belongs to Jordan Grider (thanks) and it works fine. However should be improved before being committed. It looks like this:
def read_packet(self):
try:
res = self.dev.read(self.read_endpoint, self.usb_packetlength, 1000)
if (len(res)>10000):
sleep(1)
return res
except ...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels