|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
// Use from 0 to 4. Higher number, more debugging messages and memory usage.
|
|
|
|
|
//#define _WIFIMGR_LOGLEVEL_ 4
|
|
|
|
|
#define DEBUG 1 |
|
|
|
|
//#define DEBUG 1
|
|
|
|
|
|
|
|
|
|
#include <WiFi.h> |
|
|
|
|
#include <WiFiManager.h> |
|
|
|
@ -485,7 +485,10 @@ void get_sensor_data(void) |
|
|
|
|
{ |
|
|
|
|
temp[ACT] = dht.readTemperature(); |
|
|
|
|
hum[ACT] = dht.readHumidity(); |
|
|
|
|
if (!isnan(temp[ACT]) && !isnan(hum[ACT])) |
|
|
|
|
heat[ACT] = dht.computeHeatIndex(temp[ACT], hum[ACT], false); |
|
|
|
|
else |
|
|
|
|
heat[ACT] = NAN; |
|
|
|
|
|
|
|
|
|
if (minmax_enabled == false && millis() > FIRST_MIN_MAX) |
|
|
|
|
{ |
|
|
|
@ -517,7 +520,7 @@ void get_sensor_data(void) |
|
|
|
|
{ |
|
|
|
|
if (temp[ACT] < temp[MIN]) |
|
|
|
|
temp[MIN] = temp[ACT]; |
|
|
|
|
if (temp[ACT] > temp[MAX]) |
|
|
|
|
else if (temp[ACT] > temp[MAX]) |
|
|
|
|
temp[MAX] = temp[ACT]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -525,7 +528,7 @@ void get_sensor_data(void) |
|
|
|
|
{ |
|
|
|
|
if (hum[ACT] < hum[MIN]) |
|
|
|
|
hum[MIN] = hum[ACT]; |
|
|
|
|
if (hum[ACT] > hum[MAX]) |
|
|
|
|
else if (hum[ACT] > hum[MAX]) |
|
|
|
|
hum[MAX] = hum[ACT]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -533,7 +536,7 @@ void get_sensor_data(void) |
|
|
|
|
{ |
|
|
|
|
if (heat[ACT] < heat[MIN]) |
|
|
|
|
heat[MIN] = heat[ACT]; |
|
|
|
|
if (heat[ACT] > heat[MAX]) |
|
|
|
|
else if (heat[ACT] > heat[MAX]) |
|
|
|
|
heat[MAX] = heat[ACT]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|