Only debug via mqtt_log if MQTT_ENABLE is set. Also include my_mqtt.h there.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Fabian Schlenz 2019-06-06 06:57:30 +02:00
parent 05aa6f7249
commit cfc5122e2e
1 changed files with 8 additions and 2 deletions

View File

@ -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);