Skip to content

Commit

Permalink
AP_AHRS: Change the order in which you make judgments
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura authored and peterbarker committed Oct 25, 2024
1 parent e91cab3 commit 5e47fa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_AHRS/AP_AHRS_DCM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e47fa1

Please sign in to comment.