diff --git a/esp32/include/peripherals/imu.h b/esp32/include/peripherals/imu.h index c849e79..a40250e 100644 --- a/esp32/include/peripherals/imu.h +++ b/esp32/include/peripherals/imu.h @@ -65,7 +65,7 @@ class IMU : public SensorBase { } bool update() override { - if (!_msg.success) return false; + //if (!_msg.success) return false; #if FT_ENABLED(USE_MPU6050) if (!_imu.update()) return false; _msg.rpy[0] = _imu.getYaw(); @@ -75,11 +75,11 @@ class IMU : public SensorBase { #endif #if FT_ENABLED(USE_ICM20948) if (_imu.dataReady()) - { + { _imu.getAGMT(); - _msg.rpy[0] = _imu.magX(); - _msg.rpy[1] = _imu.magY(); - _msg.rpy[2] = _imu.magZ(); + _msg.rpy[0] = _imu.gyrX(); + _msg.rpy[1] = _imu.gyrY(); + _msg.rpy[2] = _imu.gyrZ(); } #endif #if FT_ENABLED(USE_BNO055)