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...
This commit is contained in:
Peter Barker 2025-01-02 22:11:47 +11:00
parent e1fd90bc6c
commit 98e8ab2b8a
2 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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