From 5e47fa13530dbb13a1c9cba45e9ca42073147a82 Mon Sep 17 00:00:00 2001 From: muramura Date: Sun, 13 Oct 2024 06:44:43 +0900 Subject: [PATCH] AP_AHRS: Change the order in which you make judgments --- libraries/AP_AHRS/AP_AHRS_DCM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;