paroj / xpad

Linux Kernel Driver for the Xbox/ Xbox 360/ Xbox One Controllers
801 stars 178 forks source link

Extra buttons support for Flydigi Vader 3 Pro #266

Open Gotolei opened 7 months ago

Gotolei commented 7 months ago

Out of the box, it functions fine as a normal xbox controller once it's been assigned some sort of generic profile. However, it has six extra buttons (C, Z, four on the back), and gyro, all of which show up in the DEBUG_VERBOSE raw data. The gyro would be quite a long shot and I don't know how that would even be hooked into anything, but I do see that this project can handle the extra buttons.

The controller runs at 500hz so logs get overwhelmed very quickly. Here's some excerpts from dmesg -wxH of it running and some events, both with DEBUG_VERBOSE and just DEBUG: gist

Previously I was poking at this with xboxdrv, the feedback is all the same except for the second line of all 00 with every update. Here's what I've been able to figure out of the mapping from that, the mapping is shared between dongle and wired unless noted otherwise:

https://i.imgur.com/B724jaM.jpg

It might be worth noting that this controller has both xinput and dinput modes; all of this has been xinput. Dinput mode through the dongle doesn't seem to receive any inputs from the controller, and while it does generally work in wired mode DEBUG_VERBOSE offers no output. I could maybe try to sniff out the traffic between it and the app in my windows VM, but my knowledge really starts to run out by that point. Personally I'd be content with just xinput working because that has all the extra buttons in it anyways. gist

Let me know if there's anything else needed.