Merge pull request #4757 from german77/BetterMotion

InputCommon: Add compatibility with only accelerometer and auto calibrate for drift
This commit is contained in:
bunnei 2020-10-09 23:37:08 -07:00 committed by GitHub
commit f250011ba0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 102 additions and 8 deletions

View file

@ -46,6 +46,7 @@ public:
private:
void ResetOrientation();
void SetOrientationFromAccelerometer();
// PID constants
const f32 kp;
@ -66,6 +67,7 @@ private:
f32 gyro_threshold = 0.0f;
u32 reset_counter = 0;
bool reset_enabled = true;
bool only_accelerometer = true;
};
} // namespace InputCommon