mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 01:13:34 +08:00
finish back transition when a mode change from manual to auto happens during the back transition
This commit is contained in:
@@ -736,6 +736,13 @@ void VtolAttitudeControl::task_main()
|
||||
} else if (_vtol_type->get_mode() == FIXED_WING) {
|
||||
_transition_command = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_FW;
|
||||
}
|
||||
|
||||
/* We want to make sure that a mode change (manual>auto) during the back transition
|
||||
* doesn't result in an unsafe state. This prevents the instant fall back to
|
||||
* fixed-wing on the switch from manual to auto */
|
||||
} else if (_vtol_type->get_mode() == TRANSITION_TO_MC) {
|
||||
_transition_command = vehicle_status_s::VEHICLE_VTOL_STATE_MC;
|
||||
}
|
||||
}
|
||||
|
||||
// check in which mode we are in and call mode specific functions
|
||||
|
||||
Reference in New Issue
Block a user