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

[Task] Add evdev motion sensors #12503

Closed
10 tasks done
Megamouse opened this issue Aug 11, 2022 · 2 comments · Fixed by #12502
Closed
10 tasks done

[Task] Add evdev motion sensors #12503

Megamouse opened this issue Aug 11, 2022 · 2 comments · Fixed by #12502
Assignees

Comments

@Megamouse
Copy link
Contributor

Megamouse commented Aug 11, 2022

Disclaimer:
This task is just for me to write down some thoughts and track some progress. (There's probably some other way to do this on GitHub)

The Task:
Evdev is currently missing motion controls (accelerator/gyro).
By investigating Dolphin and some other sources I found out that you have to go through some hoops to see them in the first place.
You see, normally, your evdev device only handles regular buttons and axis etc.
Apparently it is not allowed to have the motion controls on the same "event node" as the other input, because it's meant to use certain Axis that would otherwise be used for sticks for example.
So what you will actually want to see is a second "event" or device in your evdev list that is solely meant for motion controls of that controller.
In order to see that second device though, you first need to add your user to the input group and reboot your system.
What a pain in the behind.... But if you manage to do this, motion controls do indeed work in the rpcs3 pad settings with some additional hacks.
Since this is basically a second controller, we need to map that one as some sort of buddy device to our main device.

TODO:

  • Query motion capabilities during ListDevices and add those that only have ABS + motion
  • Query motion capabilities during add_device and skip those that only have ABS + motion
  • Expose motion sensor data to cellPad
  • Add new section/dialog that allows the user to select any device that has ABS + motion capabilites
  • Add motion axis mappings to config file
  • Allow user to map any of the Axis (X, Y, Z, RX, RY, RZ) to any DS3 axis if available
  • Allow user to adjust some parameters for each axis
  • Show some live feedback for each axis, including DS3 values if mapped
  • Maybe add a dropdown to select between evdev/mouse/keyboard input Not gonna do that
  • Allow similar actions on other non-evdev handlers
@ItsCubeTime
Copy link

ItsCubeTime commented Aug 15, 2022

Hi there 👋

Just to be clear, is the goal of this to enable motion controls for native PS3 controllers on Linux & for those controllers & that platform exclusively? Or exactly what controllers support evdev with motion controls (and will all of those be supported?)?

@MSuih
Copy link
Member

MSuih commented Aug 15, 2022

The goal is to get motion input data from any motion-capable device that evdev supports and map them to our emulated DS3. Motion controls were already supported with our DualShock and DualSesnse handlers, so this is more useful for non-sony controllers with motion capabilityies (and possibly other devices which evdev exposes as motion-capable).

Evdev is only available on linux, so this does not affect other operating systems.

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

Successfully merging a pull request may close this issue.

3 participants