Improve wifi connection management (#471)

-avoid issues with WIFI automatic reconnection on ESP32
-avoid reset of ESP32 when wifi is disconnected
-enable to erase the wifi/mqtt settings if; the mqtt broker wasn't connected once or if the TRIGGER_PIN is pushed for a long time >10s
This commit is contained in:
Florian authored and GitHub committed 2019-10-19 21:59:46 +02:00
1 parent d7deb682e7
commit d196f387ae
4 files changed
+198 -147

No files matched your search

+7 -1
View File
@@ -123,7 +123,13 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
// VCC ------------D|-----------/\/\/\/\ ----------------- Arduino PIN
// LED Resistor 270-510R
#ifndef TRIGGER_PIN
#ifdef ESP8266
#define TRIGGER_PIN 14 // pin D5 as full reset button (long press >10s)
#elif ESP32
#define TRIGGER_PIN 0 // boot button as full reset button (long press >10s)
#endif
#endif
/*----------------------------OTHER PARAMETERS-----------------------------*/
#ifdef ZgatewaySRFB