From 596b8220e2453fb9a8712e19e75d20eef0eed2a3 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Mon, 31 Jul 2017 17:28:49 +1000 Subject: [PATCH] EKF: Output mag sensor isolation warning first time only --- EKF/ekf_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index e5a4baa732..3dc01d9e9f 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -372,7 +372,7 @@ bool Ekf::realignYawGPS() ECL_WARN("EKF bad yaw corrected using GPS course"); // declare the magnetomer as failed if a bad yaw has occurred more than once - if (_flt_mag_align_complete && (_num_bad_flight_yaw_events >= 2)) { + if (_flt_mag_align_complete && (_num_bad_flight_yaw_events >= 2) && !_control_status.flags.mag_fault) { ECL_WARN("EKF stopping magnetometer use"); _control_status.flags.mag_fault = true; }