From 6b2f3ff59151a9bcbbb020c08653d247ffad825e Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 16 Aug 2024 22:45:50 +1000 Subject: [PATCH] ArduCopter: emit MAV_RESULT_DENIED if start/stop item passed to MAV_CMD_MISSION_START --- ArduCopter/GCS_Mavlink.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index a81ed5a46e..a096d6ecca 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -960,6 +960,10 @@ MAV_RESULT GCS_MAVLINK_Copter::handle_MAV_CMD_DO_CHANGE_SPEED(const mavlink_comm #if MODE_AUTO_ENABLED == ENABLED MAV_RESULT GCS_MAVLINK_Copter::handle_MAV_CMD_MISSION_START(const mavlink_command_int_t &packet) { + if (!is_zero(packet.param1) || !is_zero(packet.param2)) { + // first-item/last item not supported + return MAV_RESULT_DENIED; + } if (copter.set_mode(Mode::Number::AUTO, ModeReason::GCS_COMMAND)) { copter.set_auto_armed(true); if (copter.mode_auto.mission.state() != AP_Mission::MISSION_RUNNING) {