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

I suspect the turntable inputs are implemented in HID as relative inputs, which would explain the wrapping behavior in Windows joystick tester.

In Chrome on Windows, axis inputs are read using HidP_GetScaledUsageValue or HidP_GetUsageValue and then normalized using the physical bounds (for scaled usages) or the logical bounds. I'm guessing there's something wrong with either the physical or logical bounds reported by the device that's causing Chrome to divide by zero during normalization. If you can capture the HID report descriptor from the device then I can take look and see what's going wrong. (If you can't get the raw HID report descriptor, connect to the device in [WebHID Explorer](https://nondebug.github.io/webhid-explorer/index.html) and copy the "Device info" text box.)

Currently, the Gamepad API spec only considers joystick-like inputs. For joystick axes, we need to know their minimum and maximum values in order to normalize to the Standard Gamepad's [-1.0,+1.0] axis range. On some platforms, bounds information may not be available for relative inputs. (For instance, on Linux relative axes are delivered as EV_REL input events which have no associated bounds information.)

We also need to recognize when the axis is reporting an "at rest" value so we can detect when the user is not interacting with the axis. For a relative axis with no recentering behavior, the axis could report any value at rest so we need to watch for changes in the input.

I filed https://crbug.com/1213273 to document the ID and axis issues in Chrome.

-- 
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#issuecomment-848377314

Received on Wednesday, 26 May 2021 00:53:13 UTC