mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 15:27:36 +08:00
commander: move valid mission check inside
I think it makes more sense to move this check inside of main_state_transition.
This commit is contained in:
committed by
Matthias Grob
parent
916ffef04c
commit
52563264e6
@@ -813,13 +813,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
|
||||
break;
|
||||
|
||||
case PX4_CUSTOM_SUB_MODE_AUTO_MISSION:
|
||||
if (_status_flags.condition_auto_mission_available) {
|
||||
desired_main_state = commander_state_s::MAIN_STATE_AUTO_MISSION;
|
||||
|
||||
} else {
|
||||
main_ret = TRANSITION_DENIED;
|
||||
}
|
||||
|
||||
desired_main_state = commander_state_s::MAIN_STATE_AUTO_MISSION;
|
||||
break;
|
||||
|
||||
case PX4_CUSTOM_SUB_MODE_AUTO_RTL:
|
||||
|
||||
Reference in New Issue
Block a user