mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Improvement: ECMP contactor closing (#1177)
* Add contactor closing and diagnostic commands
This commit is contained in:
parent
27ca07c6bb
commit
f44091997f
7 changed files with 2051 additions and 43 deletions
|
@ -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'; }";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue