From 0985c227017b265111b52c45c036a42cca49db01 Mon Sep 17 00:00:00 2001 From: mahima-yoga Date: Thu, 27 Nov 2025 18:05:05 +0100 Subject: [PATCH] [fix] autotune: fix indentation on _state_start_time in abort logic --- .../fw_autotune_attitude_control.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/fw_autotune_attitude_control/fw_autotune_attitude_control.cpp b/src/modules/fw_autotune_attitude_control/fw_autotune_attitude_control.cpp index 48633f3e73..cc34f92bf5 100644 --- a/src/modules/fw_autotune_attitude_control/fw_autotune_attitude_control.cpp +++ b/src/modules/fw_autotune_attitude_control/fw_autotune_attitude_control.cpp @@ -562,6 +562,8 @@ void FwAutotuneAttitudeControl::updateStateMachine(hrt_abstime now) mavlink_log_critical(&mavlink_log_pub, "Autotune aborted before finishing"); _state = state::fail; + _state_start_time = now; + } else if (timeout) { // Skip to next axis mavlink_log_critical(&mavlink_log_pub, "Autotune axis timeout, skipping to next axis"); @@ -586,9 +588,11 @@ void FwAutotuneAttitudeControl::updateStateMachine(hrt_abstime now) _state = state::fail; // safety fallback break; } + + _state_start_time = now; } - _state_start_time = now; + } }