AP_AHRS: use EKF use_compass() if EKF enabled

this allows magfailed status to show on console via SYS_STATUS health
bits
This commit is contained in:
Andrew Tridgell 2014-08-24 21:00:56 +10:00 committed by Randy Mackay
parent 6a654ff461
commit 62d526a50d
1 changed files with 3 additions and 0 deletions

View File

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