From 98e8ab2b8ad5aca017efa75a715947c05e7f7c7a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 2 Jan 2025 22:11:47 +1100 Subject: [PATCH] GCS_MAVLink: emit warning when MISSION_SET_CURRENT received slated to be removed - everybody should be using the command which was added 5 years ago... --- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- libraries/GCS_MAVLink/GCS_config.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 8fb6bc3f8f..2895c45683 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -709,7 +709,7 @@ void GCS_MAVLINK::send_mission_current(const class AP_Mission &mission, uint16_t */ void GCS_MAVLINK::handle_mission_set_current(AP_Mission &mission, const mavlink_message_t &msg) { - // send_received_message_deprecation_warning("MISSION_SET_CURRENT"); + send_received_message_deprecation_warning("MISSION_SET_CURRENT"); // decode mavlink_mission_set_current_t packet; diff --git a/libraries/GCS_MAVLink/GCS_config.h b/libraries/GCS_MAVLink/GCS_config.h index 8a297bb003..847df8d359 100644 --- a/libraries/GCS_MAVLink/GCS_config.h +++ b/libraries/GCS_MAVLink/GCS_config.h @@ -29,6 +29,10 @@ // removed. It has signficant deficiencies vs MAV_CMD_DO_SET_CURRENT. // The command was added to the spec in January 2019 and to MAVLink in // ArduPilot in 4.1.x +// CODE_REMOVAL +// ArduPilot 4.7 warns if the message is received +// ArduPilot 4.8 compiles the code out +// ArduPilot 4.9 removes the code entirely #ifndef AP_MAVLINK_MISSION_SET_CURRENT_ENABLED #define AP_MAVLINK_MISSION_SET_CURRENT_ENABLED AP_MISSION_ENABLED #endif