replace defined on ESP by wifi manual setup macro
indeed if we use ESPWifiManualSetup we don't need wifimanager and its reset button
This commit is contained in:
1 parent
21773300ec
commit
64313db6cb
1 file changed
+3
-3
+3
-3
@@ -406,7 +406,7 @@ void pub(String topic, unsigned long payload){
|
|||||||
|
|
||||||
void reconnect() {
|
void reconnect() {
|
||||||
|
|
||||||
#if defined(ESP8266) || defined(ESP32)
|
#ifndef ESPWifiManualSetup
|
||||||
checkButton(); // check if a reset of wifi/mqtt settings is asked
|
checkButton(); // check if a reset of wifi/mqtt settings is asked
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ void reconnect() {
|
|||||||
trc(failure_number);
|
trc(failure_number);
|
||||||
if (failure_number > maxMQTTretry && !connectedOnce){
|
if (failure_number > maxMQTTretry && !connectedOnce){
|
||||||
trc(F("failed connecting first time to mqtt, reset wifi manager"));
|
trc(F("failed connecting first time to mqtt, reset wifi manager"));
|
||||||
#if defined(ESP8266) || defined(ESP32)
|
#ifndef ESPWifiManualSetup
|
||||||
setup_wifimanager(true);
|
setup_wifimanager(true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -877,7 +877,7 @@ void setup_ethernet() {
|
|||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
#if defined(ESP8266) || defined(ESP32)
|
#ifndef ESPWifiManualSetup
|
||||||
checkButton(); //check reset button state
|
checkButton(); //check reset button state
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user