From dd58310fe9ff125bbaee01ba399860e7dfaf4c67 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 29 May 2021 22:07:47 +0200 Subject: [PATCH] make sensor address compare actually work --- esp32/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32/src/main.cpp b/esp32/src/main.cpp index b56c51c..4a04b9b 100644 --- a/esp32/src/main.cpp +++ b/esp32/src/main.cpp @@ -230,7 +230,7 @@ void readOneWireSensors(bool withMQTT) if (valid) { Serial << "DS18S20 Temperatur " << String(buf) << " : " << temp << " °C " << endl; - if (String(lipoSensorAddr.get()).compareTo(String(buf))) + if (strcmp(lipoSensorAddr.get(),buf) == 0) { if (withMQTT) { @@ -238,7 +238,7 @@ void readOneWireSensors(bool withMQTT) } Serial << "Lipo Temperatur " << temp << " °C " << endl; } - else if (String(waterSensorAddr.get()).compareTo(String(buf))) + if (strcmp(waterSensorAddr.get(),buf) == 0) { if (withMQTT) {