From e9a9e3328091ab321027d951c7c52600ec60d94c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell <tridge@samba.org> Date: Sun, 24 Aug 2014 21:00:56 +1000 Subject: [PATCH] AP_AHRS: use EKF use_compass() if EKF enabled this allows magfailed status to show on console via SYS_STATUS health bits --- libraries/AP_AHRS/AP_AHRS_NavEKF.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index 2098f7b04..14b1d0a27 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -166,6 +166,9 @@ bool AP_AHRS_NavEKF::airspeed_estimate(float *airspeed_ret) const // true if compass is being used bool AP_AHRS_NavEKF::use_compass(void) { + if (using_EKF()) { + return EKF.use_compass(); + } return AP_AHRS_DCM::use_compass(); } -- GitLab