From b95bd8f19df014ac4ace838081505b568732fabb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 11 Apr 2024 18:54:27 +1000 Subject: [PATCH] AP_AHRS: remove call to get_home() this is our object, we don't need permission --- libraries/AP_AHRS/AP_AHRS.cpp | 2 +- libraries/AP_AHRS/AP_AHRS_Backend.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_AHRS/AP_AHRS.cpp b/libraries/AP_AHRS/AP_AHRS.cpp index 4780b75043..69c14fc8cc 100644 --- a/libraries/AP_AHRS/AP_AHRS.cpp +++ b/libraries/AP_AHRS/AP_AHRS.cpp @@ -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 diff --git a/libraries/AP_AHRS/AP_AHRS_Backend.cpp b/libraries/AP_AHRS/AP_AHRS_Backend.cpp index 5075f824ef..e9f692fc94 100644 --- a/libraries/AP_AHRS/AP_AHRS_Backend.cpp +++ b/libraries/AP_AHRS/AP_AHRS_Backend.cpp @@ -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); } }