CMD_MISSION_START allow first_item=-1 to leave index unchanged

This commit is contained in:
Daniel Agar 2017-07-08 12:23:56 -04:00 committed by Lorenz Meier
parent 49bbd0e58d
commit f11bb401f4
1 changed files with 1 additions and 1 deletions

View File

@ -1162,7 +1162,7 @@ bool handle_command(struct vehicle_status_s *status_local, const struct safety_s
if (_mission_result.valid) {
// requested first mission item valid
if (PX4_ISFINITE(cmd->param1) && (cmd->param1 >= 0) && (cmd->param1 < _mission_result.seq_total)) {
if (PX4_ISFINITE(cmd->param1) && (cmd->param1 >= -1) && (cmd->param1 < _mission_result.seq_total)) {
// switch to AUTO_MISSION and ARM
if ((TRANSITION_DENIED != main_state_transition(status_local, commander_state_s::MAIN_STATE_AUTO_MISSION, main_state_prev, &status_flags, &internal_state))