mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
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 <bernie97@seas.upenn.edu>
This commit is contained in:
1 parent
cdf9cfb28b
commit
ded6314ffd
1 file changed
+5
-3
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user