I have bought a Flashfire Cobra V6 and it turns out the hat does not work properly under linux. The hat reports as if it's a single axis that remains at a given value depending on the direction I press, with Hat0Y being missing. I've investigated the I/O of the joystick with Wireshark and worked out the output from the joystick for each hat direction:
up: 0x8
up-right: 0xC
right: 0x4
down-right: 0x5
down: 0x1
down-left: 0x3
left: 0x2
up-left: 0xA
idle: 0x0
Which seems completely different from every other USB joystick I've tried that seems to go from 0x0 to 0x7 with 0xF being idle.
Can someone point me where do I look at the source to try to fix?
Correcting myself, the hat reports a whole byte, with the directions as follows:
idle 0xF0
↑ 0x00
→↑ 0x1E
→ 0x3C
→↓ 0x5A
↓ 0x78
←↓ 0x96
← 0xB4
←↑ 0xD2
Apparently it reports with a higher resolution than normal. I guess that makes the driver think it's an Axis?
De: Vanduir Volpato Maia [off-list ref]
Enviado: domingo, 8 de janeiro de 2023 20:56
Para: linux-input@vger.kernel.org [off-list ref]
Assunto: [HID] Fixing support for USB joystick Hat
I have bought a Flashfire Cobra V6 and it turns out the hat does not work properly under linux. The hat reports as if it's a single axis that remains at a given value depending on the direction I press, with Hat0Y being missing. I've investigated the I/O of the joystick with Wireshark and worked out the output from the joystick for each hat direction:
up: 0x8
up-right: 0xC
right: 0x4
down-right: 0x5
down: 0x1
down-left: 0x3
left: 0x2
up-left: 0xA
idle: 0x0
Which seems completely different from every other USB joystick I've tried that seems to go from 0x0 to 0x7 with 0xF being idle.
Can someone point me where do I look at the source to try to fix?