Fix calling of IMU/MAG data when no new data available
This commit is contained in:
@@ -75,6 +75,8 @@ class Magnetometer : public SensorBase<MagnetometerMsg> {
|
||||
if (_imu->dataReady())
|
||||
{
|
||||
_imu->getAGMT();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
_msg.rpy[0] = _mag->magX();
|
||||
|
||||
Reference in New Issue
Block a user