dragos-efy / efy-apps

The website + a collection of static apps built with efy.
https://efy.ooo
GNU Affero General Public License v3.0
6 stars 1 forks source link

feat: support Wiimote #5

Open Ryuno-Ki opened 1 month ago

Ryuno-Ki commented 1 month ago

The ndx factor is the difficult part. But other than that I could make this JS work for Wiimote on Firefox and Chromium.

Firefox registers a single Wiimote as different gamepads which mostly works with your implementation.

In Chromium I have only 7 buttons registered which fails the DPad. I could not make the cross (analog DPad, if you will) work.

Ryuno-Ki commented 1 month ago

efy.ooo/gamepads.html with Wiimote on Chromium

0: A 1: B 2: Home 3: + 4: - 5: 1 6: 2

efy.ooo/gamepads.html with Wiimote on Firefox

0: A 1: B 16: Home 17: Up 18: Left 19: Right 20: Down 21: 1 22: 1 23: + 24: -

Above the screenshot is 0 057e-0330 Nintendo Wii Remote Accelerometer (with values recognised) and 1 (Wii Remote IR) (without any response).

Maybe there's a screen needed to trigger IR sensors?

057e-0330 refers to USB alias, see also https://the-sz.com/products/usbid/index.php?v=0x057e&p=0x0330&n=