diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index fadf622bdc..1f5ec42104 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -4121,9 +4121,13 @@ void GCS_MAVLINK::handle_message(const mavlink_message_t &msg) #endif #if AP_GPS_ENABLED +#if AP_MAVLINK_MSG_HIL_GPS_ENABLED + case MAVLINK_MSG_ID_HIL_GPS: + send_received_message_deprecation_warning("HIL_GPS"); + FALLTHROUGH; +#endif case MAVLINK_MSG_ID_GPS_RTCM_DATA: case MAVLINK_MSG_ID_GPS_INPUT: - case MAVLINK_MSG_ID_HIL_GPS: case MAVLINK_MSG_ID_GPS_INJECT_DATA: AP::gps().handle_msg(chan, msg); break; diff --git a/libraries/GCS_MAVLink/GCS_config.h b/libraries/GCS_MAVLink/GCS_config.h index 64877c1064..ceb24e5c75 100644 --- a/libraries/GCS_MAVLink/GCS_config.h +++ b/libraries/GCS_MAVLink/GCS_config.h @@ -59,6 +59,12 @@ #define AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED HAL_GCS_ENABLED && HAL_RALLY_ENABLED #endif +// handling of HIL_GPS is slated to be removed in 4.7; GPS_INPUT can be used +// in its place +#ifndef AP_MAVLINK_MSG_HIL_GPS_ENABLED +#define AP_MAVLINK_MSG_HIL_GPS_ENABLED 0 +#endif + #ifndef AP_MAVLINK_MSG_MOUNT_CONFIGURE_ENABLED #define AP_MAVLINK_MSG_MOUNT_CONFIGURE_ENABLED HAL_GCS_ENABLED #endif