[w3c/gamepad] Axes value stuck at +/- Infinity or zero (#150)

I have gamepads that are not the standard gamepad, (e.g. rhythm game controllers, custom axis behavior)
In windows joystick tester, the axis works fine, goes from left to right and wraps around,
but in the browser I am only getting -Infinity, 0, or Infinity.

I would assume what is happening is it is dividing by zero when converting the axis value to a number between 0.0~1.0
I am guessing standard joysticks report what their max axis values are and the gamepad lib just reads it and divides.
And if a gamepad is not aware of this field or maybe this gamepad is explicitly and incorrectly returning zero then this problem happens.

Is it possible to just expose the raw axis value + the "reported" max axis value in addition to the current calculated 0.0~1.0 so that in the rare cases that we are stuck with niche hardware reporting max value 0, we have a means of working around it?

Also how can I help get this done

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/150

Received on Tuesday, 25 May 2021 10:08:01 UTC