[SYS] Add failsafe mode (#1673)
A press at start during more than 30s after a previous reset will start the board in failsafe mode
This commit is contained in:
1 parent
b6df2006bf
commit
f31ed28df7
3 files changed
+52
-19
No files matched your search
@@ -66,6 +66,15 @@ void MeasureGPIOInput() {
|
||||
resetTime = millis();
|
||||
} else if ((millis() - resetTime) > 3000) {
|
||||
Log.trace(F("Button Held" CR));
|
||||
InfoIndicatorOFF();
|
||||
SendReceiveIndicatorOFF();
|
||||
// Switching off the relay during reset or failsafe operations
|
||||
# ifdef ZactuatorONOFF
|
||||
uint8_t level = digitalRead(ACTUATOR_ONOFF_GPIO);
|
||||
if (level == ACTUATOR_ON) {
|
||||
ActuatorTrigger();
|
||||
}
|
||||
# endif
|
||||
Log.notice(F("Erasing ESP Config, restarting" CR));
|
||||
setup_wifimanager(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user