changed restart behaviour after Firmware-Update
This commit is contained in:
@@ -735,8 +735,19 @@ void toggleWiFiAP(boolean shutdown)
|
||||
|
||||
void SystemShutdown()
|
||||
{
|
||||
StoreConfig_EEPROM();
|
||||
ESP.restart();
|
||||
static uint32_t shutdown_delay = 0;
|
||||
|
||||
if (shutdown_delay == 0)
|
||||
{
|
||||
shutdown_delay = millis() + SHUTDOWN_DELAY_MS;
|
||||
Serial.printf("Shutdown requested - Restarting in %d seconds\n", SHUTDOWN_DELAY_MS);
|
||||
}
|
||||
if (shutdown_delay < millis())
|
||||
{
|
||||
StoreConfig_EEPROM();
|
||||
StorePersistence_EEPROM();
|
||||
ESP.restart();
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t Process_Impulse_WheelSpeed()
|
||||
|
Reference in New Issue
Block a user