mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 18:29:48 +02:00
Add files via upload
This commit is contained in:
parent
bdc297048a
commit
09e5436cea
2 changed files with 119 additions and 1 deletions
|
@ -1321,10 +1321,101 @@ String advanced_battery_processor(const String& var) {
|
||||||
content += "<button onclick='Volvo_BECMecuReset()'>Restart BECM module</button>";
|
content += "<button onclick='Volvo_BECMecuReset()'>Restart BECM module</button>";
|
||||||
#endif // VOLVO_SPA_BATTERY
|
#endif // VOLVO_SPA_BATTERY
|
||||||
|
|
||||||
|
#ifdef VOLVO_SPA_HYBRID_BATTERY
|
||||||
|
content += "<h4>BECM reported SOC: " + String(datalayer_extended.VolvoHybrid.soc_bms) + "</h4>";
|
||||||
|
content += "<h4>Calculated SOC: " + String(datalayer_extended.VolvoHybrid.soc_calc) + "</h4>";
|
||||||
|
content += "<h4>Rescaled SOC: " + String(datalayer_extended.VolvoHybrid.soc_rescaled / 10) + "</h4>";
|
||||||
|
content += "<h4>BECM reported SOH: " + String(datalayer_extended.VolvoHybrid.soh_bms) + "</h4>";
|
||||||
|
content += "<h4>BECM supply voltage: " + String(datalayer_extended.VolvoHybrid.BECMsupplyVoltage) + " mV</h4>";
|
||||||
|
|
||||||
|
content += "<h4>HV voltage: " + String(datalayer_extended.VolvoHybrid.BECMBatteryVoltage) + " V</h4>";
|
||||||
|
content += "<h4>HV current: " + String(datalayer_extended.VolvoHybrid.BECMBatteryCurrent) + " A</h4>";
|
||||||
|
content += "<h4>Dynamic max voltage: " + String(datalayer_extended.VolvoHybrid.BECMUDynMaxLim) + " V</h4>";
|
||||||
|
content += "<h4>Dynamic min voltage: " + String(datalayer_extended.VolvoHybrid.BECMUDynMinLim) + " V</h4>";
|
||||||
|
|
||||||
|
content +=
|
||||||
|
"<h4>Discharge power limit 1: " + String(datalayer_extended.VolvoHybrid.HvBattPwrLimDcha1) + " kW</h4>";
|
||||||
|
content +=
|
||||||
|
"<h4>Discharge soft power limit: " + String(datalayer_extended.VolvoHybrid.HvBattPwrLimDchaSoft) + " kW</h4>";
|
||||||
|
|
||||||
|
content += "<h4>HV system relay status: ";
|
||||||
|
switch (datalayer_extended.VolvoHybrid.HVSysRlySts) {
|
||||||
|
case 0:
|
||||||
|
content += String("Open");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
content += String("Closed");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
content += String("KeepStatus");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
content += String("OpenAndRequestActiveDischarge");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
content += String("Not valid");
|
||||||
|
}
|
||||||
|
content += "</h4><h4>HV system relay status 1: ";
|
||||||
|
switch (datalayer_extended.VolvoHybrid.HVSysDCRlySts1) {
|
||||||
|
case 0:
|
||||||
|
content += String("Open");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
content += String("Closed");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
content += String("KeepStatus");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
content += String("Fault");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
content += String("Not valid");
|
||||||
|
}
|
||||||
|
content += "</h4><h4>HV system relay status 2: ";
|
||||||
|
switch (datalayer_extended.VolvoHybrid.HVSysDCRlySts2) {
|
||||||
|
case 0:
|
||||||
|
content += String("Open");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
content += String("Closed");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
content += String("KeepStatus");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
content += String("Fault");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
content += String("Not valid");
|
||||||
|
}
|
||||||
|
content += "</h4><h4>HV system isolation resistance monitoring status: ";
|
||||||
|
switch (datalayer_extended.VolvoHybrid.HVSysIsoRMonrSts) {
|
||||||
|
case 0:
|
||||||
|
content += String("Not valid 1");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
content += String("False");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
content += String("True");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
content += String("Not valid 2");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
content += String("Not valid");
|
||||||
|
}
|
||||||
|
|
||||||
|
content += "<br><br><button onclick='Volvo_askEraseDTC()'>Erase DTC</button><br>";
|
||||||
|
content += "<button onclick='Volvo_askReadDTC()'>Read DTC (result must be checked in CANlog)</button><br>";
|
||||||
|
content += "<button onclick='Volvo_BECMecuReset()'>Restart BECM module</button>";
|
||||||
|
#endif // VOLVO_SPA_HYBRID_BATTERY
|
||||||
|
|
||||||
#if !defined(BMW_PHEV_BATTERY) && !defined(BMW_IX_BATTERY) && !defined(BOLT_AMPERA_BATTERY) && \
|
#if !defined(BMW_PHEV_BATTERY) && !defined(BMW_IX_BATTERY) && !defined(BOLT_AMPERA_BATTERY) && \
|
||||||
!defined(TESLA_BATTERY) && !defined(NISSAN_LEAF_BATTERY) && !defined(BMW_I3_BATTERY) && \
|
!defined(TESLA_BATTERY) && !defined(NISSAN_LEAF_BATTERY) && !defined(BMW_I3_BATTERY) && \
|
||||||
!defined(BYD_ATTO_3_BATTERY) && !defined(RENAULT_ZOE_GEN2_BATTERY) && !defined(CELLPOWER_BMS) && \
|
!defined(BYD_ATTO_3_BATTERY) && !defined(RENAULT_ZOE_GEN2_BATTERY) && !defined(CELLPOWER_BMS) && \
|
||||||
!defined(MEB_BATTERY) && !defined(VOLVO_SPA_BATTERY) && \
|
!defined(MEB_BATTERY) && !defined(VOLVO_SPA_BATTERY) && !defined(VOLVO_SPA_HYBRID_BATTERY) && \
|
||||||
!defined(KIA_HYUNDAI_64_BATTERY) //Only the listed types have extra info
|
!defined(KIA_HYUNDAI_64_BATTERY) //Only the listed types have extra info
|
||||||
content += "No extra information available for this battery type";
|
content += "No extra information available for this battery type";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -430,6 +430,33 @@ void init_webserver() {
|
||||||
request->send(200, "text/plain", "Updated successfully");
|
request->send(200, "text/plain", "Updated successfully");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Route for erasing DTC on Volvo hybrid batteries
|
||||||
|
server.on("/volvoEraseDTC", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||||
|
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {
|
||||||
|
return request->requestAuthentication();
|
||||||
|
}
|
||||||
|
datalayer_extended.VolvoHybrid.UserRequestDTCreset = true;
|
||||||
|
request->send(200, "text/plain", "Updated successfully");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Route for reading DTC on Volvo hybrid batteries
|
||||||
|
server.on("/volvoReadDTC", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||||
|
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {
|
||||||
|
return request->requestAuthentication();
|
||||||
|
}
|
||||||
|
datalayer_extended.VolvoHybrid.UserRequestDTCreadout = true;
|
||||||
|
request->send(200, "text/plain", "Updated successfully");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Route for performing ECU reset on Volvo hybrid batteries
|
||||||
|
server.on("/volvoBECMecuReset", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||||
|
if (WEBSERVER_AUTH_REQUIRED && !request->authenticate(http_username, http_password)) {
|
||||||
|
return request->requestAuthentication();
|
||||||
|
}
|
||||||
|
datalayer_extended.VolvoHybrid.UserRequestBECMecuReset = true;
|
||||||
|
request->send(200, "text/plain", "Updated successfully");
|
||||||
|
});
|
||||||
|
|
||||||
#ifdef TEST_FAKE_BATTERY
|
#ifdef TEST_FAKE_BATTERY
|
||||||
// Route for editing FakeBatteryVoltage
|
// Route for editing FakeBatteryVoltage
|
||||||
server.on("/updateFakeBatteryVoltage", HTTP_GET, [](AsyncWebServerRequest* request) {
|
server.on("/updateFakeBatteryVoltage", HTTP_GET, [](AsyncWebServerRequest* request) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue