Browse Source

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.
mission-4.1.18
Randy Mackay 7 years ago
parent
commit
6459a4de9d
  1. 2
      APMrover2/sensors.cpp

2
APMrover2/sensors.cpp

@ -362,7 +362,7 @@ void Rover::update_sensor_status_flags(void) @@ -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);

Loading…
Cancel
Save