Rover: gyro health check uses initialised flag

We should not be relying on the notify flags as a way to pass info around the system.  Rover's initialised flag is equivalent and more appropriate.
This commit is contained in:
Randy Mackay 2017-12-15 14:45:50 +09:00
parent a8da459baf
commit 6459a4de9d

View File

@ -362,7 +362,7 @@ void Rover::update_sensor_status_flags(void)
control_sensors_health &= ~MAV_SYS_STATUS_LOGGING;
}
if (AP_Notify::flags.initialising) {
if (!initialised || ins.calibrating()) {
// while initialising the gyros and accels are not enabled
control_sensors_enabled &= ~(MAV_SYS_STATUS_SENSOR_3D_GYRO | MAV_SYS_STATUS_SENSOR_3D_ACCEL);
control_sensors_health &= ~(MAV_SYS_STATUS_SENSOR_3D_GYRO | MAV_SYS_STATUS_SENSOR_3D_ACCEL);