From 2a08618e7aba2119c2bdbd79a317026045b1f742 Mon Sep 17 00:00:00 2001 From: AdityaAsGithub Date: Sun, 5 May 2024 18:03:08 -0400 Subject: [PATCH] LV Bat faults --- common/faults/fault_config.json | 27 ++++ common/faults/faults.c | 206 ++++++++++++++++--------------- common/faults/faults.h | 177 ++++++++++++++------------ source/dashboard/can/can_parse.c | 2 - source/dashboard/can/can_parse.h | 8 +- source/pdu/main.c | 4 + 6 files changed, 238 insertions(+), 186 deletions(-) diff --git a/common/faults/fault_config.json b/common/faults/fault_config.json index 793a8b8d..6b394598 100644 --- a/common/faults/fault_config.json +++ b/common/faults/fault_config.json @@ -93,6 +93,33 @@ "time_to_latch": 100, "time_to_unlatch": 1000, "lcd_message": "Fan 2 Rail Down" + }, + { + "fault_name": "lv_critical_low", + "max": 50000, + "min": 20000, + "priority": "warning", + "time_to_latch": 500, + "time_to_unlatch": 1500, + "lcd_message": "LV bat Very Low (20V)" + }, + { + "fault_name": "lv_getting_low", + "max": 50000, + "min": 21000, + "priority": "warning", + "time_to_latch": 500, + "time_to_unlatch": 1500, + "lcd_message": "LV bat Low (21V)" + }, + { + "fault_name": "lv_batt_fifty", + "max": 50000, + "min": 25000, + "priority": "warning", + "time_to_latch": 500, + "time_to_unlatch": 1500, + "lcd_message": "LV bat Nominal (25V)" } ] }, diff --git a/common/faults/faults.c b/common/faults/faults.c index f96b5552..3a347b07 100644 --- a/common/faults/faults.c +++ b/common/faults/faults.c @@ -20,31 +20,31 @@ //BEGIN AUTO FAULT INFO ARRAY DEFS uint16_t faultLatchTime[TOTAL_NUM_FAULTS] = { PDU_MCU_TEMP_HIGH_LATCH_TIME, DASH_RAIL_LATCH_TIME, ABOX_RAIL_LATCH_TIME, MAIN_RAIL_LATCH_TIME, DAQ_RAIL_LATCH_TIME, V_CRIT_LATCH_TIME, - V_NONCRIT_LATCH_TIME, FAN1_LATCH_TIME, BULLET_RAIL_LATCH_TIME, FAN2_LATCH_TIME, REMAP_UNRELIABLE_LATCH_TIME, RTD_EXIT_LATCH_TIME, LEFT_MC_CONN_LATCH_TIME, - RIGHT_MC_CONN_LATCH_TIME, MCU_TEMP_HIGH_LATCH_TIME, DT_L_TEMP_OT_LATCH_TIME, DT_R_TEMP_OT_LATCH_TIME, DT_L_TEMP_HIGH_LATCH_TIME, DT_R_TEMP_HIGH_LATCH_TIME, BAT_COOL_LOOP_HIGH_LATCH_TIME, - DT_COOL_LOOP_HIGH_LATCH_TIME, DT_R_THERM_DISC_LATCH_TIME, DT_L_THERM_DISC_LATCH_TIME, BATT_CL_DISC_LATCH_TIME, DT_CL_DISC_LATCH_TIME, BSPD_LATCHED_LATCH_TIME, BOTS_FAIL_LATCH_TIME, - INERTIA_FAIL_LATCH_TIME, COCKPIT_ESTOP_LATCH_TIME, RIGHT_ESTOP_LATCH_TIME, LEFT_ESTOP_LATCH_TIME, HVD_DISC_LATCH_TIME, HUB_DISC_LATCH_TIME, TSMS_DISC_LATCH_TIME, - PRECHARGE_TIME_FAULT_LATCH_TIME, MOTOR_R_HEAT_LATCH_TIME, MOTOR_L_HEAT_LATCH_TIME, MOTOR_R_OT_LATCH_TIME, MOTOR_L_OT_LATCH_TIME, APPS_WIRING_T1_LATCH_TIME, APPS_WIRING_T2_LATCH_TIME, - BSE_LATCH_TIME, BSPD_LATCH_TIME, IMPLAUS_DETECTED_LATCH_TIME, APPS_BRAKE_LATCH_TIME, DISCHARGE_LIMIT_ENFORCE_LATCH_TIME, CHARGER_SAFETY_RELAY_LATCH_TIME, INTERNAL_HARDWARE_LATCH_TIME, - HEATSINK_THERMISTOR_LATCH_TIME, SOFTWARE_LATCH_TIME, MAX_CELLV_HIGH_LATCH_TIME, MIN_CELLV_LOW_LATCH_TIME, PACK_OVERHEAT_ORION_LATCH_TIME, INTERNAL_COMMS_LATCH_TIME, CELL_BALANCING_FOFF_LATCH_TIME, - WEAK_CELL_LATCH_TIME, LOW_CELLV_LATCH_TIME, OPEN_WIRE_LATCH_TIME, CURRENT_SENSOR_LATCH_TIME, MAX_CELLV_O5V_LATCH_TIME, CELL_ASIC_LATCH_TIME, WEAK_PACK_LATCH_TIME, - FAN_MONITOR_LATCH_TIME, THERMISTOR_LATCH_TIME, EXTERNAL_COMMS_LATCH_TIME, REDUNDANT_PSU_LATCH_TIME, HV_ISOLATION_LATCH_TIME, INPUT_PSU_LATCH_TIME, CHARGE_LIMIT_ENFORCE_LATCH_TIME, - PACK_TEMP_LATCH_TIME, PACK_TEMP_EXCEEDED_LATCH_TIME, MIN_PACK_TEMP_LATCH_TIME, IMD_LATCH_TIME, TMU_POWER_LOST_LATCH_TIME, TV_DISABLED_LATCH_TIME, MM_DISABLED_LATCH_TIME, - TV_UNCALIBRATED_LATCH_TIME, NO_GPS_FIX_LATCH_TIME, TV_ENABLED_LATCH_TIME, MM_ENABLED_LATCH_TIME, TV_CALIBRATED_LATCH_TIME, YES_GPS_FIX_LATCH_TIME, TEST_FAULT_1_LATCH_TIME, - TEST_FAULT_2_LATCH_TIME, TEST_FAULT_3_LATCH_TIME, TEST_FAULT_4_LATCH_TIME,}; + V_NONCRIT_LATCH_TIME, FAN1_LATCH_TIME, BULLET_RAIL_LATCH_TIME, FAN2_LATCH_TIME, LV_CRITICAL_LOW_LATCH_TIME, LV_GETTING_LOW_LATCH_TIME, LV_BATT_FIFTY_LATCH_TIME, + REMAP_UNRELIABLE_LATCH_TIME, RTD_EXIT_LATCH_TIME, LEFT_MC_CONN_LATCH_TIME, RIGHT_MC_CONN_LATCH_TIME, MCU_TEMP_HIGH_LATCH_TIME, DT_L_TEMP_OT_LATCH_TIME, DT_R_TEMP_OT_LATCH_TIME, + DT_L_TEMP_HIGH_LATCH_TIME, DT_R_TEMP_HIGH_LATCH_TIME, BAT_COOL_LOOP_HIGH_LATCH_TIME, DT_COOL_LOOP_HIGH_LATCH_TIME, DT_R_THERM_DISC_LATCH_TIME, DT_L_THERM_DISC_LATCH_TIME, BATT_CL_DISC_LATCH_TIME, + DT_CL_DISC_LATCH_TIME, BSPD_LATCHED_LATCH_TIME, BOTS_FAIL_LATCH_TIME, INERTIA_FAIL_LATCH_TIME, COCKPIT_ESTOP_LATCH_TIME, RIGHT_ESTOP_LATCH_TIME, LEFT_ESTOP_LATCH_TIME, + HVD_DISC_LATCH_TIME, HUB_DISC_LATCH_TIME, TSMS_DISC_LATCH_TIME, PRECHARGE_TIME_FAULT_LATCH_TIME, MOTOR_R_HEAT_LATCH_TIME, MOTOR_L_HEAT_LATCH_TIME, MOTOR_R_OT_LATCH_TIME, + MOTOR_L_OT_LATCH_TIME, APPS_WIRING_T1_LATCH_TIME, APPS_WIRING_T2_LATCH_TIME, BSE_LATCH_TIME, BSPD_LATCH_TIME, IMPLAUS_DETECTED_LATCH_TIME, APPS_BRAKE_LATCH_TIME, + DISCHARGE_LIMIT_ENFORCE_LATCH_TIME, CHARGER_SAFETY_RELAY_LATCH_TIME, INTERNAL_HARDWARE_LATCH_TIME, HEATSINK_THERMISTOR_LATCH_TIME, SOFTWARE_LATCH_TIME, MAX_CELLV_HIGH_LATCH_TIME, MIN_CELLV_LOW_LATCH_TIME, + PACK_OVERHEAT_ORION_LATCH_TIME, INTERNAL_COMMS_LATCH_TIME, CELL_BALANCING_FOFF_LATCH_TIME, WEAK_CELL_LATCH_TIME, LOW_CELLV_LATCH_TIME, OPEN_WIRE_LATCH_TIME, CURRENT_SENSOR_LATCH_TIME, + MAX_CELLV_O5V_LATCH_TIME, CELL_ASIC_LATCH_TIME, WEAK_PACK_LATCH_TIME, FAN_MONITOR_LATCH_TIME, THERMISTOR_LATCH_TIME, EXTERNAL_COMMS_LATCH_TIME, REDUNDANT_PSU_LATCH_TIME, + HV_ISOLATION_LATCH_TIME, INPUT_PSU_LATCH_TIME, CHARGE_LIMIT_ENFORCE_LATCH_TIME, PACK_TEMP_LATCH_TIME, PACK_TEMP_EXCEEDED_LATCH_TIME, MIN_PACK_TEMP_LATCH_TIME, IMD_LATCH_TIME, + TMU_POWER_LOST_LATCH_TIME, TV_DISABLED_LATCH_TIME, MM_DISABLED_LATCH_TIME, TV_UNCALIBRATED_LATCH_TIME, NO_GPS_FIX_LATCH_TIME, TV_ENABLED_LATCH_TIME, MM_ENABLED_LATCH_TIME, + TV_CALIBRATED_LATCH_TIME, YES_GPS_FIX_LATCH_TIME, TEST_FAULT_1_LATCH_TIME, TEST_FAULT_2_LATCH_TIME, TEST_FAULT_3_LATCH_TIME, TEST_FAULT_4_LATCH_TIME,}; uint16_t faultULatchTime[TOTAL_NUM_FAULTS] = { PDU_MCU_TEMP_HIGH_UNLATCH_TIME, DASH_RAIL_UNLATCH_TIME, ABOX_RAIL_UNLATCH_TIME, MAIN_RAIL_UNLATCH_TIME, DAQ_RAIL_UNLATCH_TIME, V_CRIT_UNLATCH_TIME, - V_NONCRIT_UNLATCH_TIME, FAN1_UNLATCH_TIME, BULLET_RAIL_UNLATCH_TIME, FAN2_UNLATCH_TIME, REMAP_UNRELIABLE_UNLATCH_TIME, RTD_EXIT_UNLATCH_TIME, LEFT_MC_CONN_UNLATCH_TIME, - RIGHT_MC_CONN_UNLATCH_TIME, MCU_TEMP_HIGH_UNLATCH_TIME, DT_L_TEMP_OT_UNLATCH_TIME, DT_R_TEMP_OT_UNLATCH_TIME, DT_L_TEMP_HIGH_UNLATCH_TIME, DT_R_TEMP_HIGH_UNLATCH_TIME, BAT_COOL_LOOP_HIGH_UNLATCH_TIME, - DT_COOL_LOOP_HIGH_UNLATCH_TIME, DT_R_THERM_DISC_UNLATCH_TIME, DT_L_THERM_DISC_UNLATCH_TIME, BATT_CL_DISC_UNLATCH_TIME, DT_CL_DISC_UNLATCH_TIME, BSPD_LATCHED_UNLATCH_TIME, BOTS_FAIL_UNLATCH_TIME, - INERTIA_FAIL_UNLATCH_TIME, COCKPIT_ESTOP_UNLATCH_TIME, RIGHT_ESTOP_UNLATCH_TIME, LEFT_ESTOP_UNLATCH_TIME, HVD_DISC_UNLATCH_TIME, HUB_DISC_UNLATCH_TIME, TSMS_DISC_UNLATCH_TIME, - PRECHARGE_TIME_FAULT_UNLATCH_TIME, MOTOR_R_HEAT_UNLATCH_TIME, MOTOR_L_HEAT_UNLATCH_TIME, MOTOR_R_OT_UNLATCH_TIME, MOTOR_L_OT_UNLATCH_TIME, APPS_WIRING_T1_UNLATCH_TIME, APPS_WIRING_T2_UNLATCH_TIME, - BSE_UNLATCH_TIME, BSPD_UNLATCH_TIME, IMPLAUS_DETECTED_UNLATCH_TIME, APPS_BRAKE_UNLATCH_TIME, DISCHARGE_LIMIT_ENFORCE_UNLATCH_TIME, CHARGER_SAFETY_RELAY_UNLATCH_TIME, INTERNAL_HARDWARE_UNLATCH_TIME, - HEATSINK_THERMISTOR_UNLATCH_TIME, SOFTWARE_UNLATCH_TIME, MAX_CELLV_HIGH_UNLATCH_TIME, MIN_CELLV_LOW_UNLATCH_TIME, PACK_OVERHEAT_ORION_UNLATCH_TIME, INTERNAL_COMMS_UNLATCH_TIME, CELL_BALANCING_FOFF_UNLATCH_TIME, - WEAK_CELL_UNLATCH_TIME, LOW_CELLV_UNLATCH_TIME, OPEN_WIRE_UNLATCH_TIME, CURRENT_SENSOR_UNLATCH_TIME, MAX_CELLV_O5V_UNLATCH_TIME, CELL_ASIC_UNLATCH_TIME, WEAK_PACK_UNLATCH_TIME, - FAN_MONITOR_UNLATCH_TIME, THERMISTOR_UNLATCH_TIME, EXTERNAL_COMMS_UNLATCH_TIME, REDUNDANT_PSU_UNLATCH_TIME, HV_ISOLATION_UNLATCH_TIME, INPUT_PSU_UNLATCH_TIME, CHARGE_LIMIT_ENFORCE_UNLATCH_TIME, - PACK_TEMP_UNLATCH_TIME, PACK_TEMP_EXCEEDED_UNLATCH_TIME, MIN_PACK_TEMP_UNLATCH_TIME, IMD_UNLATCH_TIME, TMU_POWER_LOST_UNLATCH_TIME, TV_DISABLED_UNLATCH_TIME, MM_DISABLED_UNLATCH_TIME, - TV_UNCALIBRATED_UNLATCH_TIME, NO_GPS_FIX_UNLATCH_TIME, TV_ENABLED_UNLATCH_TIME, MM_ENABLED_UNLATCH_TIME, TV_CALIBRATED_UNLATCH_TIME, YES_GPS_FIX_UNLATCH_TIME, TEST_FAULT_1_UNLATCH_TIME, - TEST_FAULT_2_UNLATCH_TIME, TEST_FAULT_3_UNLATCH_TIME, TEST_FAULT_4_UNLATCH_TIME,}; + V_NONCRIT_UNLATCH_TIME, FAN1_UNLATCH_TIME, BULLET_RAIL_UNLATCH_TIME, FAN2_UNLATCH_TIME, LV_CRITICAL_LOW_UNLATCH_TIME, LV_GETTING_LOW_UNLATCH_TIME, LV_BATT_FIFTY_UNLATCH_TIME, + REMAP_UNRELIABLE_UNLATCH_TIME, RTD_EXIT_UNLATCH_TIME, LEFT_MC_CONN_UNLATCH_TIME, RIGHT_MC_CONN_UNLATCH_TIME, MCU_TEMP_HIGH_UNLATCH_TIME, DT_L_TEMP_OT_UNLATCH_TIME, DT_R_TEMP_OT_UNLATCH_TIME, + DT_L_TEMP_HIGH_UNLATCH_TIME, DT_R_TEMP_HIGH_UNLATCH_TIME, BAT_COOL_LOOP_HIGH_UNLATCH_TIME, DT_COOL_LOOP_HIGH_UNLATCH_TIME, DT_R_THERM_DISC_UNLATCH_TIME, DT_L_THERM_DISC_UNLATCH_TIME, BATT_CL_DISC_UNLATCH_TIME, + DT_CL_DISC_UNLATCH_TIME, BSPD_LATCHED_UNLATCH_TIME, BOTS_FAIL_UNLATCH_TIME, INERTIA_FAIL_UNLATCH_TIME, COCKPIT_ESTOP_UNLATCH_TIME, RIGHT_ESTOP_UNLATCH_TIME, LEFT_ESTOP_UNLATCH_TIME, + HVD_DISC_UNLATCH_TIME, HUB_DISC_UNLATCH_TIME, TSMS_DISC_UNLATCH_TIME, PRECHARGE_TIME_FAULT_UNLATCH_TIME, MOTOR_R_HEAT_UNLATCH_TIME, MOTOR_L_HEAT_UNLATCH_TIME, MOTOR_R_OT_UNLATCH_TIME, + MOTOR_L_OT_UNLATCH_TIME, APPS_WIRING_T1_UNLATCH_TIME, APPS_WIRING_T2_UNLATCH_TIME, BSE_UNLATCH_TIME, BSPD_UNLATCH_TIME, IMPLAUS_DETECTED_UNLATCH_TIME, APPS_BRAKE_UNLATCH_TIME, + DISCHARGE_LIMIT_ENFORCE_UNLATCH_TIME, CHARGER_SAFETY_RELAY_UNLATCH_TIME, INTERNAL_HARDWARE_UNLATCH_TIME, HEATSINK_THERMISTOR_UNLATCH_TIME, SOFTWARE_UNLATCH_TIME, MAX_CELLV_HIGH_UNLATCH_TIME, MIN_CELLV_LOW_UNLATCH_TIME, + PACK_OVERHEAT_ORION_UNLATCH_TIME, INTERNAL_COMMS_UNLATCH_TIME, CELL_BALANCING_FOFF_UNLATCH_TIME, WEAK_CELL_UNLATCH_TIME, LOW_CELLV_UNLATCH_TIME, OPEN_WIRE_UNLATCH_TIME, CURRENT_SENSOR_UNLATCH_TIME, + MAX_CELLV_O5V_UNLATCH_TIME, CELL_ASIC_UNLATCH_TIME, WEAK_PACK_UNLATCH_TIME, FAN_MONITOR_UNLATCH_TIME, THERMISTOR_UNLATCH_TIME, EXTERNAL_COMMS_UNLATCH_TIME, REDUNDANT_PSU_UNLATCH_TIME, + HV_ISOLATION_UNLATCH_TIME, INPUT_PSU_UNLATCH_TIME, CHARGE_LIMIT_ENFORCE_UNLATCH_TIME, PACK_TEMP_UNLATCH_TIME, PACK_TEMP_EXCEEDED_UNLATCH_TIME, MIN_PACK_TEMP_UNLATCH_TIME, IMD_UNLATCH_TIME, + TMU_POWER_LOST_UNLATCH_TIME, TV_DISABLED_UNLATCH_TIME, MM_DISABLED_UNLATCH_TIME, TV_UNCALIBRATED_UNLATCH_TIME, NO_GPS_FIX_UNLATCH_TIME, TV_ENABLED_UNLATCH_TIME, MM_ENABLED_UNLATCH_TIME, + TV_CALIBRATED_UNLATCH_TIME, YES_GPS_FIX_UNLATCH_TIME, TEST_FAULT_1_UNLATCH_TIME, TEST_FAULT_2_UNLATCH_TIME, TEST_FAULT_3_UNLATCH_TIME, TEST_FAULT_4_UNLATCH_TIME,}; //Global arrays with all faults fault_status_t statusArray[TOTAL_NUM_FAULTS] = { (fault_status_t){false, ID_PDU_MCU_TEMP_HIGH_FAULT}, @@ -57,6 +57,9 @@ fault_status_t statusArray[TOTAL_NUM_FAULTS] = { (fault_status_t){false, ID_FAN1_FAULT}, (fault_status_t){false, ID_BULLET_RAIL_FAULT}, (fault_status_t){false, ID_FAN2_FAULT}, + (fault_status_t){false, ID_LV_CRITICAL_LOW_FAULT}, + (fault_status_t){false, ID_LV_GETTING_LOW_FAULT}, + (fault_status_t){false, ID_LV_BATT_FIFTY_FAULT}, (fault_status_t){false, ID_REMAP_UNRELIABLE_FAULT}, (fault_status_t){false, ID_RTD_EXIT_FAULT}, (fault_status_t){false, ID_LEFT_MC_CONN_FAULT}, @@ -145,82 +148,85 @@ fault_attributes_t faultArray[TOTAL_NUM_FAULTS] = { (fault_attributes_t){false, false, FAN1_PRIORITY, 0, 0, FAN1_MAX, FAN1_MIN, &statusArray[7], 0, FAN1_MSG}, (fault_attributes_t){false, false, BULLET_RAIL_PRIORITY, 0, 0, BULLET_RAIL_MAX, BULLET_RAIL_MIN, &statusArray[8], 0, BULLET_RAIL_MSG}, (fault_attributes_t){false, false, FAN2_PRIORITY, 0, 0, FAN2_MAX, FAN2_MIN, &statusArray[9], 0, FAN2_MSG}, - (fault_attributes_t){false, false, REMAP_UNRELIABLE_PRIORITY, 0, 0, REMAP_UNRELIABLE_MAX, REMAP_UNRELIABLE_MIN, &statusArray[10], 0, REMAP_UNRELIABLE_MSG}, - (fault_attributes_t){false, false, RTD_EXIT_PRIORITY, 0, 0, RTD_EXIT_MAX, RTD_EXIT_MIN, &statusArray[11], 0, RTD_EXIT_MSG}, - (fault_attributes_t){false, false, LEFT_MC_CONN_PRIORITY, 0, 0, LEFT_MC_CONN_MAX, LEFT_MC_CONN_MIN, &statusArray[12], 0, LEFT_MC_CONN_MSG}, - (fault_attributes_t){false, false, RIGHT_MC_CONN_PRIORITY, 0, 0, RIGHT_MC_CONN_MAX, RIGHT_MC_CONN_MIN, &statusArray[13], 0, RIGHT_MC_CONN_MSG}, - (fault_attributes_t){false, false, MCU_TEMP_HIGH_PRIORITY, 0, 0, MCU_TEMP_HIGH_MAX, MCU_TEMP_HIGH_MIN, &statusArray[14], 0, MCU_TEMP_HIGH_MSG}, - (fault_attributes_t){false, false, DT_L_TEMP_OT_PRIORITY, 0, 0, DT_L_TEMP_OT_MAX, DT_L_TEMP_OT_MIN, &statusArray[15], 0, DT_L_TEMP_OT_MSG}, - (fault_attributes_t){false, false, DT_R_TEMP_OT_PRIORITY, 0, 0, DT_R_TEMP_OT_MAX, DT_R_TEMP_OT_MIN, &statusArray[16], 0, DT_R_TEMP_OT_MSG}, - (fault_attributes_t){false, false, DT_L_TEMP_HIGH_PRIORITY, 0, 0, DT_L_TEMP_HIGH_MAX, DT_L_TEMP_HIGH_MIN, &statusArray[17], 0, DT_L_TEMP_HIGH_MSG}, - (fault_attributes_t){false, false, DT_R_TEMP_HIGH_PRIORITY, 0, 0, DT_R_TEMP_HIGH_MAX, DT_R_TEMP_HIGH_MIN, &statusArray[18], 0, DT_R_TEMP_HIGH_MSG}, - (fault_attributes_t){false, false, BAT_COOL_LOOP_HIGH_PRIORITY, 0, 0, BAT_COOL_LOOP_HIGH_MAX, BAT_COOL_LOOP_HIGH_MIN, &statusArray[19], 0, BAT_COOL_LOOP_HIGH_MSG}, - (fault_attributes_t){false, false, DT_COOL_LOOP_HIGH_PRIORITY, 0, 0, DT_COOL_LOOP_HIGH_MAX, DT_COOL_LOOP_HIGH_MIN, &statusArray[20], 0, DT_COOL_LOOP_HIGH_MSG}, - (fault_attributes_t){false, false, DT_R_THERM_DISC_PRIORITY, 0, 0, DT_R_THERM_DISC_MAX, DT_R_THERM_DISC_MIN, &statusArray[21], 0, DT_R_THERM_DISC_MSG}, - (fault_attributes_t){false, false, DT_L_THERM_DISC_PRIORITY, 0, 0, DT_L_THERM_DISC_MAX, DT_L_THERM_DISC_MIN, &statusArray[22], 0, DT_L_THERM_DISC_MSG}, - (fault_attributes_t){false, false, BATT_CL_DISC_PRIORITY, 0, 0, BATT_CL_DISC_MAX, BATT_CL_DISC_MIN, &statusArray[23], 0, BATT_CL_DISC_MSG}, - (fault_attributes_t){false, false, DT_CL_DISC_PRIORITY, 0, 0, DT_CL_DISC_MAX, DT_CL_DISC_MIN, &statusArray[24], 0, DT_CL_DISC_MSG}, - (fault_attributes_t){false, false, BSPD_LATCHED_PRIORITY, 0, 0, BSPD_LATCHED_MAX, BSPD_LATCHED_MIN, &statusArray[25], 0, BSPD_LATCHED_MSG}, - (fault_attributes_t){false, false, BOTS_FAIL_PRIORITY, 0, 0, BOTS_FAIL_MAX, BOTS_FAIL_MIN, &statusArray[26], 0, BOTS_FAIL_MSG}, - (fault_attributes_t){false, false, INERTIA_FAIL_PRIORITY, 0, 0, INERTIA_FAIL_MAX, INERTIA_FAIL_MIN, &statusArray[27], 0, INERTIA_FAIL_MSG}, - (fault_attributes_t){false, false, COCKPIT_ESTOP_PRIORITY, 0, 0, COCKPIT_ESTOP_MAX, COCKPIT_ESTOP_MIN, &statusArray[28], 0, COCKPIT_ESTOP_MSG}, - (fault_attributes_t){false, false, RIGHT_ESTOP_PRIORITY, 0, 0, RIGHT_ESTOP_MAX, RIGHT_ESTOP_MIN, &statusArray[29], 0, RIGHT_ESTOP_MSG}, - (fault_attributes_t){false, false, LEFT_ESTOP_PRIORITY, 0, 0, LEFT_ESTOP_MAX, LEFT_ESTOP_MIN, &statusArray[30], 0, LEFT_ESTOP_MSG}, - (fault_attributes_t){false, false, HVD_DISC_PRIORITY, 0, 0, HVD_DISC_MAX, HVD_DISC_MIN, &statusArray[31], 0, HVD_DISC_MSG}, - (fault_attributes_t){false, false, HUB_DISC_PRIORITY, 0, 0, HUB_DISC_MAX, HUB_DISC_MIN, &statusArray[32], 0, HUB_DISC_MSG}, - (fault_attributes_t){false, false, TSMS_DISC_PRIORITY, 0, 0, TSMS_DISC_MAX, TSMS_DISC_MIN, &statusArray[33], 0, TSMS_DISC_MSG}, - (fault_attributes_t){false, false, PRECHARGE_TIME_FAULT_PRIORITY, 0, 0, PRECHARGE_TIME_FAULT_MAX, PRECHARGE_TIME_FAULT_MIN, &statusArray[34], 0, PRECHARGE_TIME_FAULT_MSG}, - (fault_attributes_t){false, false, MOTOR_R_HEAT_PRIORITY, 0, 0, MOTOR_R_HEAT_MAX, MOTOR_R_HEAT_MIN, &statusArray[35], 0, MOTOR_R_HEAT_MSG}, - (fault_attributes_t){false, false, MOTOR_L_HEAT_PRIORITY, 0, 0, MOTOR_L_HEAT_MAX, MOTOR_L_HEAT_MIN, &statusArray[36], 0, MOTOR_L_HEAT_MSG}, - (fault_attributes_t){false, false, MOTOR_R_OT_PRIORITY, 0, 0, MOTOR_R_OT_MAX, MOTOR_R_OT_MIN, &statusArray[37], 0, MOTOR_R_OT_MSG}, - (fault_attributes_t){false, false, MOTOR_L_OT_PRIORITY, 0, 0, MOTOR_L_OT_MAX, MOTOR_L_OT_MIN, &statusArray[38], 0, MOTOR_L_OT_MSG}, - (fault_attributes_t){false, false, APPS_WIRING_T1_PRIORITY, 0, 0, APPS_WIRING_T1_MAX, APPS_WIRING_T1_MIN, &statusArray[39], 0, APPS_WIRING_T1_MSG}, - (fault_attributes_t){false, false, APPS_WIRING_T2_PRIORITY, 0, 0, APPS_WIRING_T2_MAX, APPS_WIRING_T2_MIN, &statusArray[40], 0, APPS_WIRING_T2_MSG}, - (fault_attributes_t){false, false, BSE_PRIORITY, 0, 0, BSE_MAX, BSE_MIN, &statusArray[41], 0, BSE_MSG}, - (fault_attributes_t){false, false, BSPD_PRIORITY, 0, 0, BSPD_MAX, BSPD_MIN, &statusArray[42], 0, BSPD_MSG}, - (fault_attributes_t){false, false, IMPLAUS_DETECTED_PRIORITY, 0, 0, IMPLAUS_DETECTED_MAX, IMPLAUS_DETECTED_MIN, &statusArray[43], 0, IMPLAUS_DETECTED_MSG}, - (fault_attributes_t){false, false, APPS_BRAKE_PRIORITY, 0, 0, APPS_BRAKE_MAX, APPS_BRAKE_MIN, &statusArray[44], 0, APPS_BRAKE_MSG}, - (fault_attributes_t){false, false, DISCHARGE_LIMIT_ENFORCE_PRIORITY, 0, 0, DISCHARGE_LIMIT_ENFORCE_MAX, DISCHARGE_LIMIT_ENFORCE_MIN, &statusArray[45], 0, DISCHARGE_LIMIT_ENFORCE_MSG}, - (fault_attributes_t){false, false, CHARGER_SAFETY_RELAY_PRIORITY, 0, 0, CHARGER_SAFETY_RELAY_MAX, CHARGER_SAFETY_RELAY_MIN, &statusArray[46], 0, CHARGER_SAFETY_RELAY_MSG}, - (fault_attributes_t){false, false, INTERNAL_HARDWARE_PRIORITY, 0, 0, INTERNAL_HARDWARE_MAX, INTERNAL_HARDWARE_MIN, &statusArray[47], 0, INTERNAL_HARDWARE_MSG}, - (fault_attributes_t){false, false, HEATSINK_THERMISTOR_PRIORITY, 0, 0, HEATSINK_THERMISTOR_MAX, HEATSINK_THERMISTOR_MIN, &statusArray[48], 0, HEATSINK_THERMISTOR_MSG}, - (fault_attributes_t){false, false, SOFTWARE_PRIORITY, 0, 0, SOFTWARE_MAX, SOFTWARE_MIN, &statusArray[49], 0, SOFTWARE_MSG}, - (fault_attributes_t){false, false, MAX_CELLV_HIGH_PRIORITY, 0, 0, MAX_CELLV_HIGH_MAX, MAX_CELLV_HIGH_MIN, &statusArray[50], 0, MAX_CELLV_HIGH_MSG}, - (fault_attributes_t){false, false, MIN_CELLV_LOW_PRIORITY, 0, 0, MIN_CELLV_LOW_MAX, MIN_CELLV_LOW_MIN, &statusArray[51], 0, MIN_CELLV_LOW_MSG}, - (fault_attributes_t){false, false, PACK_OVERHEAT_ORION_PRIORITY, 0, 0, PACK_OVERHEAT_ORION_MAX, PACK_OVERHEAT_ORION_MIN, &statusArray[52], 0, PACK_OVERHEAT_ORION_MSG}, - (fault_attributes_t){false, false, INTERNAL_COMMS_PRIORITY, 0, 0, INTERNAL_COMMS_MAX, INTERNAL_COMMS_MIN, &statusArray[53], 0, INTERNAL_COMMS_MSG}, - (fault_attributes_t){false, false, CELL_BALANCING_FOFF_PRIORITY, 0, 0, CELL_BALANCING_FOFF_MAX, CELL_BALANCING_FOFF_MIN, &statusArray[54], 0, CELL_BALANCING_FOFF_MSG}, - (fault_attributes_t){false, false, WEAK_CELL_PRIORITY, 0, 0, WEAK_CELL_MAX, WEAK_CELL_MIN, &statusArray[55], 0, WEAK_CELL_MSG}, - (fault_attributes_t){false, false, LOW_CELLV_PRIORITY, 0, 0, LOW_CELLV_MAX, LOW_CELLV_MIN, &statusArray[56], 0, LOW_CELLV_MSG}, - (fault_attributes_t){false, false, OPEN_WIRE_PRIORITY, 0, 0, OPEN_WIRE_MAX, OPEN_WIRE_MIN, &statusArray[57], 0, OPEN_WIRE_MSG}, - (fault_attributes_t){false, false, CURRENT_SENSOR_PRIORITY, 0, 0, CURRENT_SENSOR_MAX, CURRENT_SENSOR_MIN, &statusArray[58], 0, CURRENT_SENSOR_MSG}, - (fault_attributes_t){false, false, MAX_CELLV_O5V_PRIORITY, 0, 0, MAX_CELLV_O5V_MAX, MAX_CELLV_O5V_MIN, &statusArray[59], 0, MAX_CELLV_O5V_MSG}, - (fault_attributes_t){false, false, CELL_ASIC_PRIORITY, 0, 0, CELL_ASIC_MAX, CELL_ASIC_MIN, &statusArray[60], 0, CELL_ASIC_MSG}, - (fault_attributes_t){false, false, WEAK_PACK_PRIORITY, 0, 0, WEAK_PACK_MAX, WEAK_PACK_MIN, &statusArray[61], 0, WEAK_PACK_MSG}, - (fault_attributes_t){false, false, FAN_MONITOR_PRIORITY, 0, 0, FAN_MONITOR_MAX, FAN_MONITOR_MIN, &statusArray[62], 0, FAN_MONITOR_MSG}, - (fault_attributes_t){false, false, THERMISTOR_PRIORITY, 0, 0, THERMISTOR_MAX, THERMISTOR_MIN, &statusArray[63], 0, THERMISTOR_MSG}, - (fault_attributes_t){false, false, EXTERNAL_COMMS_PRIORITY, 0, 0, EXTERNAL_COMMS_MAX, EXTERNAL_COMMS_MIN, &statusArray[64], 0, EXTERNAL_COMMS_MSG}, - (fault_attributes_t){false, false, REDUNDANT_PSU_PRIORITY, 0, 0, REDUNDANT_PSU_MAX, REDUNDANT_PSU_MIN, &statusArray[65], 0, REDUNDANT_PSU_MSG}, - (fault_attributes_t){false, false, HV_ISOLATION_PRIORITY, 0, 0, HV_ISOLATION_MAX, HV_ISOLATION_MIN, &statusArray[66], 0, HV_ISOLATION_MSG}, - (fault_attributes_t){false, false, INPUT_PSU_PRIORITY, 0, 0, INPUT_PSU_MAX, INPUT_PSU_MIN, &statusArray[67], 0, INPUT_PSU_MSG}, - (fault_attributes_t){false, false, CHARGE_LIMIT_ENFORCE_PRIORITY, 0, 0, CHARGE_LIMIT_ENFORCE_MAX, CHARGE_LIMIT_ENFORCE_MIN, &statusArray[68], 0, CHARGE_LIMIT_ENFORCE_MSG}, - (fault_attributes_t){false, false, PACK_TEMP_PRIORITY, 0, 0, PACK_TEMP_MAX, PACK_TEMP_MIN, &statusArray[69], 0, PACK_TEMP_MSG}, - (fault_attributes_t){false, false, PACK_TEMP_EXCEEDED_PRIORITY, 0, 0, PACK_TEMP_EXCEEDED_MAX, PACK_TEMP_EXCEEDED_MIN, &statusArray[70], 0, PACK_TEMP_EXCEEDED_MSG}, - (fault_attributes_t){false, false, MIN_PACK_TEMP_PRIORITY, 0, 0, MIN_PACK_TEMP_MAX, MIN_PACK_TEMP_MIN, &statusArray[71], 0, MIN_PACK_TEMP_MSG}, - (fault_attributes_t){false, false, IMD_PRIORITY, 0, 0, IMD_MAX, IMD_MIN, &statusArray[72], 0, IMD_MSG}, - (fault_attributes_t){false, false, TMU_POWER_LOST_PRIORITY, 0, 0, TMU_POWER_LOST_MAX, TMU_POWER_LOST_MIN, &statusArray[73], 0, TMU_POWER_LOST_MSG}, - (fault_attributes_t){false, false, TV_DISABLED_PRIORITY, 0, 0, TV_DISABLED_MAX, TV_DISABLED_MIN, &statusArray[74], 0, TV_DISABLED_MSG}, - (fault_attributes_t){false, false, MM_DISABLED_PRIORITY, 0, 0, MM_DISABLED_MAX, MM_DISABLED_MIN, &statusArray[75], 0, MM_DISABLED_MSG}, - (fault_attributes_t){false, false, TV_UNCALIBRATED_PRIORITY, 0, 0, TV_UNCALIBRATED_MAX, TV_UNCALIBRATED_MIN, &statusArray[76], 0, TV_UNCALIBRATED_MSG}, - (fault_attributes_t){false, false, NO_GPS_FIX_PRIORITY, 0, 0, NO_GPS_FIX_MAX, NO_GPS_FIX_MIN, &statusArray[77], 0, NO_GPS_FIX_MSG}, - (fault_attributes_t){false, false, TV_ENABLED_PRIORITY, 0, 0, TV_ENABLED_MAX, TV_ENABLED_MIN, &statusArray[78], 0, TV_ENABLED_MSG}, - (fault_attributes_t){false, false, MM_ENABLED_PRIORITY, 0, 0, MM_ENABLED_MAX, MM_ENABLED_MIN, &statusArray[79], 0, MM_ENABLED_MSG}, - (fault_attributes_t){false, false, TV_CALIBRATED_PRIORITY, 0, 0, TV_CALIBRATED_MAX, TV_CALIBRATED_MIN, &statusArray[80], 0, TV_CALIBRATED_MSG}, - (fault_attributes_t){false, false, YES_GPS_FIX_PRIORITY, 0, 0, YES_GPS_FIX_MAX, YES_GPS_FIX_MIN, &statusArray[81], 0, YES_GPS_FIX_MSG}, - (fault_attributes_t){false, false, TEST_FAULT_1_PRIORITY, 0, 0, TEST_FAULT_1_MAX, TEST_FAULT_1_MIN, &statusArray[82], 0, TEST_FAULT_1_MSG}, - (fault_attributes_t){false, false, TEST_FAULT_2_PRIORITY, 0, 0, TEST_FAULT_2_MAX, TEST_FAULT_2_MIN, &statusArray[83], 0, TEST_FAULT_2_MSG}, - (fault_attributes_t){false, false, TEST_FAULT_3_PRIORITY, 0, 0, TEST_FAULT_3_MAX, TEST_FAULT_3_MIN, &statusArray[84], 0, TEST_FAULT_3_MSG}, - (fault_attributes_t){false, false, TEST_FAULT_4_PRIORITY, 0, 0, TEST_FAULT_4_MAX, TEST_FAULT_4_MIN, &statusArray[85], 0, TEST_FAULT_4_MSG}, + (fault_attributes_t){false, false, LV_CRITICAL_LOW_PRIORITY, 0, 0, LV_CRITICAL_LOW_MAX, LV_CRITICAL_LOW_MIN, &statusArray[10], 0, LV_CRITICAL_LOW_MSG}, + (fault_attributes_t){false, false, LV_GETTING_LOW_PRIORITY, 0, 0, LV_GETTING_LOW_MAX, LV_GETTING_LOW_MIN, &statusArray[11], 0, LV_GETTING_LOW_MSG}, + (fault_attributes_t){false, false, LV_BATT_FIFTY_PRIORITY, 0, 0, LV_BATT_FIFTY_MAX, LV_BATT_FIFTY_MIN, &statusArray[12], 0, LV_BATT_FIFTY_MSG}, + (fault_attributes_t){false, false, REMAP_UNRELIABLE_PRIORITY, 0, 0, REMAP_UNRELIABLE_MAX, REMAP_UNRELIABLE_MIN, &statusArray[13], 0, REMAP_UNRELIABLE_MSG}, + (fault_attributes_t){false, false, RTD_EXIT_PRIORITY, 0, 0, RTD_EXIT_MAX, RTD_EXIT_MIN, &statusArray[14], 0, RTD_EXIT_MSG}, + (fault_attributes_t){false, false, LEFT_MC_CONN_PRIORITY, 0, 0, LEFT_MC_CONN_MAX, LEFT_MC_CONN_MIN, &statusArray[15], 0, LEFT_MC_CONN_MSG}, + (fault_attributes_t){false, false, RIGHT_MC_CONN_PRIORITY, 0, 0, RIGHT_MC_CONN_MAX, RIGHT_MC_CONN_MIN, &statusArray[16], 0, RIGHT_MC_CONN_MSG}, + (fault_attributes_t){false, false, MCU_TEMP_HIGH_PRIORITY, 0, 0, MCU_TEMP_HIGH_MAX, MCU_TEMP_HIGH_MIN, &statusArray[17], 0, MCU_TEMP_HIGH_MSG}, + (fault_attributes_t){false, false, DT_L_TEMP_OT_PRIORITY, 0, 0, DT_L_TEMP_OT_MAX, DT_L_TEMP_OT_MIN, &statusArray[18], 0, DT_L_TEMP_OT_MSG}, + (fault_attributes_t){false, false, DT_R_TEMP_OT_PRIORITY, 0, 0, DT_R_TEMP_OT_MAX, DT_R_TEMP_OT_MIN, &statusArray[19], 0, DT_R_TEMP_OT_MSG}, + (fault_attributes_t){false, false, DT_L_TEMP_HIGH_PRIORITY, 0, 0, DT_L_TEMP_HIGH_MAX, DT_L_TEMP_HIGH_MIN, &statusArray[20], 0, DT_L_TEMP_HIGH_MSG}, + (fault_attributes_t){false, false, DT_R_TEMP_HIGH_PRIORITY, 0, 0, DT_R_TEMP_HIGH_MAX, DT_R_TEMP_HIGH_MIN, &statusArray[21], 0, DT_R_TEMP_HIGH_MSG}, + (fault_attributes_t){false, false, BAT_COOL_LOOP_HIGH_PRIORITY, 0, 0, BAT_COOL_LOOP_HIGH_MAX, BAT_COOL_LOOP_HIGH_MIN, &statusArray[22], 0, BAT_COOL_LOOP_HIGH_MSG}, + (fault_attributes_t){false, false, DT_COOL_LOOP_HIGH_PRIORITY, 0, 0, DT_COOL_LOOP_HIGH_MAX, DT_COOL_LOOP_HIGH_MIN, &statusArray[23], 0, DT_COOL_LOOP_HIGH_MSG}, + (fault_attributes_t){false, false, DT_R_THERM_DISC_PRIORITY, 0, 0, DT_R_THERM_DISC_MAX, DT_R_THERM_DISC_MIN, &statusArray[24], 0, DT_R_THERM_DISC_MSG}, + (fault_attributes_t){false, false, DT_L_THERM_DISC_PRIORITY, 0, 0, DT_L_THERM_DISC_MAX, DT_L_THERM_DISC_MIN, &statusArray[25], 0, DT_L_THERM_DISC_MSG}, + (fault_attributes_t){false, false, BATT_CL_DISC_PRIORITY, 0, 0, BATT_CL_DISC_MAX, BATT_CL_DISC_MIN, &statusArray[26], 0, BATT_CL_DISC_MSG}, + (fault_attributes_t){false, false, DT_CL_DISC_PRIORITY, 0, 0, DT_CL_DISC_MAX, DT_CL_DISC_MIN, &statusArray[27], 0, DT_CL_DISC_MSG}, + (fault_attributes_t){false, false, BSPD_LATCHED_PRIORITY, 0, 0, BSPD_LATCHED_MAX, BSPD_LATCHED_MIN, &statusArray[28], 0, BSPD_LATCHED_MSG}, + (fault_attributes_t){false, false, BOTS_FAIL_PRIORITY, 0, 0, BOTS_FAIL_MAX, BOTS_FAIL_MIN, &statusArray[29], 0, BOTS_FAIL_MSG}, + (fault_attributes_t){false, false, INERTIA_FAIL_PRIORITY, 0, 0, INERTIA_FAIL_MAX, INERTIA_FAIL_MIN, &statusArray[30], 0, INERTIA_FAIL_MSG}, + (fault_attributes_t){false, false, COCKPIT_ESTOP_PRIORITY, 0, 0, COCKPIT_ESTOP_MAX, COCKPIT_ESTOP_MIN, &statusArray[31], 0, COCKPIT_ESTOP_MSG}, + (fault_attributes_t){false, false, RIGHT_ESTOP_PRIORITY, 0, 0, RIGHT_ESTOP_MAX, RIGHT_ESTOP_MIN, &statusArray[32], 0, RIGHT_ESTOP_MSG}, + (fault_attributes_t){false, false, LEFT_ESTOP_PRIORITY, 0, 0, LEFT_ESTOP_MAX, LEFT_ESTOP_MIN, &statusArray[33], 0, LEFT_ESTOP_MSG}, + (fault_attributes_t){false, false, HVD_DISC_PRIORITY, 0, 0, HVD_DISC_MAX, HVD_DISC_MIN, &statusArray[34], 0, HVD_DISC_MSG}, + (fault_attributes_t){false, false, HUB_DISC_PRIORITY, 0, 0, HUB_DISC_MAX, HUB_DISC_MIN, &statusArray[35], 0, HUB_DISC_MSG}, + (fault_attributes_t){false, false, TSMS_DISC_PRIORITY, 0, 0, TSMS_DISC_MAX, TSMS_DISC_MIN, &statusArray[36], 0, TSMS_DISC_MSG}, + (fault_attributes_t){false, false, PRECHARGE_TIME_FAULT_PRIORITY, 0, 0, PRECHARGE_TIME_FAULT_MAX, PRECHARGE_TIME_FAULT_MIN, &statusArray[37], 0, PRECHARGE_TIME_FAULT_MSG}, + (fault_attributes_t){false, false, MOTOR_R_HEAT_PRIORITY, 0, 0, MOTOR_R_HEAT_MAX, MOTOR_R_HEAT_MIN, &statusArray[38], 0, MOTOR_R_HEAT_MSG}, + (fault_attributes_t){false, false, MOTOR_L_HEAT_PRIORITY, 0, 0, MOTOR_L_HEAT_MAX, MOTOR_L_HEAT_MIN, &statusArray[39], 0, MOTOR_L_HEAT_MSG}, + (fault_attributes_t){false, false, MOTOR_R_OT_PRIORITY, 0, 0, MOTOR_R_OT_MAX, MOTOR_R_OT_MIN, &statusArray[40], 0, MOTOR_R_OT_MSG}, + (fault_attributes_t){false, false, MOTOR_L_OT_PRIORITY, 0, 0, MOTOR_L_OT_MAX, MOTOR_L_OT_MIN, &statusArray[41], 0, MOTOR_L_OT_MSG}, + (fault_attributes_t){false, false, APPS_WIRING_T1_PRIORITY, 0, 0, APPS_WIRING_T1_MAX, APPS_WIRING_T1_MIN, &statusArray[42], 0, APPS_WIRING_T1_MSG}, + (fault_attributes_t){false, false, APPS_WIRING_T2_PRIORITY, 0, 0, APPS_WIRING_T2_MAX, APPS_WIRING_T2_MIN, &statusArray[43], 0, APPS_WIRING_T2_MSG}, + (fault_attributes_t){false, false, BSE_PRIORITY, 0, 0, BSE_MAX, BSE_MIN, &statusArray[44], 0, BSE_MSG}, + (fault_attributes_t){false, false, BSPD_PRIORITY, 0, 0, BSPD_MAX, BSPD_MIN, &statusArray[45], 0, BSPD_MSG}, + (fault_attributes_t){false, false, IMPLAUS_DETECTED_PRIORITY, 0, 0, IMPLAUS_DETECTED_MAX, IMPLAUS_DETECTED_MIN, &statusArray[46], 0, IMPLAUS_DETECTED_MSG}, + (fault_attributes_t){false, false, APPS_BRAKE_PRIORITY, 0, 0, APPS_BRAKE_MAX, APPS_BRAKE_MIN, &statusArray[47], 0, APPS_BRAKE_MSG}, + (fault_attributes_t){false, false, DISCHARGE_LIMIT_ENFORCE_PRIORITY, 0, 0, DISCHARGE_LIMIT_ENFORCE_MAX, DISCHARGE_LIMIT_ENFORCE_MIN, &statusArray[48], 0, DISCHARGE_LIMIT_ENFORCE_MSG}, + (fault_attributes_t){false, false, CHARGER_SAFETY_RELAY_PRIORITY, 0, 0, CHARGER_SAFETY_RELAY_MAX, CHARGER_SAFETY_RELAY_MIN, &statusArray[49], 0, CHARGER_SAFETY_RELAY_MSG}, + (fault_attributes_t){false, false, INTERNAL_HARDWARE_PRIORITY, 0, 0, INTERNAL_HARDWARE_MAX, INTERNAL_HARDWARE_MIN, &statusArray[50], 0, INTERNAL_HARDWARE_MSG}, + (fault_attributes_t){false, false, HEATSINK_THERMISTOR_PRIORITY, 0, 0, HEATSINK_THERMISTOR_MAX, HEATSINK_THERMISTOR_MIN, &statusArray[51], 0, HEATSINK_THERMISTOR_MSG}, + (fault_attributes_t){false, false, SOFTWARE_PRIORITY, 0, 0, SOFTWARE_MAX, SOFTWARE_MIN, &statusArray[52], 0, SOFTWARE_MSG}, + (fault_attributes_t){false, false, MAX_CELLV_HIGH_PRIORITY, 0, 0, MAX_CELLV_HIGH_MAX, MAX_CELLV_HIGH_MIN, &statusArray[53], 0, MAX_CELLV_HIGH_MSG}, + (fault_attributes_t){false, false, MIN_CELLV_LOW_PRIORITY, 0, 0, MIN_CELLV_LOW_MAX, MIN_CELLV_LOW_MIN, &statusArray[54], 0, MIN_CELLV_LOW_MSG}, + (fault_attributes_t){false, false, PACK_OVERHEAT_ORION_PRIORITY, 0, 0, PACK_OVERHEAT_ORION_MAX, PACK_OVERHEAT_ORION_MIN, &statusArray[55], 0, PACK_OVERHEAT_ORION_MSG}, + (fault_attributes_t){false, false, INTERNAL_COMMS_PRIORITY, 0, 0, INTERNAL_COMMS_MAX, INTERNAL_COMMS_MIN, &statusArray[56], 0, INTERNAL_COMMS_MSG}, + (fault_attributes_t){false, false, CELL_BALANCING_FOFF_PRIORITY, 0, 0, CELL_BALANCING_FOFF_MAX, CELL_BALANCING_FOFF_MIN, &statusArray[57], 0, CELL_BALANCING_FOFF_MSG}, + (fault_attributes_t){false, false, WEAK_CELL_PRIORITY, 0, 0, WEAK_CELL_MAX, WEAK_CELL_MIN, &statusArray[58], 0, WEAK_CELL_MSG}, + (fault_attributes_t){false, false, LOW_CELLV_PRIORITY, 0, 0, LOW_CELLV_MAX, LOW_CELLV_MIN, &statusArray[59], 0, LOW_CELLV_MSG}, + (fault_attributes_t){false, false, OPEN_WIRE_PRIORITY, 0, 0, OPEN_WIRE_MAX, OPEN_WIRE_MIN, &statusArray[60], 0, OPEN_WIRE_MSG}, + (fault_attributes_t){false, false, CURRENT_SENSOR_PRIORITY, 0, 0, CURRENT_SENSOR_MAX, CURRENT_SENSOR_MIN, &statusArray[61], 0, CURRENT_SENSOR_MSG}, + (fault_attributes_t){false, false, MAX_CELLV_O5V_PRIORITY, 0, 0, MAX_CELLV_O5V_MAX, MAX_CELLV_O5V_MIN, &statusArray[62], 0, MAX_CELLV_O5V_MSG}, + (fault_attributes_t){false, false, CELL_ASIC_PRIORITY, 0, 0, CELL_ASIC_MAX, CELL_ASIC_MIN, &statusArray[63], 0, CELL_ASIC_MSG}, + (fault_attributes_t){false, false, WEAK_PACK_PRIORITY, 0, 0, WEAK_PACK_MAX, WEAK_PACK_MIN, &statusArray[64], 0, WEAK_PACK_MSG}, + (fault_attributes_t){false, false, FAN_MONITOR_PRIORITY, 0, 0, FAN_MONITOR_MAX, FAN_MONITOR_MIN, &statusArray[65], 0, FAN_MONITOR_MSG}, + (fault_attributes_t){false, false, THERMISTOR_PRIORITY, 0, 0, THERMISTOR_MAX, THERMISTOR_MIN, &statusArray[66], 0, THERMISTOR_MSG}, + (fault_attributes_t){false, false, EXTERNAL_COMMS_PRIORITY, 0, 0, EXTERNAL_COMMS_MAX, EXTERNAL_COMMS_MIN, &statusArray[67], 0, EXTERNAL_COMMS_MSG}, + (fault_attributes_t){false, false, REDUNDANT_PSU_PRIORITY, 0, 0, REDUNDANT_PSU_MAX, REDUNDANT_PSU_MIN, &statusArray[68], 0, REDUNDANT_PSU_MSG}, + (fault_attributes_t){false, false, HV_ISOLATION_PRIORITY, 0, 0, HV_ISOLATION_MAX, HV_ISOLATION_MIN, &statusArray[69], 0, HV_ISOLATION_MSG}, + (fault_attributes_t){false, false, INPUT_PSU_PRIORITY, 0, 0, INPUT_PSU_MAX, INPUT_PSU_MIN, &statusArray[70], 0, INPUT_PSU_MSG}, + (fault_attributes_t){false, false, CHARGE_LIMIT_ENFORCE_PRIORITY, 0, 0, CHARGE_LIMIT_ENFORCE_MAX, CHARGE_LIMIT_ENFORCE_MIN, &statusArray[71], 0, CHARGE_LIMIT_ENFORCE_MSG}, + (fault_attributes_t){false, false, PACK_TEMP_PRIORITY, 0, 0, PACK_TEMP_MAX, PACK_TEMP_MIN, &statusArray[72], 0, PACK_TEMP_MSG}, + (fault_attributes_t){false, false, PACK_TEMP_EXCEEDED_PRIORITY, 0, 0, PACK_TEMP_EXCEEDED_MAX, PACK_TEMP_EXCEEDED_MIN, &statusArray[73], 0, PACK_TEMP_EXCEEDED_MSG}, + (fault_attributes_t){false, false, MIN_PACK_TEMP_PRIORITY, 0, 0, MIN_PACK_TEMP_MAX, MIN_PACK_TEMP_MIN, &statusArray[74], 0, MIN_PACK_TEMP_MSG}, + (fault_attributes_t){false, false, IMD_PRIORITY, 0, 0, IMD_MAX, IMD_MIN, &statusArray[75], 0, IMD_MSG}, + (fault_attributes_t){false, false, TMU_POWER_LOST_PRIORITY, 0, 0, TMU_POWER_LOST_MAX, TMU_POWER_LOST_MIN, &statusArray[76], 0, TMU_POWER_LOST_MSG}, + (fault_attributes_t){false, false, TV_DISABLED_PRIORITY, 0, 0, TV_DISABLED_MAX, TV_DISABLED_MIN, &statusArray[77], 0, TV_DISABLED_MSG}, + (fault_attributes_t){false, false, MM_DISABLED_PRIORITY, 0, 0, MM_DISABLED_MAX, MM_DISABLED_MIN, &statusArray[78], 0, MM_DISABLED_MSG}, + (fault_attributes_t){false, false, TV_UNCALIBRATED_PRIORITY, 0, 0, TV_UNCALIBRATED_MAX, TV_UNCALIBRATED_MIN, &statusArray[79], 0, TV_UNCALIBRATED_MSG}, + (fault_attributes_t){false, false, NO_GPS_FIX_PRIORITY, 0, 0, NO_GPS_FIX_MAX, NO_GPS_FIX_MIN, &statusArray[80], 0, NO_GPS_FIX_MSG}, + (fault_attributes_t){false, false, TV_ENABLED_PRIORITY, 0, 0, TV_ENABLED_MAX, TV_ENABLED_MIN, &statusArray[81], 0, TV_ENABLED_MSG}, + (fault_attributes_t){false, false, MM_ENABLED_PRIORITY, 0, 0, MM_ENABLED_MAX, MM_ENABLED_MIN, &statusArray[82], 0, MM_ENABLED_MSG}, + (fault_attributes_t){false, false, TV_CALIBRATED_PRIORITY, 0, 0, TV_CALIBRATED_MAX, TV_CALIBRATED_MIN, &statusArray[83], 0, TV_CALIBRATED_MSG}, + (fault_attributes_t){false, false, YES_GPS_FIX_PRIORITY, 0, 0, YES_GPS_FIX_MAX, YES_GPS_FIX_MIN, &statusArray[84], 0, YES_GPS_FIX_MSG}, + (fault_attributes_t){false, false, TEST_FAULT_1_PRIORITY, 0, 0, TEST_FAULT_1_MAX, TEST_FAULT_1_MIN, &statusArray[85], 0, TEST_FAULT_1_MSG}, + (fault_attributes_t){false, false, TEST_FAULT_2_PRIORITY, 0, 0, TEST_FAULT_2_MAX, TEST_FAULT_2_MIN, &statusArray[86], 0, TEST_FAULT_2_MSG}, + (fault_attributes_t){false, false, TEST_FAULT_3_PRIORITY, 0, 0, TEST_FAULT_3_MAX, TEST_FAULT_3_MIN, &statusArray[87], 0, TEST_FAULT_3_MSG}, + (fault_attributes_t){false, false, TEST_FAULT_4_PRIORITY, 0, 0, TEST_FAULT_4_MAX, TEST_FAULT_4_MIN, &statusArray[88], 0, TEST_FAULT_4_MSG}, }; //END AUTO FAULT INFO ARRAY DEFS diff --git a/common/faults/faults.h b/common/faults/faults.h index 5694ca64..45c16742 100644 --- a/common/faults/faults.h +++ b/common/faults/faults.h @@ -20,14 +20,14 @@ #define MAX_MSG_SIZE 75 //BEGIN AUTO TOTAL DEFS -#define TOTAL_PDU_FAULTS 10 +#define TOTAL_PDU_FAULTS 13 #define TOTAL_MAIN_MODULE_FAULTS 29 #define TOTAL_DASHBOARD_FAULTS 6 #define TOTAL_A_BOX_FAULTS 29 #define TOTAL_TORQUE_VECTOR_FAULTS 8 #define TOTAL_TEST_FAULTS 4 #define TOTAL_MCU_NUM 6 -#define TOTAL_NUM_FAULTS 86 +#define TOTAL_NUM_FAULTS 89 //END AUTO TOTAL DEFS //BEGIN AUTO ID DEFS @@ -41,82 +41,85 @@ #define ID_FAN1_FAULT 0x7 #define ID_BULLET_RAIL_FAULT 0x8 #define ID_FAN2_FAULT 0x9 -#define ID_REMAP_UNRELIABLE_FAULT 0x100a -#define ID_RTD_EXIT_FAULT 0x100b -#define ID_LEFT_MC_CONN_FAULT 0x100c -#define ID_RIGHT_MC_CONN_FAULT 0x100d -#define ID_MCU_TEMP_HIGH_FAULT 0x100e -#define ID_DT_L_TEMP_OT_FAULT 0x100f -#define ID_DT_R_TEMP_OT_FAULT 0x1010 -#define ID_DT_L_TEMP_HIGH_FAULT 0x1011 -#define ID_DT_R_TEMP_HIGH_FAULT 0x1012 -#define ID_BAT_COOL_LOOP_HIGH_FAULT 0x1013 -#define ID_DT_COOL_LOOP_HIGH_FAULT 0x1014 -#define ID_DT_R_THERM_DISC_FAULT 0x1015 -#define ID_DT_L_THERM_DISC_FAULT 0x1016 -#define ID_BATT_CL_DISC_FAULT 0x1017 -#define ID_DT_CL_DISC_FAULT 0x1018 -#define ID_BSPD_LATCHED_FAULT 0x1019 -#define ID_BOTS_FAIL_FAULT 0x101a -#define ID_INERTIA_FAIL_FAULT 0x101b -#define ID_COCKPIT_ESTOP_FAULT 0x101c -#define ID_RIGHT_ESTOP_FAULT 0x101d -#define ID_LEFT_ESTOP_FAULT 0x101e -#define ID_HVD_DISC_FAULT 0x101f -#define ID_HUB_DISC_FAULT 0x1020 -#define ID_TSMS_DISC_FAULT 0x1021 -#define ID_PRECHARGE_TIME_FAULT_FAULT 0x1022 -#define ID_MOTOR_R_HEAT_FAULT 0x1023 -#define ID_MOTOR_L_HEAT_FAULT 0x1024 -#define ID_MOTOR_R_OT_FAULT 0x1025 -#define ID_MOTOR_L_OT_FAULT 0x1026 -#define ID_APPS_WIRING_T1_FAULT 0x2027 -#define ID_APPS_WIRING_T2_FAULT 0x2028 -#define ID_BSE_FAULT 0x2029 -#define ID_BSPD_FAULT 0x202a -#define ID_IMPLAUS_DETECTED_FAULT 0x202b -#define ID_APPS_BRAKE_FAULT 0x202c -#define ID_DISCHARGE_LIMIT_ENFORCE_FAULT 0x302d -#define ID_CHARGER_SAFETY_RELAY_FAULT 0x302e -#define ID_INTERNAL_HARDWARE_FAULT 0x302f -#define ID_HEATSINK_THERMISTOR_FAULT 0x3030 -#define ID_SOFTWARE_FAULT 0x3031 -#define ID_MAX_CELLV_HIGH_FAULT 0x3032 -#define ID_MIN_CELLV_LOW_FAULT 0x3033 -#define ID_PACK_OVERHEAT_ORION_FAULT 0x3034 -#define ID_INTERNAL_COMMS_FAULT 0x3035 -#define ID_CELL_BALANCING_FOFF_FAULT 0x3036 -#define ID_WEAK_CELL_FAULT 0x3037 -#define ID_LOW_CELLV_FAULT 0x3038 -#define ID_OPEN_WIRE_FAULT 0x3039 -#define ID_CURRENT_SENSOR_FAULT 0x303a -#define ID_MAX_CELLV_O5V_FAULT 0x303b -#define ID_CELL_ASIC_FAULT 0x303c -#define ID_WEAK_PACK_FAULT 0x303d -#define ID_FAN_MONITOR_FAULT 0x303e -#define ID_THERMISTOR_FAULT 0x303f -#define ID_EXTERNAL_COMMS_FAULT 0x3040 -#define ID_REDUNDANT_PSU_FAULT 0x3041 -#define ID_HV_ISOLATION_FAULT 0x3042 -#define ID_INPUT_PSU_FAULT 0x3043 -#define ID_CHARGE_LIMIT_ENFORCE_FAULT 0x3044 -#define ID_PACK_TEMP_FAULT 0x3045 -#define ID_PACK_TEMP_EXCEEDED_FAULT 0x3046 -#define ID_MIN_PACK_TEMP_FAULT 0x3047 -#define ID_IMD_FAULT 0x3048 -#define ID_TMU_POWER_LOST_FAULT 0x3049 -#define ID_TV_DISABLED_FAULT 0x404a -#define ID_MM_DISABLED_FAULT 0x404b -#define ID_TV_UNCALIBRATED_FAULT 0x404c -#define ID_NO_GPS_FIX_FAULT 0x404d -#define ID_TV_ENABLED_FAULT 0x404e -#define ID_MM_ENABLED_FAULT 0x404f -#define ID_TV_CALIBRATED_FAULT 0x4050 -#define ID_YES_GPS_FIX_FAULT 0x4051 -#define ID_TEST_FAULT_1_FAULT 0x5052 -#define ID_TEST_FAULT_2_FAULT 0x5053 -#define ID_TEST_FAULT_3_FAULT 0x5054 -#define ID_TEST_FAULT_4_FAULT 0x5055 +#define ID_LV_CRITICAL_LOW_FAULT 0xa +#define ID_LV_GETTING_LOW_FAULT 0xb +#define ID_LV_BATT_FIFTY_FAULT 0xc +#define ID_REMAP_UNRELIABLE_FAULT 0x100d +#define ID_RTD_EXIT_FAULT 0x100e +#define ID_LEFT_MC_CONN_FAULT 0x100f +#define ID_RIGHT_MC_CONN_FAULT 0x1010 +#define ID_MCU_TEMP_HIGH_FAULT 0x1011 +#define ID_DT_L_TEMP_OT_FAULT 0x1012 +#define ID_DT_R_TEMP_OT_FAULT 0x1013 +#define ID_DT_L_TEMP_HIGH_FAULT 0x1014 +#define ID_DT_R_TEMP_HIGH_FAULT 0x1015 +#define ID_BAT_COOL_LOOP_HIGH_FAULT 0x1016 +#define ID_DT_COOL_LOOP_HIGH_FAULT 0x1017 +#define ID_DT_R_THERM_DISC_FAULT 0x1018 +#define ID_DT_L_THERM_DISC_FAULT 0x1019 +#define ID_BATT_CL_DISC_FAULT 0x101a +#define ID_DT_CL_DISC_FAULT 0x101b +#define ID_BSPD_LATCHED_FAULT 0x101c +#define ID_BOTS_FAIL_FAULT 0x101d +#define ID_INERTIA_FAIL_FAULT 0x101e +#define ID_COCKPIT_ESTOP_FAULT 0x101f +#define ID_RIGHT_ESTOP_FAULT 0x1020 +#define ID_LEFT_ESTOP_FAULT 0x1021 +#define ID_HVD_DISC_FAULT 0x1022 +#define ID_HUB_DISC_FAULT 0x1023 +#define ID_TSMS_DISC_FAULT 0x1024 +#define ID_PRECHARGE_TIME_FAULT_FAULT 0x1025 +#define ID_MOTOR_R_HEAT_FAULT 0x1026 +#define ID_MOTOR_L_HEAT_FAULT 0x1027 +#define ID_MOTOR_R_OT_FAULT 0x1028 +#define ID_MOTOR_L_OT_FAULT 0x1029 +#define ID_APPS_WIRING_T1_FAULT 0x202a +#define ID_APPS_WIRING_T2_FAULT 0x202b +#define ID_BSE_FAULT 0x202c +#define ID_BSPD_FAULT 0x202d +#define ID_IMPLAUS_DETECTED_FAULT 0x202e +#define ID_APPS_BRAKE_FAULT 0x202f +#define ID_DISCHARGE_LIMIT_ENFORCE_FAULT 0x3030 +#define ID_CHARGER_SAFETY_RELAY_FAULT 0x3031 +#define ID_INTERNAL_HARDWARE_FAULT 0x3032 +#define ID_HEATSINK_THERMISTOR_FAULT 0x3033 +#define ID_SOFTWARE_FAULT 0x3034 +#define ID_MAX_CELLV_HIGH_FAULT 0x3035 +#define ID_MIN_CELLV_LOW_FAULT 0x3036 +#define ID_PACK_OVERHEAT_ORION_FAULT 0x3037 +#define ID_INTERNAL_COMMS_FAULT 0x3038 +#define ID_CELL_BALANCING_FOFF_FAULT 0x3039 +#define ID_WEAK_CELL_FAULT 0x303a +#define ID_LOW_CELLV_FAULT 0x303b +#define ID_OPEN_WIRE_FAULT 0x303c +#define ID_CURRENT_SENSOR_FAULT 0x303d +#define ID_MAX_CELLV_O5V_FAULT 0x303e +#define ID_CELL_ASIC_FAULT 0x303f +#define ID_WEAK_PACK_FAULT 0x3040 +#define ID_FAN_MONITOR_FAULT 0x3041 +#define ID_THERMISTOR_FAULT 0x3042 +#define ID_EXTERNAL_COMMS_FAULT 0x3043 +#define ID_REDUNDANT_PSU_FAULT 0x3044 +#define ID_HV_ISOLATION_FAULT 0x3045 +#define ID_INPUT_PSU_FAULT 0x3046 +#define ID_CHARGE_LIMIT_ENFORCE_FAULT 0x3047 +#define ID_PACK_TEMP_FAULT 0x3048 +#define ID_PACK_TEMP_EXCEEDED_FAULT 0x3049 +#define ID_MIN_PACK_TEMP_FAULT 0x304a +#define ID_IMD_FAULT 0x304b +#define ID_TMU_POWER_LOST_FAULT 0x304c +#define ID_TV_DISABLED_FAULT 0x404d +#define ID_MM_DISABLED_FAULT 0x404e +#define ID_TV_UNCALIBRATED_FAULT 0x404f +#define ID_NO_GPS_FIX_FAULT 0x4050 +#define ID_TV_ENABLED_FAULT 0x4051 +#define ID_MM_ENABLED_FAULT 0x4052 +#define ID_TV_CALIBRATED_FAULT 0x4053 +#define ID_YES_GPS_FIX_FAULT 0x4054 +#define ID_TEST_FAULT_1_FAULT 0x5055 +#define ID_TEST_FAULT_2_FAULT 0x5056 +#define ID_TEST_FAULT_3_FAULT 0x5057 +#define ID_TEST_FAULT_4_FAULT 0x5058 //END AUTO ID DEFS //Macro defs for accessing aspects of id @@ -138,6 +141,9 @@ #define FAN1_PRIORITY 0 #define BULLET_RAIL_PRIORITY 0 #define FAN2_PRIORITY 0 +#define LV_CRITICAL_LOW_PRIORITY 0 +#define LV_GETTING_LOW_PRIORITY 0 +#define LV_BATT_FIFTY_PRIORITY 0 #define REMAP_UNRELIABLE_PRIORITY 0 #define RTD_EXIT_PRIORITY 0 #define LEFT_MC_CONN_PRIORITY 1 @@ -227,6 +233,9 @@ #define FAN1_MAX 1 #define BULLET_RAIL_MAX 1 #define FAN2_MAX 1 +#define LV_CRITICAL_LOW_MAX 50000 +#define LV_GETTING_LOW_MAX 50000 +#define LV_BATT_FIFTY_MAX 50000 #define REMAP_UNRELIABLE_MAX 1 #define RTD_EXIT_MAX 1 #define LEFT_MC_CONN_MAX 1 @@ -316,6 +325,9 @@ #define FAN1_MIN 0 #define BULLET_RAIL_MIN 0 #define FAN2_MIN 0 +#define LV_CRITICAL_LOW_MIN 20000 +#define LV_GETTING_LOW_MIN 21000 +#define LV_BATT_FIFTY_MIN 25000 #define REMAP_UNRELIABLE_MIN 0 #define RTD_EXIT_MIN 0 #define LEFT_MC_CONN_MIN 0 @@ -405,6 +417,9 @@ #define FAN1_LATCH_TIME 100 #define BULLET_RAIL_LATCH_TIME 100 #define FAN2_LATCH_TIME 100 +#define LV_CRITICAL_LOW_LATCH_TIME 500 +#define LV_GETTING_LOW_LATCH_TIME 500 +#define LV_BATT_FIFTY_LATCH_TIME 500 #define REMAP_UNRELIABLE_LATCH_TIME 50 #define RTD_EXIT_LATCH_TIME 100 #define LEFT_MC_CONN_LATCH_TIME 3000 @@ -494,6 +509,9 @@ #define FAN1_UNLATCH_TIME 1000 #define BULLET_RAIL_UNLATCH_TIME 1000 #define FAN2_UNLATCH_TIME 1000 +#define LV_CRITICAL_LOW_UNLATCH_TIME 1500 +#define LV_GETTING_LOW_UNLATCH_TIME 1500 +#define LV_BATT_FIFTY_UNLATCH_TIME 1500 #define REMAP_UNRELIABLE_UNLATCH_TIME 1000 #define RTD_EXIT_UNLATCH_TIME 1000 #define LEFT_MC_CONN_UNLATCH_TIME 1000 @@ -583,6 +601,9 @@ #define FAN1_MSG "Fan 1 Rail Down\0" #define BULLET_RAIL_MSG "Bullet Rail Down\0" #define FAN2_MSG "Fan 2 Rail Down\0" +#define LV_CRITICAL_LOW_MSG "LV bat Very Low (20V)\0" +#define LV_GETTING_LOW_MSG "LV bat Low (21V)\0" +#define LV_BATT_FIFTY_MSG "LV bat Nominal (25V)\0" #define REMAP_UNRELIABLE_MSG "Remap Disabled\0" #define RTD_EXIT_MSG "HV not detected, idling\0" #define LEFT_MC_CONN_MSG "LEFT MC CONN FAIL\0" diff --git a/source/dashboard/can/can_parse.c b/source/dashboard/can/can_parse.c index a4f09455..745df43d 100644 --- a/source/dashboard/can/can_parse.c +++ b/source/dashboard/can/can_parse.c @@ -188,8 +188,6 @@ void canRxUpdate() case ID_THROTTLE_VCU: can_data.throttle_vcu.vcu_k_rl = (int16_t) msg_data_a->throttle_vcu.vcu_k_rl; can_data.throttle_vcu.vcu_k_rr = (int16_t) msg_data_a->throttle_vcu.vcu_k_rr; - can_data.throttle_vcu.equal_k_rl = (int16_t) msg_data_a->throttle_vcu.equal_k_rl; - can_data.throttle_vcu.equal_k_rr = (int16_t) msg_data_a->throttle_vcu.equal_k_rr; can_data.throttle_vcu.stale = 0; can_data.throttle_vcu.last_rx = sched.os_ticks; break; diff --git a/source/dashboard/can/can_parse.h b/source/dashboard/can/can_parse.h index a0d18b10..2cb2f06d 100644 --- a/source/dashboard/can/can_parse.h +++ b/source/dashboard/can/can_parse.h @@ -55,7 +55,7 @@ typedef union { #define ID_GEARBOX 0x10000901 #define ID_DASHBOARD_BL_CMD 0x409c47e #define ID_SDC_STATUS 0xc000381 -#define ID_THROTTLE_VCU 0xc0025b7 +#define ID_THROTTLE_VCU 0x40025b7 #define ID_FAULT_SYNC_PDU 0x8cb1f #define ID_FAULT_SYNC_MAIN_MODULE 0x8ca01 #define ID_FAULT_SYNC_A_BOX 0x8ca44 @@ -94,7 +94,7 @@ typedef union { #define DLC_GEARBOX 2 #define DLC_DASHBOARD_BL_CMD 5 #define DLC_SDC_STATUS 2 -#define DLC_THROTTLE_VCU 8 +#define DLC_THROTTLE_VCU 4 #define DLC_FAULT_SYNC_PDU 3 #define DLC_FAULT_SYNC_MAIN_MODULE 3 #define DLC_FAULT_SYNC_A_BOX 3 @@ -424,8 +424,6 @@ typedef union { struct { uint64_t vcu_k_rl: 16; uint64_t vcu_k_rr: 16; - uint64_t equal_k_rl: 16; - uint64_t equal_k_rr: 16; } throttle_vcu; struct { uint64_t idx: 16; @@ -617,8 +615,6 @@ typedef struct { struct { int16_t vcu_k_rl; int16_t vcu_k_rr; - int16_t equal_k_rl; - int16_t equal_k_rr; uint8_t stale; uint32_t last_rx; } throttle_vcu; diff --git a/source/pdu/main.c b/source/pdu/main.c index b459bb74..64c52c9f 100644 --- a/source/pdu/main.c +++ b/source/pdu/main.c @@ -351,6 +351,10 @@ void pdu_bl_cmd_CALLBACK(CanParsedData_t *msg_data_a) } void send_iv_readings() { + // Set LV Batt faults + setFault(ID_LV_BATT_FIFTY_FAULT, auto_switches.voltage.in_24v); + setFault(ID_LV_GETTING_LOW_FAULT, auto_switches.voltage.in_24v); + setFault(ID_LV_CRITICAL_LOW_FAULT, auto_switches.voltage.in_24v); // Send CAN messages containing voltage and current data SEND_V_RAILS(auto_switches.voltage.in_24v, auto_switches.voltage.out_5v, auto_switches.voltage.out_3v3); SEND_RAIL_CURRENTS(auto_switches.current[CS_24V], auto_switches.current[CS_5V]);