From 9a19a86a813b9b3435b889cd56b63fe949cebaff Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Sun, 20 Jun 2021 11:51:27 +0530 Subject: [PATCH] GCS_MAVLink: omit code that breaks build for herepro --- libraries/GCS_MAVLink/GCS_Common.cpp | 4 ++++ libraries/GCS_MAVLink/GCS_Rally.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 3b55d19e72..2bd9fd2977 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -3470,7 +3470,9 @@ void GCS_MAVLINK::handle_common_message(const mavlink_message_t &msg) case MAVLINK_MSG_ID_RALLY_POINT: case MAVLINK_MSG_ID_RALLY_FETCH_POINT: +#if HAL_RALLY_ENABLED handle_common_rally_message(msg); +#endif break; case MAVLINK_MSG_ID_REQUEST_DATA_STREAM: @@ -5375,9 +5377,11 @@ uint64_t GCS_MAVLINK::capabilities() const ret |= MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION; } +#if HAL_RALLY_ENABLED if (AP::rally()) { ret |= MAV_PROTOCOL_CAPABILITY_MISSION_RALLY; } +#endif if (AP::fence()) { ret |= MAV_PROTOCOL_CAPABILITY_MISSION_FENCE; diff --git a/libraries/GCS_MAVLink/GCS_Rally.cpp b/libraries/GCS_MAVLink/GCS_Rally.cpp index 86b573a945..8ef69c5f6d 100644 --- a/libraries/GCS_MAVLink/GCS_Rally.cpp +++ b/libraries/GCS_MAVLink/GCS_Rally.cpp @@ -21,6 +21,8 @@ #include #include +#if HAL_RALLY_ENABLED + void GCS_MAVLINK::handle_rally_point(const mavlink_message_t &msg) const { AP_Rally *r = AP::rally(); @@ -103,3 +105,4 @@ void GCS_MAVLINK::handle_common_rally_message(const mavlink_message_t &msg) break; } } +#endif //#if HAL_RALLY_ENABLED