mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Merge pull request #1491 from dalathegreat/improvement/stellantis-can-mappings
Improvement: Stellantis CAN mappings
This commit is contained in:
commit
4896f3061a
4 changed files with 416 additions and 10 deletions
|
@ -5,8 +5,27 @@
|
||||||
#include "../devboard/utils/events.h"
|
#include "../devboard/utils/events.h"
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
This integration is still ongoing. Here is what still needs to be done in order to use this battery type
|
This integration is still ongoing. The same integration can be used on multiple variants of the Stellantis platforms
|
||||||
- Disable the isolation resistance requirement that opens contactors after 30s under load. Factory mode?
|
- eCMP: Disable the isolation resistance requirement that opens contactors after 30s under load. Factory mode?
|
||||||
|
|
||||||
|
- MysteryVan: Map more values from constantly transmitted instead of PID
|
||||||
|
- ADD CAN sending towards the battery (CAN-logs of full vehicle wanted!)
|
||||||
|
- Following CAN messages need to be sent towards it:
|
||||||
|
- VCU: 4C9 , 565 , 398, 448, 458, 4F1 , 342, 3E2 , 402 , 422 , 482 4D1
|
||||||
|
- CMM: 478 , 558, 1A8, 4B8 1F8 498 4E8
|
||||||
|
- OBC: 531 441 541 551 3C1
|
||||||
|
- BSIInfo_382
|
||||||
|
- VCU_BSI_Wakeup_27A
|
||||||
|
- V2_BSI_552
|
||||||
|
- CRASH_4C8
|
||||||
|
- EVSE plug in (optional): 108, 109, 119
|
||||||
|
- CRASH_4C8
|
||||||
|
- CRNT_SENS_095
|
||||||
|
- MCU 526
|
||||||
|
- JDD 55F NEW
|
||||||
|
|
||||||
|
- STLA medium: Everything missing
|
||||||
|
- ADD CAN sending towards the battery (CAN-logs of full vehicle wanted!)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Do not change code below unless you are sure what you are doing */
|
/* Do not change code below unless you are sure what you are doing */
|
||||||
|
@ -95,6 +114,8 @@ void EcmpBattery::update_values() {
|
||||||
datalayer.battery.status.cell_max_voltage_mV = pid_high_cell_voltage;
|
datalayer.battery.status.cell_max_voltage_mV = pid_high_cell_voltage;
|
||||||
datalayer.battery.status.cell_min_voltage_mV = pid_low_cell_voltage;
|
datalayer.battery.status.cell_min_voltage_mV = pid_low_cell_voltage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
datalayer.battery.info.number_of_cells = NUMBER_OF_CELL_MEASUREMENTS_IN_BATTERY; //50/75kWh sends valid cellcount
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update extended datalayer (More Battery Info page)
|
// Update extended datalayer (More Battery Info page)
|
||||||
|
@ -170,6 +191,28 @@ void EcmpBattery::update_values() {
|
||||||
datalayer_extended.stellantisECMP.pid_contactor_closing_counter = pid_contactor_closing_counter;
|
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_date_of_manufacture = pid_date_of_manufacture;
|
||||||
datalayer_extended.stellantisECMP.pid_SOH_cell_1 = pid_SOH_cell_1;
|
datalayer_extended.stellantisECMP.pid_SOH_cell_1 = pid_SOH_cell_1;
|
||||||
|
// Update extended datalayer for MysteryVan
|
||||||
|
datalayer_extended.stellantisECMP.MysteryVan = MysteryVan;
|
||||||
|
datalayer_extended.stellantisECMP.CONTACTORS_STATE = CONTACTORS_STATE;
|
||||||
|
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;
|
||||||
|
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) {
|
if (battery_InterlockOpen) {
|
||||||
set_event(EVENT_HVIL_FAILURE, 0);
|
set_event(EVENT_HVIL_FAILURE, 0);
|
||||||
|
@ -192,56 +235,221 @@ void EcmpBattery::update_values() {
|
||||||
|
|
||||||
void EcmpBattery::handle_incoming_can_frame(CAN_frame rx_frame) {
|
void EcmpBattery::handle_incoming_can_frame(CAN_frame rx_frame) {
|
||||||
switch (rx_frame.ID) {
|
switch (rx_frame.ID) {
|
||||||
case 0x2D4: //MysteryVan 50/75kWh platform
|
case 0x2D4: //MysteryVan 50/75kWh platform (TBMU 100ms periodic)
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
MysteryVan = true;
|
MysteryVan = true;
|
||||||
|
SOE_MAX_CURRENT_TEMP = (rx_frame.data.u8[2] << 8) | rx_frame.data.u8[3]; // (Wh, 0-200000)
|
||||||
|
FRONT_MACHINE_POWER_LIMIT = (rx_frame.data.u8[4] << 6) | ((rx_frame.data.u8[5] & 0xFC) >> 2); // (W 0-1000000)
|
||||||
|
REAR_MACHINE_POWER_LIMIT = ((rx_frame.data.u8[5] & 0x03) << 12) | (rx_frame.data.u8[6] << 4) |
|
||||||
|
((rx_frame.data.u8[7] & 0xF0) >> 4); // (W 0-1000000)
|
||||||
break;
|
break;
|
||||||
case 0x3B4: //MysteryVan 50/75kWh platform
|
case 0x3B4: //MysteryVan 50/75kWh platform (TBMU 100ms periodic)
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
EVSE_INSTANT_DC_HV_CURRENT =
|
||||||
|
((rx_frame.data.u8[2] & 0x03) << 12) | (rx_frame.data.u8[3] << 2) | ((rx_frame.data.u8[4] & 0xC0) >> 6);
|
||||||
|
EVSE_STATE = ((rx_frame.data.u8[4] & 0x38) >> 3); /*Enumeration below
|
||||||
|
000: NOT CONNECTED
|
||||||
|
001: CONNECTED
|
||||||
|
010: INITIALISATION
|
||||||
|
011: READY
|
||||||
|
100: PRECHARGE IN PROGRESS
|
||||||
|
101: TRANSFER IN PROGRESS
|
||||||
|
110: NOT READY
|
||||||
|
111: Reserved */
|
||||||
|
HV_BATT_SOE_HD = ((rx_frame.data.u8[4] & 0x03) << 12) | (rx_frame.data.u8[5] << 4) |
|
||||||
|
((rx_frame.data.u8[6] & 0xF0) >> 4); // (Wh, 0-200000)
|
||||||
|
HV_BATT_SOE_MAX = ((rx_frame.data.u8[6] & 0x03) << 8) | rx_frame.data.u8[7]; // (Wh, 0-200000)
|
||||||
|
CHECKSUM_FRAME_3B4 = (rx_frame.data.u8[0] & 0xF0) >> 4;
|
||||||
|
COUNTER_3B4 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x2F4: //MysteryVan 50/75kWh platform
|
case 0x2F4: //MysteryVan 50/75kWh platform (Event triggered when charging)
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
//TBMU_EVSE_DC_MES_VOLTAGE = (rx_frame.data.u8[0] << 6) | (rx_frame.data.u8[1] >> 2); //V 0-1000 //Fastcharger info, not needed for BE
|
||||||
|
//TBMU_EVSE_DC_MIN_VOLTAGE = ((rx_frame.data.u8[1] & 0x03) << 8) | rx_frame.data.u8[2]; //V 0-1000 //Fastcharger info, not needed for BE
|
||||||
|
//TBMU_EVSE_DC_MES_CURRENT = (rx_frame.data.u8[3] << 4) | ((rx_frame.data.u8[4] & 0xF0) >> 4); //A -2000 - 2000 //Fastcharger info, not needed for BE
|
||||||
|
//TBMU_EVSE_CHRG_REQ = (rx_frame.data.u8[4] & 0x0C) >> 2; //00 No request, 01 Stop request //Fastcharger info, not needed for BE
|
||||||
|
//HV_STORAGE_MAX_I = ((rx_frame.data.u8[4] & 0x03) << 12) | (rx_frame.data.u8[5] << 2) | //Fastcharger info, not needed for BE
|
||||||
|
//((rx_frame.data.u8[6] & 0xC0) >> 6); //A -2000 - 2000
|
||||||
|
//TBMU_EVSE_DC_MAX_POWER = ((rx_frame.data.u8[6] & 0x3F) << 8) | rx_frame.data.u8[7]; //W -1000000 - 0 //Fastcharger info, not needed for BE
|
||||||
break;
|
break;
|
||||||
case 0x3F4: //MysteryVan 50/75kWh platform
|
case 0x3F4: //MysteryVan 50/75kWh platform (Temperature sensors)
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
switch (((rx_frame.data.u8[0] & 0xE0) >> 5)) //Mux resides in top 3 bits of frame0
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
BMS_PROBETEMP[0] = (rx_frame.data.u8[1] - 40);
|
||||||
|
BMS_PROBETEMP[1] = (rx_frame.data.u8[2] - 40);
|
||||||
|
BMS_PROBETEMP[2] = (rx_frame.data.u8[3] - 40);
|
||||||
|
BMS_PROBETEMP[3] = (rx_frame.data.u8[4] - 40);
|
||||||
|
BMS_PROBETEMP[4] = (rx_frame.data.u8[5] - 40);
|
||||||
|
BMS_PROBETEMP[5] = (rx_frame.data.u8[6] - 40);
|
||||||
|
BMS_PROBETEMP[6] = (rx_frame.data.u8[7] - 40);
|
||||||
break;
|
break;
|
||||||
case 0x554: //MysteryVan 50/75kWh platform
|
default: //There are in total 64 temperature measurements in the BMS. We do not need to sample them all.
|
||||||
|
break; //For future, we could read them all if we want to.
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x554: //MysteryVan 50/75kWh platform (Discharge/Charge limits)
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_PEAK_DISCH_POWER_HD = (rx_frame.data.u8[1] << 6) | (rx_frame.data.u8[2] >> 2); //0-1000000 W
|
||||||
|
HV_BATT_PEAK_CH_POWER_HD = ((rx_frame.data.u8[2] & 0x03) << 12) | (rx_frame.data.u8[3] << 4) |
|
||||||
|
((rx_frame.data.u8[4] & 0xF0) >> 4); // -1000000 - 0 W
|
||||||
|
HV_BATT_NOM_CH_POWER_HD = ((rx_frame.data.u8[4] & 0x0F) << 12) | (rx_frame.data.u8[5] << 6) |
|
||||||
|
((rx_frame.data.u8[6] & 0xC0) >> 6); // -1000000 - 0 W
|
||||||
|
MAX_ALLOW_CHRG_CURRENT = ((rx_frame.data.u8[6] & 0x3F) << 8) | rx_frame.data.u8[7];
|
||||||
|
CHECKSUM_FRAME_554 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0xE
|
||||||
|
COUNTER_554 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x373: //MysteryVan 50/75kWh platform
|
case 0x373: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
REQ_CLEAR_DTC_TBMU = ((rx_frame.data.u8[3] & 0x40) >> 7);
|
||||||
|
TBCU_48V_WAKEUP = (rx_frame.data.u8[3] >> 7);
|
||||||
|
HV_BATT_MAX_REAL_CURR = (rx_frame.data.u8[5] << 7) | (rx_frame.data.u8[6] >> 1); //A -2000 - 2000 0.1 scaling
|
||||||
|
TBMU_FAULT_TYPE = (rx_frame.data.u8[7] & 0xE0) >> 5;
|
||||||
|
/*000: No fault
|
||||||
|
001: FirstLevelFault: Warning Lamp
|
||||||
|
010: SecondLevelFault: Stop Lamp
|
||||||
|
011: ThirdLevelFault: Stop Lamp + contactor opening (EPS shutdown)
|
||||||
|
100: FourthLevelFault: Stop Lamp + Active Discharge
|
||||||
|
101: Inhibition of powertrain activation
|
||||||
|
110: Reserved
|
||||||
|
111: Invalid*/
|
||||||
|
HV_BATT_REAL_VOLT_HD = ((rx_frame.data.u8[3] & 0x3F) << 8) | (rx_frame.data.u8[4]); //V 0-1000 * 0.1 scaling
|
||||||
|
HV_BATT_REAL_CURR_HD = (rx_frame.data.u8[1] << 8) | (rx_frame.data.u8[2]); //A -2000 - 2000 0.1 scaling
|
||||||
|
CHECKSUM_FRAME_373 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0xD
|
||||||
|
COUNTER_373 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x4F4: //MysteryVan 50/75kWh platform
|
case 0x4F4: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_CRASH_MEMORIZED = ((rx_frame.data.u8[2] & 0x08) >> 3);
|
||||||
|
HV_BATT_COLD_CRANK_ACK = ((rx_frame.data.u8[2] & 0x04) >> 2);
|
||||||
|
HV_BATT_CHARGE_NEEDED_STATE = ((rx_frame.data.u8[2] & 0x02) >> 1);
|
||||||
|
HV_BATT_NOM_CH_VOLTAGE = ((rx_frame.data.u8[2] & 0x01) << 8) | (rx_frame.data.u8[3]); //V 0 - 500
|
||||||
|
HV_BATT_NOM_CH_CURRENT = rx_frame.data.u8[4]; // -120 - 0 0.5scaling
|
||||||
|
HV_BATT_GENERATED_HEAT_RATE = (rx_frame.data.u8[5] << 1) | (rx_frame.data.u8[6] >> 7); //W 0-50000
|
||||||
|
REQ_MIL_LAMP_CONTINOUS = (rx_frame.data.u8[7] & 0x04) >> 2;
|
||||||
|
REQ_BLINK_STOP_AND_SERVICE_LAMP = (rx_frame.data.u8[7] & 0x02) >> 1;
|
||||||
|
CMD_RESET_MIL = (rx_frame.data.u8[7] & 0x01);
|
||||||
|
HV_BATT_SOC = (rx_frame.data.u8[1] << 2) | (rx_frame.data.u8[2] >> 6);
|
||||||
|
CONTACTORS_STATE =
|
||||||
|
(rx_frame.data.u8[2] & 0x30) >> 4; //00 : contactor open 01 : pre-load contactor 10 : contactor close
|
||||||
|
HV_BATT_DISCONT_WARNING_OPEN = (rx_frame.data.u8[7] & 0x08) >> 3;
|
||||||
|
CHECKSUM_FRAME_4F4 = (rx_frame.data.u8[0] & 0xF0) >> 4;
|
||||||
|
COUNTER_4F4 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x414: //MysteryVan 50/75kWh platform
|
case 0x414: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_REAL_POWER_HD = (rx_frame.data.u8[1] << 7) | (rx_frame.data.u8[2] >> 1);
|
||||||
|
MAX_ALLOW_CHRG_POWER =
|
||||||
|
((rx_frame.data.u8[2] & 0x01) << 13) | (rx_frame.data.u8[3] << 5) | ((rx_frame.data.u8[4] & 0xF8) >> 3);
|
||||||
|
MAX_ALLOW_DISCHRG_POWER =
|
||||||
|
((rx_frame.data.u8[5] & 0x07) << 11) | (rx_frame.data.u8[6] << 3) | ((rx_frame.data.u8[7] & 0xE0) >> 5);
|
||||||
|
CHECKSUM_FRAME_414 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0x9
|
||||||
|
COUNTER_414 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x353: //MysteryVan 50/75kWh platform
|
case 0x353: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_COP_VOLTAGE =
|
||||||
|
(rx_frame.data.u8[1] << 5) | (rx_frame.data.u8[2] >> 3); //Real voltage HV battery (dV, 0-5000)
|
||||||
|
HV_BATT_COP_CURRENT =
|
||||||
|
(rx_frame.data.u8[3] << 5) | (rx_frame.data.u8[4] >> 3); //High resolution battery current (dA, -4000 - 4000)
|
||||||
|
CHECKSUM_FRAME_353 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0xB
|
||||||
|
COUNTER_353 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x474: //MysteryVan 50/75kWh platform
|
case 0x474: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
BMS_DC_RELAY_MES_EVSE_VOLTAGE = (rx_frame.data.u8[1] << 6) | (rx_frame.data.u8[2] >> 2); //V 0-1000
|
||||||
|
FAST_CHARGE_CONTACTOR_STATE = (rx_frame.data.u8[2] & 0x03);
|
||||||
|
/*00: Contactors Opened
|
||||||
|
01: Contactors Closed
|
||||||
|
10: No Request
|
||||||
|
11: WELDING TEST*/
|
||||||
|
BMS_FASTCHARGE_STATUS = (rx_frame.data.u8[4] & 0x03);
|
||||||
|
/*00 : not charging
|
||||||
|
01 : charging
|
||||||
|
10 : charging fault
|
||||||
|
11 : charging finished*/
|
||||||
|
CHECKSUM_FRAME_474 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0xF
|
||||||
|
COUNTER_474 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x574: //MysteryVan 50/75kWh platform
|
case 0x574: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_FC_INSU_MINUS_RES = (rx_frame.data.u8[0] << 5) | (rx_frame.data.u8[1] >> 3); //kOhm (0-60000)
|
||||||
|
HV_BATT_FC_VHL_INSU_PLUS_RES =
|
||||||
|
((rx_frame.data.u8[1] & 0x07) << 10) | (rx_frame.data.u8[2] << 2) | ((rx_frame.data.u8[3] & 0xC0) >> 6);
|
||||||
|
HV_BATT_FC_INSU_PLUS_RES = (rx_frame.data.u8[5] << 4) | (rx_frame.data.u8[6] >> 4);
|
||||||
|
HV_BATT_ONLY_INSU_MINUS_RES = ((rx_frame.data.u8[3] & 0x3F) << 7) | (rx_frame.data.u8[4] >> 1);
|
||||||
break;
|
break;
|
||||||
case 0x583: //MysteryVan 50/75kWh platform
|
case 0x583: //MysteryVan 50/75kWh platform (CAN-FD also?)
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
ALERT_OVERCHARGE = (rx_frame.data.u8[4] & 0x20) >> 5;
|
||||||
|
NUMBER_PROBE_TEMP_MAX = rx_frame.data.u8[0];
|
||||||
|
NUMBER_PROBE_TEMP_MIN = rx_frame.data.u8[1];
|
||||||
|
TEMPERATURE_MINIMUM_C = rx_frame.data.u8[2] - 40;
|
||||||
|
ALERT_BATT = (rx_frame.data.u8[3] & 0x80) >> 7;
|
||||||
|
ALERT_TEMP_DIFF = (rx_frame.data.u8[3] & 0x40) >> 6;
|
||||||
|
ALERT_HIGH_TEMP = (rx_frame.data.u8[3] & 0x20) >> 5;
|
||||||
|
ALERT_OVERVOLTAGE = (rx_frame.data.u8[3] & 0x10) >> 4;
|
||||||
|
ALERT_LOW_SOC = (rx_frame.data.u8[3] & 0x08) >> 3;
|
||||||
|
ALERT_HIGH_SOC = (rx_frame.data.u8[3] & 0x04) >> 2;
|
||||||
|
ALERT_CELL_OVERVOLTAGE = (rx_frame.data.u8[3] & 0x02) >> 1;
|
||||||
|
ALERT_CELL_UNDERVOLTAGE = (rx_frame.data.u8[3] & 0x01);
|
||||||
|
ALERT_SOC_JUMP = (rx_frame.data.u8[4] & 0x80) >> 7;
|
||||||
|
ALERT_CELL_POOR_CONSIST = (rx_frame.data.u8[4] & 0x40) >> 6;
|
||||||
|
CONTACTOR_OPENING_REASON = (rx_frame.data.u8[4] & 0x1C) >> 2;
|
||||||
|
/*
|
||||||
|
000 : Not error
|
||||||
|
001 : Crash
|
||||||
|
010 : 12V supply source undervoltage
|
||||||
|
011 : 12V supply source overvoltage
|
||||||
|
100 : Battery temperature
|
||||||
|
101 : interlock line open
|
||||||
|
110 : e-Service plug disconnected
|
||||||
|
111 : Not valid
|
||||||
|
*/
|
||||||
|
NUMBER_OF_TEMPERATURE_SENSORS_IN_BATTERY = rx_frame.data.u8[5];
|
||||||
|
NUMBER_OF_CELL_MEASUREMENTS_IN_BATTERY = rx_frame.data.u8[6];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x314: //MysteryVan 50/75kWh platform
|
case 0x314: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
MIN_ALLOW_DISCHRG_VOLTAGE = (rx_frame.data.u8[1] << 3) | (rx_frame.data.u8[2] >> 5); //V (0-1000)
|
||||||
|
//EVSE_DC_MAX_CURRENT = ((rx_frame.data.u8[2] & 0x1F) << 5) | (rx_frame.data.u8[3] >> 3); //Fastcharger info, not needed for BE
|
||||||
|
//TBMU_EVSE_DC_MAX_VOLTAGE //Fastcharger info, not needed for BE
|
||||||
|
//TBMU_MAX_CHRG_SCKT_TEMP //Fastcharger info, not needed for BE
|
||||||
|
//DC_CHARGE_MODE_AVAIL //Fastcharger info, not needed for BE
|
||||||
|
//BIDIR_V2HG_MODE_AVAIL //Fastcharger info, not needed for BE
|
||||||
|
//TBMU_CHRG_CONN_CONF //Fastcharger info, not needed for BE
|
||||||
|
//EVSE_GRID_FAULT //Fastcharger info, not needed for BE
|
||||||
|
CHECKSUM_FRAME_314 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0x8
|
||||||
|
COUNTER_314 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x254: //MysteryVan 50/75kWh platform
|
case 0x254: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
//HV_BATT_SOE_MAX_HR = frame6 & frame7 //Only on FD-CAN variant of the message. FD has length 7, non-fd 5
|
||||||
|
HV_BATT_NOMINAL_DISCH_CURR_HD = (rx_frame.data.u8[0] << 7) | (rx_frame.data.u8[1] >> 1); //dA (0-20000)
|
||||||
|
HV_BATT_PEAK_DISCH_CURR_HD = (rx_frame.data.u8[2] << 7) | (rx_frame.data.u8[3] >> 1); //dA (0-20000)
|
||||||
|
HV_BATT_STABLE_DISCH_CURR_HD = (rx_frame.data.u8[4] << 7) | (rx_frame.data.u8[5] >> 1); //dA (0-20000)
|
||||||
break;
|
break;
|
||||||
case 0x2B4: //MysteryVan 50/75kWh platform
|
case 0x2B4: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_NOMINAL_CHARGE_CURR_HD = (rx_frame.data.u8[0] << 7) | (rx_frame.data.u8[1] >> 1);
|
||||||
|
HV_BATT_PEAK_CHARGE_CURR_HD = (rx_frame.data.u8[2] << 7) | (rx_frame.data.u8[3] >> 1);
|
||||||
|
HV_BATT_STABLE_CHARGE_CURR_HD = (rx_frame.data.u8[4] << 7) | (rx_frame.data.u8[5] >> 1);
|
||||||
break;
|
break;
|
||||||
case 0x4D4: //MysteryVan 50/75kWh platform
|
case 0x4D4: //MysteryVan 50/75kWh platform
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
|
HV_BATT_STABLE_CHARGE_POWER_HD = (rx_frame.data.u8[0] << 6) | (rx_frame.data.u8[1] >> 2);
|
||||||
|
HV_BATT_STABLE_DISCH_POWER_HD =
|
||||||
|
((rx_frame.data.u8[2] & 0x03) << 12) | (rx_frame.data.u8[3] << 4) | ((rx_frame.data.u8[4] & 0xF0) >> 4);
|
||||||
|
HV_BATT_NOMINAL_DISCH_POWER_HD =
|
||||||
|
((rx_frame.data.u8[4] & 0x0F) << 10) | (rx_frame.data.u8[5] << 2) | ((rx_frame.data.u8[6] & 0xC0) >> 6);
|
||||||
|
MAX_ALLOW_DISCHRG_CURRENT = ((rx_frame.data.u8[6] & 0x3F) << 5) | (rx_frame.data.u8[7] >> 3);
|
||||||
|
RC01_PERM_SYNTH_TBMU = (rx_frame.data.u8[7] & 0x04) >> 2; //TBMU Readiness Code synthesis
|
||||||
|
CHECKSUM_FRAME_4D4 = (rx_frame.data.u8[0] & 0xF0) >> 4; //Frame checksum 0x5
|
||||||
|
COUNTER_4D4 = (rx_frame.data.u8[0] & 0x0F);
|
||||||
break;
|
break;
|
||||||
case 0x125: //Common
|
case 0x125: //Common eCMP
|
||||||
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
|
||||||
battery_soc = (rx_frame.data.u8[0] << 2) |
|
battery_soc = (rx_frame.data.u8[0] << 2) |
|
||||||
(rx_frame.data.u8[1] >> 6); // Byte1, bit 7 length 10 (0x3FE when abnormal) (0-1000 ppt)
|
(rx_frame.data.u8[1] >> 6); // Byte1, bit 7 length 10 (0x3FE when abnormal) (0-1000 ppt)
|
||||||
|
|
|
@ -133,7 +133,68 @@ class EcmpBattery : public CanBattery {
|
||||||
uint32_t pid_date_of_manufacture = NOT_SAMPLED_YET;
|
uint32_t pid_date_of_manufacture = NOT_SAMPLED_YET;
|
||||||
uint16_t pid_SOH_cell_1 = NOT_SAMPLED_YET;
|
uint16_t pid_SOH_cell_1 = NOT_SAMPLED_YET;
|
||||||
|
|
||||||
unsigned long previousMillis10 = 0; // will store last time a 10ms CAN Message was sent
|
//MysteryVan platform (allcaps to make code easer to co-exist)
|
||||||
|
uint16_t SOE_MAX_CURRENT_TEMP = 0;
|
||||||
|
uint16_t FRONT_MACHINE_POWER_LIMIT = 0;
|
||||||
|
uint16_t REAR_MACHINE_POWER_LIMIT = 0;
|
||||||
|
uint16_t EVSE_INSTANT_DC_HV_CURRENT = 0;
|
||||||
|
uint8_t EVSE_STATE = 0;
|
||||||
|
uint16_t HV_BATT_SOE_HD = 0;
|
||||||
|
uint16_t HV_BATT_SOE_MAX = 0;
|
||||||
|
uint8_t CHECKSUM_FRAME_314, CHECKSUM_FRAME_3B4, CHECKSUM_FRAME_554, CHECKSUM_FRAME_373, CHECKSUM_FRAME_4F4,
|
||||||
|
CHECKSUM_FRAME_414, CHECKSUM_FRAME_353, CHECKSUM_FRAME_474, CHECKSUM_FRAME_4D4 = 0;
|
||||||
|
uint16_t HV_STORAGE_MAX_I = 0;
|
||||||
|
int8_t BMS_PROBETEMP[7] = {0};
|
||||||
|
uint8_t COUNTER_314, COUNTER_554, COUNTER_373, COUNTER_3B4, COUNTER_4F4, COUNTER_414, COUNTER_353, COUNTER_474,
|
||||||
|
COUNTER_4D4 = 0;
|
||||||
|
uint16_t HV_BATT_PEAK_DISCH_POWER_HD = 0;
|
||||||
|
uint16_t HV_BATT_PEAK_CH_POWER_HD = 0;
|
||||||
|
uint16_t HV_BATT_NOM_CH_POWER_HD = 0;
|
||||||
|
uint16_t MAX_ALLOW_CHRG_CURRENT = 0;
|
||||||
|
int16_t HV_BATT_REAL_CURR_HD = 0;
|
||||||
|
uint16_t HV_BATT_REAL_VOLT_HD = 0;
|
||||||
|
uint8_t TBMU_FAULT_TYPE = 0;
|
||||||
|
int16_t HV_BATT_MAX_REAL_CURR = 0;
|
||||||
|
bool TBCU_48V_WAKEUP = false;
|
||||||
|
bool REQ_CLEAR_DTC_TBMU = false;
|
||||||
|
bool HV_BATT_DISCONT_WARNING_OPEN = false;
|
||||||
|
uint8_t CONTACTORS_STATE = 0;
|
||||||
|
uint16_t HV_BATT_SOC = 0;
|
||||||
|
bool CMD_RESET_MIL = 0;
|
||||||
|
bool REQ_BLINK_STOP_AND_SERVICE_LAMP = false;
|
||||||
|
bool REQ_MIL_LAMP_CONTINOUS = false;
|
||||||
|
uint16_t HV_BATT_GENERATED_HEAT_RATE = 0;
|
||||||
|
bool HV_BATT_CRASH_MEMORIZED = false;
|
||||||
|
bool HV_BATT_COLD_CRANK_ACK = false;
|
||||||
|
bool HV_BATT_CHARGE_NEEDED_STATE = false;
|
||||||
|
uint8_t HV_BATT_NOM_CH_CURRENT = 0;
|
||||||
|
uint16_t HV_BATT_NOM_CH_VOLTAGE = 0;
|
||||||
|
uint16_t HV_BATT_REAL_POWER_HD = 0;
|
||||||
|
uint16_t MAX_ALLOW_CHRG_POWER = 0;
|
||||||
|
uint16_t MAX_ALLOW_DISCHRG_POWER = 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;
|
||||||
|
uint8_t NUMBER_PROBE_TEMP_MAX, NUMBER_PROBE_TEMP_MIN = 0;
|
||||||
|
int8_t TEMPERATURE_MINIMUM_C = 0;
|
||||||
|
uint8_t CONTACTOR_OPENING_REASON = 0;
|
||||||
|
uint8_t NUMBER_OF_TEMPERATURE_SENSORS_IN_BATTERY, NUMBER_OF_CELL_MEASUREMENTS_IN_BATTERY = 0;
|
||||||
|
uint16_t HV_BATT_COP_VOLTAGE = 0;
|
||||||
|
int16_t HV_BATT_COP_CURRENT = 0;
|
||||||
|
uint16_t BMS_DC_RELAY_MES_EVSE_VOLTAGE = 0;
|
||||||
|
uint8_t FAST_CHARGE_CONTACTOR_STATE = 0;
|
||||||
|
uint8_t BMS_FASTCHARGE_STATUS = 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;
|
||||||
|
uint16_t MIN_ALLOW_DISCHRG_VOLTAGE = 0;
|
||||||
|
uint16_t HV_BATT_NOMINAL_DISCH_CURR_HD, HV_BATT_PEAK_DISCH_CURR_HD, HV_BATT_STABLE_DISCH_CURR_HD = 0;
|
||||||
|
uint16_t HV_BATT_NOMINAL_CHARGE_CURR_HD, HV_BATT_PEAK_CHARGE_CURR_HD, HV_BATT_STABLE_CHARGE_CURR_HD = 0;
|
||||||
|
bool RC01_PERM_SYNTH_TBMU = false;
|
||||||
|
uint16_t HV_BATT_STABLE_CHARGE_POWER_HD = 0;
|
||||||
|
uint16_t HV_BATT_STABLE_DISCH_POWER_HD = 0;
|
||||||
|
uint16_t HV_BATT_NOMINAL_DISCH_POWER_HD = 0;
|
||||||
|
uint16_t MAX_ALLOW_DISCHRG_CURRENT = 0;
|
||||||
|
|
||||||
|
unsigned long previousMillis10 = 0; //- will store last time a 10ms CAN Message was sent
|
||||||
unsigned long previousMillis20 = 0; // will store last time a 20ms CAN Message was sent
|
unsigned long previousMillis20 = 0; // will store last time a 20ms CAN Message was sent
|
||||||
unsigned long previousMillis50 = 0; // will store last time a 50ms CAN Message was sent
|
unsigned long previousMillis50 = 0; // will store last time a 50ms CAN Message was sent
|
||||||
unsigned long previousMillis100 = 0; // will store last time a 100ms CAN Message was sent
|
unsigned long previousMillis100 = 0; // will store last time a 100ms CAN Message was sent
|
||||||
|
|
|
@ -383,6 +383,132 @@ class EcmpHtmlRenderer : public BatteryHtmlRenderer {
|
||||||
: String(datalayer_extended.stellantisECMP.pid_SOH_cell_1)) +
|
: String(datalayer_extended.stellantisECMP.pid_SOH_cell_1)) +
|
||||||
"</h4>";
|
"</h4>";
|
||||||
|
|
||||||
|
if (datalayer_extended.stellantisECMP.MysteryVan) {
|
||||||
|
content += "<h3>MysteryVan platform detected!</h3>";
|
||||||
|
content += "<h4>Contactor State: ";
|
||||||
|
if (datalayer_extended.stellantisECMP.CONTACTORS_STATE == 0) {
|
||||||
|
content += "Open";
|
||||||
|
} else if (datalayer_extended.stellantisECMP.CONTACTORS_STATE == 1) {
|
||||||
|
content += "Precharge";
|
||||||
|
} else if (datalayer_extended.stellantisECMP.CONTACTORS_STATE == 2) {
|
||||||
|
content += "Closed";
|
||||||
|
}
|
||||||
|
content += "</h4>";
|
||||||
|
content += "<h4>Crash Memorized: ";
|
||||||
|
if (datalayer_extended.stellantisECMP.CrashMemorized) {
|
||||||
|
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>";
|
||||||
|
}
|
||||||
|
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;
|
return content;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -235,6 +235,17 @@ struct DATALAYER_INFO_CMFAEV {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DATALAYER_INFO_ECMP {
|
struct DATALAYER_INFO_ECMP {
|
||||||
|
//mysteryvan parameters
|
||||||
|
bool MysteryVan = false;
|
||||||
|
bool CrashMemorized = false;
|
||||||
|
uint8_t CONTACTOR_OPENING_REASON = 0;
|
||||||
|
uint8_t TBMU_FAULT_TYPE = 0;
|
||||||
|
uint8_t CONTACTORS_STATE = 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;
|
uint8_t MainConnectorState = 0;
|
||||||
uint16_t InsulationResistance = 0;
|
uint16_t InsulationResistance = 0;
|
||||||
uint8_t InsulationDiag = 0;
|
uint8_t InsulationDiag = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue