mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 07:31:36 +08:00
Commander: on completion of takeoff, force state transition to Loiter
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -2011,7 +2011,9 @@ void Commander::checkForMissionUpdate()
|
|||||||
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION);
|
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER);
|
// Transition to loiter when the takeoff is completed (force into the Loiter, if mode is not executable then failsafe).
|
||||||
|
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER, ModeChangeSource::ModeExecutor, false,
|
||||||
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (_vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) {
|
} else if (_vehicle_status.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) {
|
||||||
|
|||||||
Reference in New Issue
Block a user