AP_AHRS: remove call to get_home()

this is our object, we don't need permission
This commit is contained in:
Peter Barker 2024-04-11 18:54:27 +10:00 committed by Randy Mackay
parent 6ef131c0f9
commit b95bd8f19d
2 changed files with 2 additions and 2 deletions

View File

@ -1822,7 +1822,7 @@ void AP_AHRS::get_relative_position_D_home(float &posD) const
const auto &gps = AP::gps(); const auto &gps = AP::gps();
if (_gps_use == GPSUse::EnableWithHeight && if (_gps_use == GPSUse::EnableWithHeight &&
gps.status() >= AP_GPS::GPS_OK_FIX_3D) { 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; return;
} }
#endif #endif

View File

@ -257,7 +257,7 @@ void AP_AHRS::Log_Write_Home_And_Origin()
Write_Origin(LogOriginType::ekf_origin, ekf_orig); Write_Origin(LogOriginType::ekf_origin, ekf_orig);
} }
if (home_is_set()) { if (_home_is_set) {
Write_Origin(LogOriginType::ahrs_home, _home); Write_Origin(LogOriginType::ahrs_home, _home);
} }
} }