From 1f5743e900ae63557efc8f213d9113bfd7e8450e Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Wed, 6 Sep 2017 21:19:26 -0700 Subject: [PATCH] Plane: Report the primary magnetometer health rather then the first --- ArduPlane/sensors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduPlane/sensors.cpp b/ArduPlane/sensors.cpp index 9ea89e5bde..6ae3bce89f 100644 --- a/ArduPlane/sensors.cpp +++ b/ArduPlane/sensors.cpp @@ -303,7 +303,7 @@ void Plane::update_sensor_status_flags(void) if (barometer.all_healthy()) { control_sensors_health |= MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE; } - if (g.compass_enabled && compass.healthy(0) && ahrs.use_compass()) { + if (g.compass_enabled && compass.healthy() && ahrs.use_compass()) { control_sensors_health |= MAV_SYS_STATUS_SENSOR_3D_MAG; } if (gps.status() >= AP_GPS::GPS_OK_FIX_3D) {