master
Holger Wirtz 4 years ago
parent a1c052308a
commit e49e58fbbb
  1. 16
      WLAN_Thermometer.ino

@ -34,9 +34,9 @@
LiquidCrystal_I2C lcd(LCD_I2C_ADDR, LCD_COL, LCD_ROW);
looper sched;
float temp[3];
float hum[3];
float heat[3];
float temp[3] = { NAN, NAN, NAN };
float hum[3] = { NAN, NAN, NAN };
float heat[3] = { NAN, NAN, NAN };
bool led_state;
String header;
WiFiServer server(80);
@ -377,6 +377,7 @@ void show_time(void)
{
strcpy(date_string, "--:--:----");
strcpy(time_string, "--:--:--");
DateTime.forceUpdate();
}
if (strcmp(date_string, date_string_old))
@ -491,10 +492,10 @@ void get_sensor_data(void)
heat[ACT] = NAN;
if (minmax_enabled == false && millis() > FIRST_MIN_MAX)
{
if (!isnan(temp[ACT]) && !isnan(hum[ACT]) && !isnan(heat[ACT]))
minmax_enabled = true;
minmax_enabled = true;
if (minmax_enabled == false)
{
if (!isnan(temp[ACT]))
{
temp[MIN] = temp[ACT];
@ -513,8 +514,7 @@ void get_sensor_data(void)
heat[MIN] = heat[ACT];
}
}
if (minmax_enabled == true)
else
{
if (!isnan(temp[ACT]))
{

Loading…
Cancel
Save