diff --git a/libraries/AP_HAL/GPIO.cpp b/libraries/AP_HAL/GPIO.cpp index 603b16b58c..15f66ae9c0 100644 --- a/libraries/AP_HAL/GPIO.cpp +++ b/libraries/AP_HAL/GPIO.cpp @@ -1,12 +1,15 @@ #include "GPIO.h" #include -#if defined(HAL_NO_GCS) || defined(HAL_BOOTLOADER_BUILD) -#define GCS_SEND_TEXT(severity, format, args...) -#else + +#ifndef HAL_BOOTLOADER_BUILD #include #endif +#ifndef GCS_SEND_TEXT +#define GCS_SEND_TEXT(severity, format, args...) +#endif + extern const AP_HAL::HAL& hal; bool AP_HAL::PWMSource::set_pin(int16_t new_pin, const char *subsystem) diff --git a/libraries/AP_HAL/utility/packetise.cpp b/libraries/AP_HAL/utility/packetise.cpp index 67e1584a55..499c8a5eaf 100644 --- a/libraries/AP_HAL/utility/packetise.cpp +++ b/libraries/AP_HAL/utility/packetise.cpp @@ -8,6 +8,8 @@ #include #include "packetise.h" +#if HAL_GCS_ENABLED + /* return the number of bytes to send for a packetised connection */ @@ -68,3 +70,5 @@ uint16_t mavlink_packetise(ByteBuffer &writebuf, uint16_t n) return n; } #endif // HAL_BOOTLOADER_BUILD + +#endif // HAL_GCS_ENABLED