forked from Archive/PX4-Autopilot
prevent instant transition to fixed-wing while already in back transition, prevents unsafe flying state
This commit is contained in:
parent
670697b0ac
commit
c6e4926d4e
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue