Set connection timeout

This commit is contained in:
Aaron Fischer 2018-06-27 19:43:34 +02:00
parent fa1d8689cb
commit 5cdaf48d36
2 changed files with 3 additions and 2 deletions

2
firmware/config.h Executable file → Normal file
View file

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

3
firmware/firmware.ino Executable file → Normal file
View file

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