diff --git a/src/protocols/MQTT/MQTT.cpp b/src/protocols/MQTT/MQTT.cpp index 92583cbb..cc561157 100644 --- a/src/protocols/MQTT/MQTT.cpp +++ b/src/protocols/MQTT/MQTT.cpp @@ -1,4 +1,5 @@ #include "MQTT.h" +#if !defined(RADIOLIB_EXCLUDE_MQTT) MQTTClient::MQTTClient(TransportLayer* tl, uint16_t port) { _tl = tl; @@ -469,3 +470,5 @@ uint32_t MQTTClient::decodeLength(uint8_t* encoded) { } while((encoded[i] & 128) != 0); return len; } + +#endif diff --git a/src/protocols/MQTT/MQTT.h b/src/protocols/MQTT/MQTT.h index b7a94bdb..efc40d3a 100644 --- a/src/protocols/MQTT/MQTT.h +++ b/src/protocols/MQTT/MQTT.h @@ -1,4 +1,4 @@ -#ifndef _RADIOLIB_MQTT_H +#if !defined(_RADIOLIB_MQTT_H) && !defined(RADIOLIB_EXCLUDE_MQTT) #define _RADIOLIB_MQTT_H #include "../../TypeDef.h"