From 811054c904d33e358db68296f1f9171529030fdd Mon Sep 17 00:00:00 2001 From: 1technophile <1technophile@users.noreply.github.com> Date: Sat, 13 Jul 2019 14:36:10 +0200 Subject: [PATCH] when using ESPWifiManualSetup a build error appear --- OpenMQTTGateway.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 924756d..c2fc3f3 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -580,12 +580,7 @@ void loop() if (reconnect()) { lastReconnectAttempt = 0; } else { - #if defined(ESP8266) || defined(ESP32) - if (!connectedOnce) { - trc(F("reseting wifi manager")); - setup_wifimanager(true); // if we didn't connected once to mqtt we reset and start in AP mode again to have a chance to change the parameters - } - #elif defined(ESPWifiManualSetup) + #if defined(ESPWifiManualSetup) trc(F("restarting ESP")); #ifdef ESP32 ESP.restart(); @@ -593,6 +588,11 @@ void loop() #ifdef ESP8266 ESP.reset(); #endif + #elif defined(ESP8266) || defined(ESP32) + if (!connectedOnce) { + trc(F("reseting wifi manager")); + setup_wifimanager(true); // if we didn't connected once to mqtt we reset and start in AP mode again to have a chance to change the parameters + } #endif } }