Un commented the code that restores an STA connection
This commit is contained in:
parent
8a237059fd
commit
13fb3f715a
2 changed files with 7 additions and 3 deletions
|
@ -404,7 +404,7 @@ void setup() {
|
||||||
|
|
||||||
#if USE_WIFI == 1
|
#if USE_WIFI == 1
|
||||||
|
|
||||||
sCredentials creds = NVstore.getCredentials();
|
sCredentials creds = NVstore.getCredentials(); // local AP credentials
|
||||||
|
|
||||||
if(NVstore.getUserSettings().enableWifi) {
|
if(NVstore.getUserSettings().enableWifi) {
|
||||||
initWifi(WiFi_TriggerPin, creds.SSID, creds.APpassword);
|
initWifi(WiFi_TriggerPin, creds.SSID, creds.APpassword);
|
||||||
|
|
|
@ -146,7 +146,9 @@ void doWiFiManager()
|
||||||
{
|
{
|
||||||
wm.process();
|
wm.process();
|
||||||
|
|
||||||
/* if(WiFi.status() != WL_CONNECTED) {
|
if(WiFi.status() != WL_CONNECTED) {
|
||||||
|
if(isSTA) DebugPort.println("STA lost");
|
||||||
|
isSTA = false;
|
||||||
if(WifiReconnectHoldoff) {
|
if(WifiReconnectHoldoff) {
|
||||||
long tDelta = millis() - WifiReconnectHoldoff;
|
long tDelta = millis() - WifiReconnectHoldoff;
|
||||||
if(tDelta >= 0) {
|
if(tDelta >= 0) {
|
||||||
|
@ -163,8 +165,10 @@ void doWiFiManager()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if(!isSTA) DebugPort.println("STA established");
|
||||||
|
isSTA = true;
|
||||||
WifiReconnectHoldoff = 0;
|
WifiReconnectHoldoff = 0;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
#if USE_PORTAL_TRIGGER_PIN == 1
|
#if USE_PORTAL_TRIGGER_PIN == 1
|
||||||
// manage handling of pin to enter WiFManager config portal
|
// manage handling of pin to enter WiFManager config portal
|
||||||
|
|
Loading…
Reference in a new issue