mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 07:28:54 +08:00
prevent instant transition to fixed-wing while already in back transition, prevents unsafe flying state
This commit is contained in:
@@ -180,8 +180,10 @@ void Standard::update_vtol_state()
|
||||
|
||||
} else {
|
||||
// the transition to fw mode switch is on
|
||||
if (_vtol_schedule.flight_mode == MC_MODE) {
|
||||
if (_vtol_schedule.flight_mode == MC_MODE || _vtol_schedule.flight_mode == TRANSITION_TO_MC) {
|
||||
// start transition to fw mode
|
||||
/* NOTE: The failsafe transition to fixed-wing was removed because it can result in an
|
||||
* unsafe flying state. */
|
||||
_vtol_schedule.flight_mode = TRANSITION_TO_FW;
|
||||
_vtol_schedule.transition_start = hrt_absolute_time();
|
||||
|
||||
@@ -207,9 +209,6 @@ void Standard::update_vtol_state()
|
||||
_trans_finished_ts = hrt_absolute_time();
|
||||
}
|
||||
|
||||
} else if (_vtol_schedule.flight_mode == TRANSITION_TO_MC) {
|
||||
// transitioning to mc mode & transition switch on - failsafe back into fw mode
|
||||
_vtol_schedule.flight_mode = FW_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user