Improvement: ECMP contactor closing (#1177)

* Add contactor closing and diagnostic commands
This commit is contained in:
Daniel Öster 2025-06-12 12:55:31 +03:00 committed by GitHub
parent 27ca07c6bb
commit f44091997f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 2051 additions and 43 deletions

View file

@ -480,7 +480,7 @@ void init_webserver() {
if (request->hasParam("stop")) {
String valueStr = request->getParam("stop")->value();
if (valueStr == "true" || valueStr == "1") {
setBatteryPause(true, false, true);
setBatteryPause(true, false, true); //Pause battery, do not pause CAN, equipment stop on (store to flash)
} else {
setBatteryPause(false, false, false);
}
@ -1444,7 +1444,7 @@ String processor(const String& var) {
content +=
"<br/><br/><button style=\"background:red;color:white;cursor:pointer;\""
" onclick=\""
"if(confirm('This action will open contactors on the battery and stop all CAN communications. Are you "
"if(confirm('This action will attempt to open contactors on the battery. Are you "
"sure?')) { estop(true); }\""
">Open Contactors</button><br/>";
else
@ -1452,7 +1452,8 @@ String processor(const String& var) {
"<br/><br/><button style=\"background:green;color:white;cursor:pointer;\""
"20px;font-size:16px;font-weight:bold;cursor:pointer;border-radius:5px; margin:10px;"
" onclick=\""
"if(confirm('This action will restore the battery state. Are you sure?')) { estop(false); }\""
"if(confirm('This action will attempt to close contactors and enable power transfer. Are you sure?')) { "
"estop(false); }\""
">Close Contactors</button><br/>";
content += "<script>";
content += "function OTA() { window.location.href = '/update'; }";