Commander: on completion of takeoff, force state transition to Loiter

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2025-06-04 17:03:30 +02:00
parent 84cdc05195
commit bdf1895145
+3 -1
View File
@@ -2015,7 +2015,9 @@ void Commander::checkForMissionUpdate()
_user_mode_intention.change(vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION);
} 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) {