Ignore weird success flag on IMU update

This commit is contained in:
Niklas Jensen
2025-11-27 20:22:01 +01:00
parent 326decdae3
commit 0047810098
+4 -4
View File
@@ -65,7 +65,7 @@ class IMU : public SensorBase<IMUAnglesMsg> {
} }
bool update() override { bool update() override {
if (!_msg.success) return false; //if (!_msg.success) return false;
#if FT_ENABLED(USE_MPU6050) #if FT_ENABLED(USE_MPU6050)
if (!_imu.update()) return false; if (!_imu.update()) return false;
_msg.rpy[0] = _imu.getYaw(); _msg.rpy[0] = _imu.getYaw();
@@ -77,9 +77,9 @@ class IMU : public SensorBase<IMUAnglesMsg> {
if (_imu.dataReady()) if (_imu.dataReady())
{ {
_imu.getAGMT(); _imu.getAGMT();
_msg.rpy[0] = _imu.magX(); _msg.rpy[0] = _imu.gyrX();
_msg.rpy[1] = _imu.magY(); _msg.rpy[1] = _imu.gyrY();
_msg.rpy[2] = _imu.magZ(); _msg.rpy[2] = _imu.gyrZ();
} }
#endif #endif
#if FT_ENABLED(USE_BNO055) #if FT_ENABLED(USE_BNO055)