From c39ebc8e544ecf72d61d8dcd7ecd5b1b0c1054d6 Mon Sep 17 00:00:00 2001 From: Ollo Date: Sat, 4 Dec 2021 23:24:30 +0100 Subject: [PATCH] Serial debugging enabled --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3ac5b73..600955e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -242,7 +242,9 @@ void bmpPublishValues() { gasNode.setProperty(NODE_GAS).send(String((bmx.gas_resistance / 1000.0))); humidityNode.setProperty(NODE_HUMIDITY).send(String(bmx.humidity)); #endif - + log(MQTT_LEVEL_DEBUG, String("Temp" + String(bmx.readTemperature()) + "\tPressure:" + + String(bmx.readPressure() / 100.0F) + "\t Altitude:"+ + String(bmx.readAltitude(SEALEVELPRESSURE_HPA))), MQTT_LOG_I2READ); if ( (rgbTemp.get()) && (!mSomethingReceived) ) { if (bmx.readTemperature() < TEMPBORDER) { strip.setPixelColor(0, strip.Color(0,0,255)); @@ -466,4 +468,5 @@ void log(int level, String message, int statusCode) Homie.getMqttClient().publish(logTopic, 2, false, buffer.c_str()); delete logTopic; } + Homie.getLogger() << (level) << "@" << (statusCode) << " " << (message) << endl; }