NicoHood / HID

Bring enhanced HID functions to your Arduino!
http://www.nicohood.de
MIT License
2.33k stars 401 forks source link

Linux gamepad #433

Closed LucasBlommers closed 7 months ago

LucasBlommers commented 7 months ago

Hi,

So I got a simple gamepad with 1 analog stick and 2 buttons, when I calibrate in Windows everything works fine but, when I try it on muliple Linux machines the axis don't seem to update as much resulting in wrong values.

I tried to google how to increase the refresh rate on Linux but I can't find anything.

LucasBlommers commented 7 months ago

I solved the problem by mapping the analog value: int x = map(xPinValue, 0, 1024, -32767, 32767); int y = map(yPinValue, 0, 1024, -32767, 32767);