A bit less logging from mqtt.cpp.

This commit is contained in:
Fabian Schlenz 2020-04-30 06:42:18 +02:00
parent 10be8ef7cc
commit caa86551a0
1 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
if (topic.startsWith(MQTT_TOPIC_WEATHER)) { if (topic.startsWith(MQTT_TOPIC_WEATHER)) {
// Weather stuff // Weather stuff
topic.remove(0, strlen(MQTT_TOPIC_WEATHER)); topic.remove(0, strlen(MQTT_TOPIC_WEATHER));
LOGln("MQTT * Weather stuff."); DBG("MQTT * Weather stuff.");
if (topic.startsWith("icons/")) { if (topic.startsWith("icons/")) {
topic.remove(0, 6); topic.remove(0, 6);
uint8_t id = topic.toInt(); uint8_t id = topic.toInt();
@ -39,7 +39,7 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
uint8_t val = payload.toInt(); uint8_t val = payload.toInt();
if (val==0) return; if (val==0) return;
weather_icon_ids[id] = val; weather_icon_ids[id] = val;
LOGln("Set weather_icon_ids[%d] to value %d", id, val); DBG("Set weather_icon_ids[%d] to value %d", id, val);
} else if (topic.startsWith("temperatures/")) { } else if (topic.startsWith("temperatures/")) {
topic.remove(0, 13); topic.remove(0, 13);
uint8_t id = topic.toInt(); uint8_t id = topic.toInt();
@ -47,7 +47,7 @@ void mqtt_callback(char* original_topic, byte* pl, unsigned int length) {
uint8_t val = payload.toInt(); uint8_t val = payload.toInt();
if (val==0) return; if (val==0) return;
weather_temperatures[id] = val; weather_temperatures[id] = val;
LOGln("Set weather_temperatures[%d] to value %d", id, val); DBG("Set weather_temperatures[%d] to value %d", id, val);
} }
return; return;
} else if (topic.equals(MQTT_TOPIC_TIMER)) { } else if (topic.equals(MQTT_TOPIC_TIMER)) {