From 651ae9c0c9b061c76e38a8449189076f2a04c885 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Mon, 22 Apr 2024 15:31:34 +0200 Subject: [PATCH] VTOL: fix tailsitter quadchute throttle spike suppression Signed-off-by: Silvan Fuhrer --- src/modules/vtol_att_control/tailsitter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index a0ba07f5164f..0dd6c17be39f 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -67,8 +67,11 @@ void Tailsitter::update_vtol_state() if (_vtol_vehicle_status->fixed_wing_system_failure) { // Failsafe event, switch to MC mode immediately + if (_vtol_mode != vtol_mode::MC_MODE) { + _transition_start_timestamp = hrt_absolute_time(); + } + _vtol_mode = vtol_mode::MC_MODE; - _transition_start_timestamp = hrt_absolute_time(); } else if (!_attc->is_fixed_wing_requested()) {