diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 524fde06c6..44107d0c8a 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -3988,7 +3988,7 @@ void GCS_MAVLINK::handle_common_message(const mavlink_message_t &msg) break; #endif -#if HAL_RALLY_ENABLED +#if AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED case MAVLINK_MSG_ID_RALLY_POINT: case MAVLINK_MSG_ID_RALLY_FETCH_POINT: handle_common_rally_message(msg); diff --git a/libraries/GCS_MAVLink/GCS_Rally.cpp b/libraries/GCS_MAVLink/GCS_Rally.cpp index 8ef69c5f6d..c19c9d55b5 100644 --- a/libraries/GCS_MAVLink/GCS_Rally.cpp +++ b/libraries/GCS_MAVLink/GCS_Rally.cpp @@ -21,7 +21,7 @@ #include #include -#if HAL_RALLY_ENABLED +#if AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED void GCS_MAVLINK::handle_rally_point(const mavlink_message_t &msg) const { @@ -105,4 +105,4 @@ void GCS_MAVLINK::handle_common_rally_message(const mavlink_message_t &msg) break; } } -#endif //#if HAL_RALLY_ENABLED +#endif // AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED diff --git a/libraries/GCS_MAVLink/GCS_config.h b/libraries/GCS_MAVLink/GCS_config.h index 8837515d5e..cea11e107c 100644 --- a/libraries/GCS_MAVLink/GCS_config.h +++ b/libraries/GCS_MAVLink/GCS_config.h @@ -49,3 +49,7 @@ #ifndef AP_MAVLINK_FAILURE_CREATION_ENABLED #define AP_MAVLINK_FAILURE_CREATION_ENABLED 1 #endif + +#ifndef AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED +#define AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED HAL_GCS_ENABLED && HAL_RALLY_ENABLED +#endif