From ded6314ffdaadb0d5e1a78427fc73321fa826c9c Mon Sep 17 00:00:00 2001 From: Saibernard <112599512+Saibernard@users.noreply.github.com> Date: Mon, 9 Nov 2026 03:09:43 -0500 Subject: [PATCH] fix(vtol): restart the tailsitter front transition mid back transition (#29608) A tailsitter that got a fixed-wing request while still transitioning back to hover switched straight to fixed-wing mode, even with the nose part way up and the airspeed below the transition speed. The standard VTOL had this removed in 2016 because it can result in an unsafe flying state, and restarts the front transition instead. Do the same for the tailsitter. Signed-off-by: Saibernard Yogendran --- src/modules/vtol_att_control/tailsitter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index 6cd7622193b..1bcb31f1bc3 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -165,9 +165,11 @@ void Tailsitter::update_vtol_state() } case vtol_mode::TRANSITION_BACK: - // failsafe into fixed wing mode - _vtol_mode = vtol_mode::FW_MODE; - _trans_finished_ts = hrt_absolute_time(); + // fixed-wing requested again during the back transition. Restart the front transition + // instead of handing a partly pitched-up attitude at low airspeed to the fixed-wing controller + resetTransitionStates(); + _flag_was_in_trans_mode = false; // recompute the transition start attitude and rotation axis + _vtol_mode = vtol_mode::TRANSITION_FRONT_P1; break; } }