mirror of https://github.com/ArduPilot/ardupilot
ArduPlane: emit MAV_RESULT_DENIED if start/stop item passed to MAV_CMD_MISSION_START
This commit is contained in:
parent
6b2f3ff591
commit
d8252d81f8
|
@ -1080,6 +1080,10 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_packet(const mavlink_command_in
|
||||||
return MAV_RESULT_FAILED;
|
return MAV_RESULT_FAILED;
|
||||||
|
|
||||||
case MAV_CMD_MISSION_START:
|
case MAV_CMD_MISSION_START:
|
||||||
|
if (!is_zero(packet.param1) || !is_zero(packet.param2)) {
|
||||||
|
// first-item/last item not supported
|
||||||
|
return MAV_RESULT_DENIED;
|
||||||
|
}
|
||||||
plane.set_mode(plane.mode_auto, ModeReason::GCS_COMMAND);
|
plane.set_mode(plane.mode_auto, ModeReason::GCS_COMMAND);
|
||||||
return MAV_RESULT_ACCEPTED;
|
return MAV_RESULT_ACCEPTED;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue