From f96287b80a9c48d0387ba400ce030741bdb52431 Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 16 Mar 2022 13:57:44 +0100 Subject: [PATCH] ekf: access member variable without getter --- src/modules/ekf2/EKF/control.cpp | 2 +- src/modules/ekf2/EKF/ekf.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/ekf2/EKF/control.cpp b/src/modules/ekf2/EKF/control.cpp index f36872f28c..e8ebe931fc 100644 --- a/src/modules/ekf2/EKF/control.cpp +++ b/src/modules/ekf2/EKF/control.cpp @@ -828,7 +828,7 @@ void Ekf::checkVerticalAccelerationHealth() void Ekf::controlHeightFusion() { checkRangeAidSuitability(); - const bool do_range_aid = (_params.range_aid == 1) && isRangeAidSuitable(); + const bool do_range_aid = (_params.range_aid == 1) && _is_range_aid_suitable; switch (_params.vdist_sensor_type) { default: diff --git a/src/modules/ekf2/EKF/ekf.h b/src/modules/ekf2/EKF/ekf.h index fcbcdef301..07e308a4e9 100644 --- a/src/modules/ekf2/EKF/ekf.h +++ b/src/modules/ekf2/EKF/ekf.h @@ -899,7 +899,6 @@ private: // determine if flight condition is suitable to use range finder instead of the primary height sensor void checkRangeAidSuitability(); - bool isRangeAidSuitable() const { return _is_range_aid_suitable; } // set control flags to use baro height void setControlBaroHeight();