Code refactoring

This commit is contained in:
2024-01-27 21:35:57 +07:00
parent 2aa9648dd4
commit fa0a664e43
14 changed files with 57 additions and 40 deletions

View File

@@ -196,17 +196,17 @@ class MPU {
private:
MPU6050_6Axis_MotionApps20 *_mpu = nullptr;
float _ypr[3];
float _ax, _ay, _az;
float _gx, _gy, _gz;
float _gravity;
float _ypr[3] = { 0 };
float _ax = 0, _ay = 0, _az = 0;
float _gx = 0, _gy = 0, _gz = 0;
float _gravity = 0;
float _AccZInertial = 0;
float _axOffset = 0, _ayOffset = 0, _azOffset = 0;
float _gxOffset = 0, _gyOffset = 0, _gzOffset = 0;
float _prOffset[2]; // yaw isn't used
float _prOffset[2] = { 0 }; // yaw isn't used
uint8_t _fifoBuffer[45];
uint8_t _fifoBuffer[45] = { 0 };
Preferences _preferences;
const char *_TAG = "MPU6050 module";