I am using two HID devices (Logitech Attack 3 controllers) with the same product and vendor IDs, so they are differentiated using their Bus and Device numbers.
When I move both devices at once, they operate without any lag, but when I only move one of them, it is extremely laggy. I think that this might be due to some lag in the processing of the USBError exception, which is triggered every time one of the devices is not moving. The code works fine if the second device is taken out.
I believe this is the problematic code:
while True:
print "Hi"
try:
rData = rDev.read(endpointR.bEndpointAddress,endpointR.wMaxPacketSize)
print "right"
print rData
except usb.core.USBError as e:
rData = None
try:
lData = lDev.read(endpointL.bEndpointAddress,endpointL.wMaxPacketSize)
print "left"
print lData
except usb.core.USBError as e:
lData = None
Thanks in advance.