diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-06 11:21:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 11:21:27 -0500 |
commit | f7e6bda5cde875179e630a002541f093b9e82526 (patch) | |
tree | 03692d888201fb2c71a201ff94762ffdd95a324e /src/input_common/helpers/joycon_protocol/poller.h | |
parent | 31f0fa1065a65e436462fe26ef0fd6e50d7ad183 (diff) | |
parent | 97704b8da9866a4e529515f5793309ce5f199840 (diff) |
Merge pull request #9907 from german77/joycon
input_common: joycon: Add stick input from passive reports
Diffstat (limited to 'src/input_common/helpers/joycon_protocol/poller.h')
-rw-r--r-- | src/input_common/helpers/joycon_protocol/poller.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/input_common/helpers/joycon_protocol/poller.h b/src/input_common/helpers/joycon_protocol/poller.h index 354d41dad..5c897f070 100644 --- a/src/input_common/helpers/joycon_protocol/poller.h +++ b/src/input_common/helpers/joycon_protocol/poller.h @@ -22,7 +22,7 @@ public: JoyStickCalibration right_stick_calibration_, MotionCalibration motion_calibration_); - void SetCallbacks(const Joycon::JoyconCallbacks& callbacks_); + void SetCallbacks(const JoyconCallbacks& callbacks_); /// Handles data from passive packages void ReadPassiveMode(std::span<u8> buffer); @@ -51,7 +51,10 @@ private: void UpdatePasiveProPadInput(const InputReportPassive& buffer); /// Returns a calibrated joystick axis from raw axis data - f32 GetAxisValue(u16 raw_value, Joycon::JoyStickAxisCalibration calibration) const; + f32 GetAxisValue(u16 raw_value, JoyStickAxisCalibration calibration) const; + + /// Returns a digital joystick axis from passive axis data + std::pair<f32, f32> GetPassiveAxisValue(PasivePadStick raw_value) const; /// Returns a calibrated accelerometer axis from raw motion data f32 GetAccelerometerValue(s16 raw, const MotionSensorCalibration& cal, @@ -75,7 +78,7 @@ private: JoyStickCalibration right_stick_calibration{}; MotionCalibration motion_calibration{}; - Joycon::JoyconCallbacks callbacks{}; + JoyconCallbacks callbacks{}; }; } // namespace InputCommon::Joycon |