Fix wrong reconnect logic
authorEmmanuel Lacour <elacour@easter-eggs.com>
Sat, 23 Jan 2021 18:42:15 +0000 (19:42 +0100)
committerEmmanuel Lacour <elacour@easter-eggs.com>
Sat, 23 Jan 2021 18:42:15 +0000 (19:42 +0100)
cave/cave.ino
station-meteo/station-meteo.ino

index 996154e..35b3f27 100644 (file)
@@ -73,7 +73,7 @@ void loop() {
       }
   }
 
-  if ( WiFi.status() != WL_CONNECTED ) {
+  if ( WiFi.status() == WL_CONNECTED ) {
       sensors_event_t event;
       
       dht.temperature().getEvent(&event);
index 8c25eb8..1cad984 100644 (file)
@@ -102,7 +102,7 @@ void loop(void)
       }
   }
 
-  if ( WiFi.status() != WL_CONNECTED ) {
+  if ( WiFi.status() == WL_CONNECTED ) {
       String temp_influx_line;
       String rain_influx_line;
       float rainfall_1min(0);