Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flydigi Apex 4 support #10161

Closed
zany130 opened this issue Jul 2, 2024 · 9 comments
Closed

Flydigi Apex 4 support #10161

zany130 opened this issue Jul 2, 2024 · 9 comments
Assignees
Milestone

Comments

@zany130
Copy link

zany130 commented Jul 2, 2024

as recommended here hhd-dev/hhd#73 (comment)
it sounds like this would be the best place to get this supported? If not could you please point me in the right direction, I have no experience with these kinds of things 😅

I found that the Flydigi Apex 4 controller has four interfaces

  1. normal gamepad
  2. gyro mouse device toggled with a button on the controller (circle button next to home)
  3. gamepad with gyro
  4. unknown, maybe firmware updates or the Windows software.

Right now, Steam and other SDL applications are reading the first interface, meaning they do not see the gyro.

In the above issue, it was recommended that this could maybe be fixed in SDL?

@slouken slouken self-assigned this Jul 2, 2024
@slouken slouken added this to the 3.2.0 milestone Jul 2, 2024
@slouken
Copy link
Collaborator

slouken commented Jul 3, 2024

I picked up the Apex 4 controller, and it looks like the third interface only has gyro data when mouse mode is enabled. I verified this on both Windows and Linux. I haven't installed the Space Station software or anything, so this is the default firmware out of the box.

The reason why SDL only sees the first interface is because the third interface is using a custom vendor-specific usage page and usage, and that's being ignored right now.

@slouken
Copy link
Collaborator

slouken commented Jul 3, 2024

If you can figure out what needs to be sent to the controller to enable gyro data with the mouse mode off, then we could create an SDL hidraw driver that supports the back buttons and the gyro simultaneously.

@zany130
Copy link
Author

zany130 commented Jul 3, 2024

I picked up the Apex 4 controller, and it looks like the third interface only has gyro data when mouse mode is enabled. I verified this on both Windows and Linux.

Hmmm that's strange on Linux I saw what I assumed was gyro data (but might be wrong) on the 3rd interface with mouse mode off .

I treated with the hid-recoeder

And moving the controller around changed the values

@slouken
Copy link
Collaborator

slouken commented Jul 3, 2024

I believe you, but maybe something put the controller into a mode where it reports that data? Maybe a firmware update, or the Windows app turning on DS mode?

@zany130
Copy link
Author

zany130 commented Jul 3, 2024

Yes I will investigate I don't think it's ds mode as I currently have that off and I don't think that affects Linux anyway

It could be firmware update.

EDIT:
fwiw this is the output I am talking about that I think is gyro
https://asciinema.org/a/RSp7loKVR1IufltoVpFNOphK6

for that test I had the controller wired and I only moved the controller around. i did not touch any of the sticks or buttons.

I also had the gyro mouse off

I then repeatedly placed the controller on a table lifted it up and placed it back down

I saw some of the values going to 0 when placed on a table and then changed when picked up.

So this is gyro correct? I just want to make sure because I might be wrong lol like I saId no experience with any of this lol

EDIT2: this is my settings in the app
image

I wonder if the gyro mapping has anything to do with it...

EDIT3: Intresting that it! if I have gyro mapping disabled in the software I no longer get gyro( or whatever that data was) without toogleing the gyro mouse first in hid recorder

so it seems a gyro mapping has to be set in the software from my testing it doesn't seem to matter what mapping you set (there is mouse, left stick, and right stick) It also doesn't seem to matter if its in "Racing mode" or "FPS mode" for the gyro

from what I understand from reviews and the manual the difference should be fps mode is full gyro in all directions, and racing should be just for left and right tilts

the strange thing is I don't need to press the toggle button that set for this (in my case is LB) to get the gyro output in hid recorder

@zany130
Copy link
Author

zany130 commented Jul 8, 2024

would this be enough to get gyro support added in a SDL driver?

not sure if this is "true" gyro or just the same thing as the mouse mode when you press the circle button

@slouken
Copy link
Collaborator

slouken commented Aug 5, 2024

Given that you need to set a gyro mapping in software, and it looks like we can't tell if that's set, I'm going to say this isn't enough to add gyro support in an SDL driver. If we can find out whether gyro is enabled, then that might change, but I'm going to go ahead and close this for now.

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@zany130
Copy link
Author

zany130 commented Sep 3, 2024

sorry for bumping this but just wanted to add a few observations I made.

This might of already been obvious but

there 2 ways the controller sends gyro data to the OS (this is both on linux and windows WITHOUT the driver software running (more on that in a bit)

  1. Natively in switch mode
  2. Emulating some other input device (a mouse or one controller analog stick either left or right) and mapping that device to the controller's gyro

The second way of sending gyro can further be separated into two catagory's

  • built in to the controller (works in linux and windows)

This is what pressing the "circle button" (extra button next to home) does in dinput mode and is what flydigi refers to as" flymouse". All the OS sees is the normal controller and a virtual mouse which is mapped to gyro by the controllers firmware.

  • Done in the driver software

This is the Gyro mapping I mentioned you can set up in software. You can map gyro to either analog sticks, or to the "fly mouse" (controller virtual mouse)

Interestingly, mouse Gryo doesn't need the driver software running (it does require the software to set it up), but analog stick gyro does (this is true on BOTH windows and Linux)

@zany130
Copy link
Author

zany130 commented Sep 27, 2024

@slouken, what about the back paddles? What would have to be done to get those supported? Rumble is the other thing not working in dinput mode but I am guessing that would be in the kernel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants