Browse Source

Set connection timeout

Aaron Fischer 2 years ago
parent
commit
5cdaf48d36
2 changed files with 3 additions and 2 deletions
  1. 1
    1
      firmware/config.h
  2. 2
    1
      firmware/firmware.ino

+ 1
- 1
firmware/config.h View File

@@ -1,5 +1,5 @@
1 1
 
2
-//#define DEBUG 1
2
+#define DEBUG 1
3 3
 
4 4
 #define SENSOR_TEMPERATURE    0
5 5
 #define SENSOR_HUMIDITY       1

+ 2
- 1
firmware/firmware.ino View File

@@ -60,6 +60,7 @@ void setup() {
60 60
   // Establish WiFi connection
61 61
   String wifiName = "oko-weather-" + String(ESP.getChipId());
62 62
   wifiManager.setMinimumSignalQuality(15);
63
+  wifiManager.setConnectTimeout(60);
63 64
   if (!wifiManager.autoConnect(wifiName.c_str(), "DEADBEEF")) {
64 65
 #ifdef DEBUG
65 66
     Serial.println("WiFi connection failed, we reboot ...");
@@ -135,4 +136,4 @@ void loop() {
135 136
 }
136 137
 
137 138
 //*************************************************************************//
138
-
139
+

Loading…
Cancel
Save