From 3ff238c00f026bc905e74891d6b6c44a8aa08486 Mon Sep 17 00:00:00 2001 From: Pernilla Date: Tue, 28 Oct 2025 17:13:57 +0100 Subject: [PATCH] fix: update dead reckoning timestamp outside vehicle status copy --- .../HealthAndArmingChecks/checks/estimatorCheck.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp b/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp index a786818401..4b7f2fe135 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/estimatorCheck.cpp @@ -654,11 +654,11 @@ void EstimatorChecks::deadReckoningTimeout(const Context &context, Report &repor vehicle_land_detected_s vehicle_land_detected; - if (_vehicle_land_detected_sub.copy(&vehicle_land_detected)) { + if (!lpos.dead_reckoning) { + _last_not_dead_reckoning_time_us = now; + } - if (!lpos.dead_reckoning) { - _last_not_dead_reckoning_time_us = now; - } + if (_vehicle_land_detected_sub.copy(&vehicle_land_detected)) { if (!vehicle_land_detected.landed && ((reporter.failsafeFlags().mode_req_global_position && !reporter.failsafeFlags().global_position_invalid) ||