mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Add start for MysteryVan More Info page
This commit is contained in:
parent
30a7b9d90e
commit
fd2e5f2e52
3 changed files with 69 additions and 0 deletions
|
@ -191,6 +191,15 @@ void EcmpBattery::update_values() {
|
|||
datalayer_extended.stellantisECMP.pid_contactor_closing_counter = pid_contactor_closing_counter;
|
||||
datalayer_extended.stellantisECMP.pid_date_of_manufacture = pid_date_of_manufacture;
|
||||
datalayer_extended.stellantisECMP.pid_SOH_cell_1 = pid_SOH_cell_1;
|
||||
// Update extended datalayer for MysteryVan
|
||||
datalayer_extended.stellantisECMP.MysteryVan = MysteryVan;
|
||||
datalayer_extended.stellantisECMP.CrashMemorized = HV_BATT_CRASH_MEMORIZED;
|
||||
datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON = CONTACTOR_OPENING_REASON;
|
||||
datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE = TBMU_FAULT_TYPE;
|
||||
datalayer_extended.stellantisECMP.HV_BATT_FC_INSU_MINUS_RES = HV_BATT_FC_INSU_MINUS_RES;
|
||||
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;
|
||||
|
||||
if (battery_InterlockOpen) {
|
||||
set_event(EVENT_HVIL_FAILURE, 0);
|
||||
|
|
|
@ -383,6 +383,58 @@ class EcmpHtmlRenderer : public BatteryHtmlRenderer {
|
|||
: String(datalayer_extended.stellantisECMP.pid_SOH_cell_1)) +
|
||||
"</h4>";
|
||||
|
||||
if (datalayer_extended.stellantisECMP.MysteryVan) {
|
||||
content += "<h4>MysteryVan platform detected: </h4>";
|
||||
content += "<h4>Crash Memorized: ";
|
||||
if (datalayer_extended.stellantisECMP.CrashMemorized == 255) {
|
||||
content += "Yes</h4>";
|
||||
} else {
|
||||
content += "No</h4>";
|
||||
}
|
||||
content += "<h4>Contactor Opening Reason: ";
|
||||
if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 0) {
|
||||
content += "No error";
|
||||
} else if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 1) {
|
||||
content += "Crash!";
|
||||
} else if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 2) {
|
||||
content += "12V supply source undervoltage";
|
||||
} else if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 3) {
|
||||
content += "12V supply source overvoltage";
|
||||
} else if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 4) {
|
||||
content += "Battery temperature";
|
||||
} else if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 5) {
|
||||
content += "Interlock line open";
|
||||
} else if (datalayer_extended.stellantisECMP.CONTACTOR_OPENING_REASON == 6) {
|
||||
content += "e-Service plug disconnected";
|
||||
}
|
||||
content += "</h4>";
|
||||
content += "<h4>Battery fault type: ";
|
||||
if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 0) {
|
||||
content += "No fault";
|
||||
} else if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 1) {
|
||||
content += "FirstLevelFault: Warning Lamp";
|
||||
} else if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 2) {
|
||||
content += "SecondLevelFault: Stop Lamp";
|
||||
} else if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 3) {
|
||||
content += "ThirdLevelFault: Stop Lamp + contactor opening (EPS shutdown)";
|
||||
} else if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 4) {
|
||||
content += "FourthLevelFault: Stop Lamp + Active Discharge";
|
||||
} else if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 5) {
|
||||
content += "Inhibition of powertrain activation";
|
||||
} else if (datalayer_extended.stellantisECMP.TBMU_FAULT_TYPE == 6) {
|
||||
content += "Reserved";
|
||||
}
|
||||
content += "</h4>";
|
||||
content += "<h4>FC insulation minus resistance " +
|
||||
String(datalayer_extended.stellantisECMP.HV_BATT_FC_INSU_MINUS_RES) + " kOhm</h4>";
|
||||
content += "<h4>FC insulation plus resistance " +
|
||||
String(datalayer_extended.stellantisECMP.HV_BATT_FC_INSU_PLUS_RES) + " kOhm</h4>";
|
||||
content += "<h4>FC vehicle insulation plus resistance " +
|
||||
String(datalayer_extended.stellantisECMP.HV_BATT_FC_VHL_INSU_PLUS_RES) + " kOhm</h4>";
|
||||
content += "<h4>FC vehicle insulation plus resistance " +
|
||||
String(datalayer_extended.stellantisECMP.HV_BATT_ONLY_INSU_MINUS_RES) + " kOhm</h4>";
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -235,6 +235,14 @@ struct DATALAYER_INFO_CMFAEV {
|
|||
};
|
||||
|
||||
struct DATALAYER_INFO_ECMP {
|
||||
//mysteryvan parameters
|
||||
bool MysteryVan = false;
|
||||
bool CrashMemorized = false;
|
||||
uint8_t CONTACTOR_OPENING_REASON = 0;
|
||||
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;
|
||||
//ecmp below
|
||||
uint8_t MainConnectorState = 0;
|
||||
uint16_t InsulationResistance = 0;
|
||||
uint8_t InsulationDiag = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue