WootingKb / wooting-analog-sdk-old

Easy access to Wooting keyboard analog values #WootDev
Mozilla Public License 2.0
29 stars 2 forks source link

HID read with 0 millisecond timeout is too fast #2

Closed PastaJ36 closed 6 years ago

PastaJ36 commented 6 years ago

(From Rocky_4 @ discord): "you use a 0 millisecond timeout. I think there must be a -1 instead so it handle the call as a blocking one, 0 milliseconds are to fast"

https://github.com/PastaJ36/wooting-analog-reader/blob/284b44e2ee46ea2c023a2abd27785f8a27fa3448/src/wooting-analog-reader.c#L61

PastaJ36 commented 6 years ago

It's non blocking on purpose. The idea is that the function can be called faster than there are new packets available. I'll add it as a comment to make the purpose clear.

Rocky04 commented 6 years ago

Now it works for me with 0 milliseconds, can't reproduce it anymore.