GCS_MAVLink: warn on use of old fence point / rally point protocols

This commit is contained in:
Peter Barker 2024-06-06 09:57:52 +10:00 committed by Andrew Tridgell
parent c5f902919e
commit 9c42a5d9dd
2 changed files with 6 additions and 0 deletions

View File

@ -4081,6 +4081,7 @@ void GCS_MAVLINK::handle_message(const mavlink_message_t &msg)
#if AC_POLYFENCE_FENCE_POINT_PROTOCOL_SUPPORT #if AC_POLYFENCE_FENCE_POINT_PROTOCOL_SUPPORT
case MAVLINK_MSG_ID_FENCE_POINT: case MAVLINK_MSG_ID_FENCE_POINT:
case MAVLINK_MSG_ID_FENCE_FETCH_POINT: case MAVLINK_MSG_ID_FENCE_FETCH_POINT:
send_received_message_deprecation_warning("FENCE_FETCH_POINT");
handle_fence_message(msg); handle_fence_message(msg);
break; break;
#endif #endif
@ -4162,6 +4163,7 @@ void GCS_MAVLINK::handle_message(const mavlink_message_t &msg)
#if AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED #if AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED
case MAVLINK_MSG_ID_RALLY_POINT: case MAVLINK_MSG_ID_RALLY_POINT:
case MAVLINK_MSG_ID_RALLY_FETCH_POINT: case MAVLINK_MSG_ID_RALLY_FETCH_POINT:
send_received_message_deprecation_warning("RALLY_FETCH_POINT");
handle_common_rally_message(msg); handle_common_rally_message(msg);
break; break;
#endif #endif

View File

@ -58,6 +58,10 @@
#define AP_MAVLINK_FAILURE_CREATION_ENABLED 1 #define AP_MAVLINK_FAILURE_CREATION_ENABLED 1
#endif #endif
// CODE_REMOVAL
// ArduPilot 4.6 sends deprecation warnings for RALLY_POINT/RALLY_FETCH_POINT
// ArduPilot 4.7 stops compiling them in by default
// ArduPilot 4.8 removes the code entirely
#ifndef AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED #ifndef AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED
#define AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED HAL_GCS_ENABLED && HAL_RALLY_ENABLED #define AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED HAL_GCS_ENABLED && HAL_RALLY_ENABLED
#endif #endif