[ONB] Fix failsafe mode (#2080)

Erasing the nvs before the start of WM prevent WM from starting, revert a part of #2075
Also remove the erase from setupWiFiManager method

Co-authored-by: Florian <1technophile@users.noreply.github.com>
This commit is contained in:
FlorianandFlorian authored and GitHub committed 2024-10-04 17:02:50 -05:00
1 parent 4e090eda3c
commit 898b5e6213
2 files changed
+12 -19

No files matched your search

+2 -1
View File
@@ -64,6 +64,7 @@ void MeasureGPIOInput() {
resetTime = millis();
} else if ((millis() - resetTime) > 3000) {
Log.trace(F("Button Held" CR));
gatewayState = GatewayState::WAITING_ONBOARDING;
// Switching off the relay during reset or failsafe operations
# ifdef ZactuatorONOFF
uint8_t level = digitalRead(ACTUATOR_ONOFF_GPIO);
@@ -72,7 +73,7 @@ void MeasureGPIOInput() {
}
# endif
Log.notice(F("Erasing ESP Config, restarting" CR));
setupWiFiManager(true);
erase(true);
}
} else {
resetTime = 0;