forked from Archive/PX4-Autopilot
CMD_MISSION_START allow first_item=-1 to leave index unchanged
This commit is contained in:
parent
49bbd0e58d
commit
f11bb401f4
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue