From cfc5122e2ecb48499dcd176960db886d2a9f51bd Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Thu, 6 Jun 2019 06:57:30 +0200 Subject: [PATCH] Only debug via mqtt_log if MQTT_ENABLE is set. Also include my_mqtt.h there. --- include/config.sample.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/config.sample.h b/include/config.sample.h index a57946a..88d312b 100644 --- a/include/config.sample.h +++ b/include/config.sample.h @@ -68,8 +68,14 @@ // Stop editing here #ifdef DEBUG - #define LOG(x) mqtt_log(x); Serial.print(x); - #define LOGln(x) mqtt_log_ln(x); Serial.println(x); + #ifdef MQTT_ENABLE + #include "my_mqtt.h" + #define LOG(x) mqtt_log(x); Serial.print(x); + #define LOGln(x) mqtt_log_ln(x); Serial.println(x); + #else + #define LOG(x) Serial.print(x); + #define LOGln(x) Serial.println(x); + #endif #else #define LOG(x) do {} while(0); #define LOGln(x) do {} while(0);