diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-07 11:24:01 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-03-07 11:24:01 +0100 |
commit | ee076c66c99fbd7895459e80d679c374340a9ed2 (patch) | |
tree | 14bbacde20f8d23d8ec3c4638f18f6a09a1153cb /src/sensor/sensor.hpp | |
parent | 5fea3a40f77417f639de3dbb27797d8e2ecdbaca (diff) |
refactor: make misc improvements & update calibration precision
Diffstat (limited to 'src/sensor/sensor.hpp')
-rw-r--r-- | src/sensor/sensor.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sensor/sensor.hpp b/src/sensor/sensor.hpp index 5bdf6ca..b79b918 100644 --- a/src/sensor/sensor.hpp +++ b/src/sensor/sensor.hpp @@ -11,7 +11,7 @@ constexpr uint8_t SENSOR_WAKEUP = 0x00U; constexpr float RAW_TO_DPS_FACTOR = 1.0 / 131.0; constexpr float RAW_TO_G_FACTOR = 1.0 / 16384.0; -constexpr unsigned int ONE_EIGHTY = 180; +constexpr uint32_t ONE_EIGHTY = 180; enum class SensorStatus { @@ -146,14 +146,14 @@ public: SensorStatus getStatus() noexcept; // Accelerometer calibration values - double accel_cal_x = 0.0F; - double accel_cal_y = 0.0F; - double accel_cal_z = 0.0F; + double accel_cal_x = 0; + double accel_cal_y = 0; + double accel_cal_z = 0; // Gyroscope calibration values - double gyro_cal_x = 0.0F; - double gyro_cal_y = 0.0F; - double gyro_cal_z = 0.0F; + double gyro_cal_x = 0; + double gyro_cal_y = 0; + double gyro_cal_z = 0; private: TwoWire _wire; |