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

GamepadAuxState functionality #1084

Merged

Conversation

mikepparks
Copy link
Contributor

@mikepparks mikepparks commented Jun 26, 2024

This is to lay groundwork for implementing auxiliary/specialty features into the various Gamepad modes. This is data that may be shared between several modes, rather than in use by all modes, such as haptics/rumble and IMU/motion devices.

Currently defined:

  • Primary/secondary "profile" colors
    • PS4/5: primary color lightbar color
    • Switch: future use for Pro controller grip and body colors
  • Sensors
    • 2D: touch/trackpad, mouse positioning
    • 3D: Gyroscope, accelerometer, magnetometer
    • 4D: Time of Flight
  • Haptics
    • Actuators: simple rumble motors, or more complex waveform haptics
    • Triggers: Future planning for resistive triggers

Currently implemented:

  • Haptics
    • PS3, PS4, Xinput, and OG Xbox - DRV8833 addon
    • Xbox One - TBD
    • Switch - current implementation (Pokken-based) does not support haptics
  • Sensors
    • PS4
      • Trackpad - Wii addon via uDraw/Drawsome tablet
      • Gyroscope/accelerometer - Wii addon via MotionPlus and Nunchuck combination
      • Lightbar - Uses Player LED in RGB mode
    • Xinput, PS3
      • Player LED

…tside of normal Gamepad button/analog functions, such as IMU (accelerometer, gyroscope) and rumble state.
Renamed PS gyro_accel_misc to sensor_data.
Changed sensor fields to u16.
Keyboard host now implements mouse bindings for left, middle, right buttons
Relative mouse movements stored in the GamepadAux mouse sensor for later usage
Added exclusion list for KeyboardMapper control to filter out unused entries
Implemented haptics control in PS4 and OGXbox modes.
Fixed initial states for MotionPlus gyro
This change would make PS3 mode specifically PS3, and standard HID/"DInput" should no longer use this mode. Still to do: better define and explain what each report blob is used for.
Included state checking for Aux gyro and accel sensors.
@mikepparks mikepparks marked this pull request as ready for review September 4, 2024 23:04
@mikepparks mikepparks changed the title [WIP] GamepadAuxState functionality GamepadAuxState functionality Sep 4, 2024
Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fantastic!!! So much cleaner now with aux states inside of the gamepad class. Lots of wii upgrades as well, and mouse buttons :o

@@ -2,6 +2,7 @@
#define PLAYER_LEDS_H_

#include <cstring>
#include <cstdio>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a printf() relic? Not a big deal as I know we include it in other places

@arntsonl arntsonl merged commit 32be222 into OpenStickCommunity:main Sep 17, 2024
44 checks passed
@mikepparks mikepparks deleted the 20240625-gamepadauxstate branch October 4, 2024 18:55
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

Successfully merging this pull request may close these issues.

2 participants