mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
stop equipment before reboot
This commit is contained in:
parent
ed912f349f
commit
7b3594c248
3 changed files with 13 additions and 5 deletions
|
@ -344,7 +344,10 @@ void init_webserver() {
|
|||
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password))
|
||||
return request->requestAuthentication();
|
||||
request->send(200, "text/plain", "Rebooting server...");
|
||||
//TODO: Should we handle contactors gracefully? Ifdef CONTACTOR_CONTROL then what?
|
||||
|
||||
//Equipment STOP without persisting the emergency state before restart
|
||||
// Max Charge/Discharge = 0; CAN = stop; contactors = open
|
||||
setBatteryPause(true, true, true, false);
|
||||
delay(1000);
|
||||
ESP.restart();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue