From 0d90091a2a6cb6be0ea1cc5aba588ee56dcd3458 Mon Sep 17 00:00:00 2001 From: gemi254 Date: Thu, 4 Apr 2024 15:10:03 +0300 Subject: [PATCH] Fixed float dht temperature --- src/sensors.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sensors.h b/src/sensors.h index 40cb08d..1a33862 100644 --- a/src/sensors.h +++ b/src/sensors.h @@ -6,14 +6,15 @@ bool initDHTsensor(){ int i = 5; while (i--) { // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor) + //float t = pDht->readTemperature(false); float h = pDht->readHumidity(); - //float t = pDht->readTemperature(false,true); if (isnan(h)) { LOG_E("Failed to read from DHT sensor!\n"); // Wait a few seconds between measurements. delay(500); }else{ - LOG_E("Probe DHT sensor h: %3.1f\n", h); + LOG_E("Probe DHT sensor h: %3.1f",h); + //LOG_E("Probe DHT sensor t: %3.1f, h: %3.1f\n",t, h); return true; } }