AP_AHRS: Change the order in which you make judgments

This commit is contained in:
muramura 2024-10-13 06:44:43 +09:00 committed by Peter Barker
parent e91cab3349
commit 5e47fa1353
1 changed files with 1 additions and 1 deletions

View File

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