Support for RTL and Delay mission commands

This commit is contained in:
Don Gagne
2017-04-16 17:07:19 -07:00
committed by Lorenz Meier
parent 3721fb9d52
commit 96458d3184
7 changed files with 28 additions and 3 deletions
+3 -1
View File
@@ -1069,6 +1069,7 @@ bool handle_command(struct vehicle_status_s *status_local, const struct safety_s
break;
case vehicle_command_s::VEHICLE_CMD_NAV_RETURN_TO_LAUNCH: {
/* switch to RTL which ends the mission */
if (TRANSITION_CHANGED == main_state_transition(&status, commander_state_s::MAIN_STATE_AUTO_RTL, main_state_prev, &status_flags, &internal_state)) {
mavlink_and_console_log_info(&mavlink_log_pub, "Returning to launch");
cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED;
@@ -1183,7 +1184,8 @@ bool handle_command(struct vehicle_status_s *status_local, const struct safety_s
case vehicle_command_s::VEHICLE_CMD_START_RX_PAIR:
case vehicle_command_s::VEHICLE_CMD_LOGGING_START:
case vehicle_command_s::VEHICLE_CMD_LOGGING_STOP:
/* ignore commands that handled in low prio loop */
case vehicle_command_s::VEHICLE_CMD_NAV_DELAY:
/* ignore commands that handled in low prio loop */
break;
default: