Add alerts to more battery info page

This commit is contained in:
Daniel Öster 2025-09-11 23:05:06 +03:00
parent 25393106b8
commit 29e6f52c4c
3 changed files with 82 additions and 3 deletions

View file

@ -200,6 +200,18 @@ void EcmpBattery::update_values() {
datalayer_extended.stellantisECMP.HV_BATT_FC_INSU_PLUS_RES = HV_BATT_FC_INSU_PLUS_RES;
datalayer_extended.stellantisECMP.HV_BATT_FC_VHL_INSU_PLUS_RES = HV_BATT_FC_VHL_INSU_PLUS_RES;
datalayer_extended.stellantisECMP.HV_BATT_ONLY_INSU_MINUS_RES = HV_BATT_ONLY_INSU_MINUS_RES;
datalayer_extended.stellantisECMP.HV_BATT_ONLY_INSU_MINUS_RES = HV_BATT_ONLY_INSU_MINUS_RES;
datalayer_extended.stellantisECMP.ALERT_CELL_POOR_CONSIST = ALERT_CELL_POOR_CONSIST;
datalayer_extended.stellantisECMP.ALERT_OVERCHARGE = ALERT_OVERCHARGE;
datalayer_extended.stellantisECMP.ALERT_BATT = ALERT_BATT;
datalayer_extended.stellantisECMP.ALERT_LOW_SOC = ALERT_LOW_SOC;
datalayer_extended.stellantisECMP.ALERT_HIGH_SOC = ALERT_HIGH_SOC;
datalayer_extended.stellantisECMP.ALERT_SOC_JUMP = ALERT_SOC_JUMP;
datalayer_extended.stellantisECMP.ALERT_TEMP_DIFF = ALERT_TEMP_DIFF;
datalayer_extended.stellantisECMP.ALERT_HIGH_TEMP = ALERT_HIGH_TEMP;
datalayer_extended.stellantisECMP.ALERT_OVERVOLTAGE = ALERT_OVERVOLTAGE;
datalayer_extended.stellantisECMP.ALERT_CELL_OVERVOLTAGE = ALERT_CELL_OVERVOLTAGE;
datalayer_extended.stellantisECMP.ALERT_CELL_UNDERVOLTAGE = ALERT_CELL_UNDERVOLTAGE;
if (battery_InterlockOpen) {
set_event(EVENT_HVIL_FAILURE, 0);

View file

@ -384,9 +384,9 @@ class EcmpHtmlRenderer : public BatteryHtmlRenderer {
"</h4>";
if (datalayer_extended.stellantisECMP.MysteryVan) {
content += "<h4>MysteryVan platform detected: </h4>";
content += "<h4>MysteryVan platform detected!</h4>";
content += "<h4>Crash Memorized: ";
if (datalayer_extended.stellantisECMP.CrashMemorized == 255) {
if (datalayer_extended.stellantisECMP.CrashMemorized) {
content += "Yes</h4>";
} else {
content += "No</h4>";
@ -434,7 +434,72 @@ class EcmpHtmlRenderer : public BatteryHtmlRenderer {
content += "<h4>FC vehicle insulation plus resistance " +
String(datalayer_extended.stellantisECMP.HV_BATT_ONLY_INSU_MINUS_RES) + " kOhm</h4>";
}
content += "<h4>Alert Battery: ";
if (datalayer_extended.stellantisECMP.ALERT_BATT) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Low SOC: ";
if (datalayer_extended.stellantisECMP.ALERT_LOW_SOC) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert High SOC: ";
if (datalayer_extended.stellantisECMP.ALERT_HIGH_SOC) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert SOC Jump: ";
if (datalayer_extended.stellantisECMP.ALERT_SOC_JUMP) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Overcharge: ";
if (datalayer_extended.stellantisECMP.ALERT_OVERCHARGE) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Temp Diff: ";
if (datalayer_extended.stellantisECMP.ALERT_TEMP_DIFF) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Temp High: ";
if (datalayer_extended.stellantisECMP.ALERT_HIGH_TEMP) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Overvoltage: ";
if (datalayer_extended.stellantisECMP.ALERT_OVERVOLTAGE) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Cell Overvoltage: ";
if (datalayer_extended.stellantisECMP.ALERT_CELL_OVERVOLTAGE) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Cell Undervoltage: ";
if (datalayer_extended.stellantisECMP.ALERT_CELL_UNDERVOLTAGE) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
content += "<h4>Alert Cell Poor Consistency: ";
if (datalayer_extended.stellantisECMP.ALERT_CELL_POOR_CONSIST) {
content += "Yes</h4>";
} else {
content += "No</h4>";
}
return content;
}
};

View file

@ -242,6 +242,8 @@ struct DATALAYER_INFO_ECMP {
uint8_t TBMU_FAULT_TYPE = 0;
uint16_t HV_BATT_FC_INSU_MINUS_RES, HV_BATT_FC_INSU_PLUS_RES, HV_BATT_FC_VHL_INSU_PLUS_RES,
HV_BATT_ONLY_INSU_MINUS_RES = 0;
bool ALERT_CELL_POOR_CONSIST, ALERT_OVERCHARGE, ALERT_BATT, ALERT_LOW_SOC, ALERT_HIGH_SOC, ALERT_SOC_JUMP,
ALERT_TEMP_DIFF, ALERT_HIGH_TEMP, ALERT_OVERVOLTAGE, ALERT_CELL_OVERVOLTAGE, ALERT_CELL_UNDERVOLTAGE = false;
//ecmp below
uint8_t MainConnectorState = 0;
uint16_t InsulationResistance = 0;