mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Feature: Add Tesla BMS ECU reset, basic UDS response logging
This commit is contained in:
parent
9a8c1f1f77
commit
a5c99488dd
4 changed files with 104 additions and 6 deletions
|
@ -657,6 +657,7 @@ String advanced_battery_processor(const String& var) {
|
|||
|
||||
//Buttons for user action
|
||||
content += "<button onclick='askClearIsolation()'>Clear isolation fault</button>";
|
||||
content += "<button onclick='askBMSReset()'>BMS reset</button>";
|
||||
//0x20A 522 HVP_contatorState
|
||||
content += "<h4>Contactor Status: " + String(contactorText[datalayer_extended.tesla.status_contactor]) + "</h4>";
|
||||
content += "<h4>HVIL: " + String(hvilStatusState[datalayer_extended.tesla.hvil_status]) + "</h4>";
|
||||
|
@ -683,7 +684,7 @@ String advanced_battery_processor(const String& var) {
|
|||
sizeof(datalayer_extended.tesla.BMS_SerialNumber));
|
||||
readableSerialNumber[14] = '\0'; // Null terminate the string
|
||||
content += "<h4>BMS Serial number: " + String(readableSerialNumber) + "</h4>";
|
||||
// Comment what data you would like to dislay, order can be changed.
|
||||
// Comment what data you would like to display, order can be changed.
|
||||
//0x352 850 BMS_energyStatus
|
||||
if (datalayer_extended.tesla.BMS352_mux == false) {
|
||||
content += "<h3>BMS 0x352 w/o mux</h3>"; //if using older BMS <2021 and comment 0x352 without MUX
|
||||
|
@ -1464,6 +1465,18 @@ String advanced_battery_processor(const String& var) {
|
|||
content += "function goToMainPage() { window.location.href = '/'; }";
|
||||
content += "</script>";
|
||||
content += "<script>";
|
||||
content +=
|
||||
"function askBMSReset() { if (window.confirm('Are you sure you want to reset the BMS "
|
||||
"ECU?')) { "
|
||||
"bmsECUReset(); } }";
|
||||
content += "function bmsECUReset() {";
|
||||
content += " var xhr = new XMLHttpRequest();";
|
||||
content += " xhr.open('GET', '/bmsECUReset', 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