EKF: Output mag sensor isolation warning first time only

This commit is contained in:
Paul Riseborough 2017-07-31 17:28:49 +10:00
parent ce806768b7
commit 596b8220e2

View File

@ -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;
}