From 5fa64dcd9b56d73b5b0de4ad9cbb1ab1bfac0585 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 15 Jul 2026 11:46:13 +1000 Subject: [PATCH] APM_Control: do not fetch unused position reset delta Co-Authored-By: Claude Fable 5 --- libraries/APM_Control/AR_PosControl.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/APM_Control/AR_PosControl.cpp b/libraries/APM_Control/AR_PosControl.cpp index e3367a468cd..d55a1578238 100644 --- a/libraries/APM_Control/AR_PosControl.cpp +++ b/libraries/APM_Control/AR_PosControl.cpp @@ -406,16 +406,14 @@ void AR_PosControl::write_log() /// initialise ekf xy position reset check void AR_PosControl::init_ekf_xy_reset() { - Vector2f pos_shift; - _ekf_xy_reset_count = AP::ahrs().get_position_NE_reset_count(pos_shift); + _ekf_xy_reset_count = AP::ahrs().get_position_NE_reset_count(); } /// handle_ekf_xy_reset - check for ekf position reset and adjust loiter or brake target position void AR_PosControl::handle_ekf_xy_reset() { - // check for position shift - Vector2f pos_shift; - const uint16_t reset_count = AP::ahrs().get_position_NE_reset_count(pos_shift); + // check for position reset + const uint16_t reset_count = AP::ahrs().get_position_NE_reset_count(); if (reset_count != _ekf_xy_reset_count) { Vector2p pos_ne_m; if (!AP::ahrs().get_relative_position_NE_origin(pos_ne_m)) {