mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Add button for NVROL reset
This commit is contained in:
parent
5859cb0504
commit
12d0bbded3
3 changed files with 24 additions and 0 deletions
|
@ -1234,6 +1234,7 @@ String advanced_battery_processor(const String& var) {
|
|||
#endif //MEB_BATTERY
|
||||
|
||||
#ifdef RENAULT_ZOE_GEN2_BATTERY
|
||||
content += "<button onclick='askTriggerNVROL()'>Perform NVROL reset</button>";
|
||||
content += "<h4>soc: " + String(datalayer_extended.zoePH2.battery_soc) + "</h4>";
|
||||
content += "<h4>usable soc: " + String(datalayer_extended.zoePH2.battery_usable_soc) + "</h4>";
|
||||
content += "<h4>soh: " + String(datalayer_extended.zoePH2.battery_soh) + "</h4>";
|
||||
|
@ -1501,6 +1502,18 @@ String advanced_battery_processor(const String& var) {
|
|||
content += "function goToMainPage() { window.location.href = '/'; }";
|
||||
content += "</script>";
|
||||
content += "<script>";
|
||||
content +=
|
||||
"function askTriggerNVROL() { if (window.confirm('Are you sure you want to trigger "
|
||||
"an NVROL reset? Battery will be unavailable for 30 seconds while this is active!')) { "
|
||||
"TriggerNVROL(); } }";
|
||||
content += "function TriggerNVROL() {";
|
||||
content += " var xhr = new XMLHttpRequest();";
|
||||
content += " xhr.open('GET', '/triggerNVROL', true);";
|
||||
content += " xhr.send();";
|
||||
content += "}";
|
||||
content += "function goToMainPage() { window.location.href = '/'; }";
|
||||
content += "</script>";
|
||||
content += "<script>";
|
||||
content +=
|
||||
"function askResetSOH() { if (window.confirm('Are you sure you want to reset degradation data? "
|
||||
"Note this should only be used on 2011-2017 24/30kWh batteries!')) { "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue