SylvesterFPS
Member
I am using Teensyduino version 1.62 with an XInputHID interface that I extended in usb_desc.c. Basically, everything works, but I'm encountering confusion regarding latency for an 8000Hz gamepad. When I test just my raw button latency using an external device, I get an average latency of around 108µs, which is correct based on the descriptor. However, if I activate both analog sticks, rotate them quickly in circles, and measure the button latency again, I get a significantly higher button latency. How can this problem be solved without sacrificing speed? I only send my data when the state changes, but with analog sticks, that becomes difficult since there are more than just two states. I don't know how to solve this programmatically—deadzone, averaging, and lower read resolution are not options.
Attachments
-
Gamepad.ino11.4 KB · Views: 71
-
usb.c34.4 KB · Views: 54
-
usb_desc.c171.8 KB · Views: 50
-
usb_desc.h44.4 KB · Views: 74
-
usb_inst.cpp2.6 KB · Views: 51
-
usb_serial.h18.3 KB · Views: 47
-
usb_xinputhid.c4.4 KB · Views: 47
-
usb_xinputhid.h4.3 KB · Views: 76
-
WProgram.h5.2 KB · Views: 50
-
boards.txt95.7 KB · Views: 103