diff options
| author | 2021-11-29 12:40:29 -0600 | |
|---|---|---|
| committer | 2021-12-12 23:26:04 -0600 | |
| commit | 316f80af87c3290ad3ceda99fe9cf02f1d935b0c (patch) | |
| tree | 6b933d2399f02ff42c077d0f2f342b9ffbb21cf5 /src/core/hid/motion_input.h | |
| parent | Merge pull request #7488 from vonchenplus/support_multiple_videos_playing (diff) | |
| download | yuzu-316f80af87c3290ad3ceda99fe9cf02f1d935b0c.tar.gz yuzu-316f80af87c3290ad3ceda99fe9cf02f1d935b0c.tar.xz yuzu-316f80af87c3290ad3ceda99fe9cf02f1d935b0c.zip | |
service/hid: Improve console motion accuracy
Diffstat (limited to 'src/core/hid/motion_input.h')
| -rw-r--r-- | src/core/hid/motion_input.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hid/motion_input.h b/src/core/hid/motion_input.h index 5b5b420bb..bca4520fa 100644 --- a/src/core/hid/motion_input.h +++ b/src/core/hid/motion_input.h | |||
| @@ -24,7 +24,7 @@ public: | |||
| 24 | void SetAcceleration(const Common::Vec3f& acceleration); | 24 | void SetAcceleration(const Common::Vec3f& acceleration); |
| 25 | void SetGyroscope(const Common::Vec3f& gyroscope); | 25 | void SetGyroscope(const Common::Vec3f& gyroscope); |
| 26 | void SetQuaternion(const Common::Quaternion<f32>& quaternion); | 26 | void SetQuaternion(const Common::Quaternion<f32>& quaternion); |
| 27 | void SetGyroDrift(const Common::Vec3f& drift); | 27 | void SetGyroBias(const Common::Vec3f& bias); |
| 28 | void SetGyroThreshold(f32 threshold); | 28 | void SetGyroThreshold(f32 threshold); |
| 29 | 29 | ||
| 30 | void EnableReset(bool reset); | 30 | void EnableReset(bool reset); |
| @@ -36,6 +36,7 @@ public: | |||
| 36 | [[nodiscard]] std::array<Common::Vec3f, 3> GetOrientation() const; | 36 | [[nodiscard]] std::array<Common::Vec3f, 3> GetOrientation() const; |
| 37 | [[nodiscard]] Common::Vec3f GetAcceleration() const; | 37 | [[nodiscard]] Common::Vec3f GetAcceleration() const; |
| 38 | [[nodiscard]] Common::Vec3f GetGyroscope() const; | 38 | [[nodiscard]] Common::Vec3f GetGyroscope() const; |
| 39 | [[nodiscard]] Common::Vec3f GetGyroBias() const; | ||
| 39 | [[nodiscard]] Common::Vec3f GetRotations() const; | 40 | [[nodiscard]] Common::Vec3f GetRotations() const; |
| 40 | [[nodiscard]] Common::Quaternion<f32> GetQuaternion() const; | 41 | [[nodiscard]] Common::Quaternion<f32> GetQuaternion() const; |
| 41 | 42 | ||
| @@ -69,7 +70,7 @@ private: | |||
| 69 | Common::Vec3f gyro; | 70 | Common::Vec3f gyro; |
| 70 | 71 | ||
| 71 | // Vector to be substracted from gyro measurements | 72 | // Vector to be substracted from gyro measurements |
| 72 | Common::Vec3f gyro_drift; | 73 | Common::Vec3f gyro_bias; |
| 73 | 74 | ||
| 74 | // Minimum gyro amplitude to detect if the device is moving | 75 | // Minimum gyro amplitude to detect if the device is moving |
| 75 | f32 gyro_threshold = 0.0f; | 76 | f32 gyro_threshold = 0.0f; |