diff --git a/libraries/AP_AHRS/AP_AHRS_DCM.cpp b/libraries/AP_AHRS/AP_AHRS_DCM.cpp index eb10db1b45..d7aa5c7cd3 100644 --- a/libraries/AP_AHRS/AP_AHRS_DCM.cpp +++ b/libraries/AP_AHRS/AP_AHRS_DCM.cpp @@ -434,7 +434,7 @@ AP_AHRS_DCM::_yaw_gain(void) const // return true if we have and should use GPS bool AP_AHRS_DCM::have_gps(void) const { - if (AP::gps().status() <= AP_GPS::NO_FIX || _gps_use == GPSUse::Disable) { + if (_gps_use == GPSUse::Disable || AP::gps().status() <= AP_GPS::NO_FIX) { return false; } return true;