Skip to content

Commit

Permalink
AP_AHRS: remove call to get_home()
Browse files Browse the repository at this point in the history
this is our object, we don't need permission
  • Loading branch information
peterbarker authored and rmackay9 committed Apr 15, 2024
1 parent 6ef131c commit b95bd8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_AHRS/AP_AHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ void AP_AHRS::get_relative_position_D_home(float &posD) const
const auto &gps = AP::gps();
if (_gps_use == GPSUse::EnableWithHeight &&
gps.status() >= AP_GPS::GPS_OK_FIX_3D) {
posD = (get_home().alt - gps.location().alt) * 0.01;
posD = (_home.alt - gps.location().alt) * 0.01;
return;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_AHRS/AP_AHRS_Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void AP_AHRS::Log_Write_Home_And_Origin()
Write_Origin(LogOriginType::ekf_origin, ekf_orig);
}

if (home_is_set()) {
if (_home_is_set) {
Write_Origin(LogOriginType::ahrs_home, _home);
}
}
Expand Down

0 comments on commit b95bd8f

Please sign in to comment.