Fix calling of IMU/MAG data when no new data available

This commit is contained in:
Niklas Jensen
2025-12-26 22:52:06 +01:00
parent da87d12588
commit d1c2e5f447
3 changed files with 13 additions and 3 deletions
+2
View File
@@ -75,6 +75,8 @@ class Magnetometer : public SensorBase<MagnetometerMsg> {
if (_imu->dataReady())
{
_imu->getAGMT();
} else {
return false;
}
#endif
_msg.rpy[0] = _mag->magX();