From 2ec045fdc05e3cac3a026adadabce7ff168b9683 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 16 Aug 2024 22:45:51 +1000 Subject: [PATCH] Rover: emit MAV_RESULT_DENIED if start/stop item passed to MAV_CMD_MISSION_START --- Rover/GCS_Mavlink.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Rover/GCS_Mavlink.cpp b/Rover/GCS_Mavlink.cpp index ff34f55601..c620391671 100644 --- a/Rover/GCS_Mavlink.cpp +++ b/Rover/GCS_Mavlink.cpp @@ -701,6 +701,10 @@ MAV_RESULT GCS_MAVLINK_Rover::handle_command_int_packet(const mavlink_command_in packet.param4); case MAV_CMD_MISSION_START: + if (!is_zero(packet.param1) || !is_zero(packet.param2)) { + // first-item/last item not supported + return MAV_RESULT_DENIED; + } if (rover.set_mode(rover.mode_auto, ModeReason::GCS_COMMAND)) { return MAV_RESULT_ACCEPTED; }