Skip to content

Commit

Permalink
Feature/anand89/main thermistor mux cleanup (#98)
Browse files Browse the repository at this point in the history
* Luke's stuff and some code

* wip

* Cooling loop complete

* Luke's fixes

---------

Co-authored-by: AdityaAsGithub <[email protected]>
  • Loading branch information
AdityaAsGithub and AdityaAsGithub authored Mar 2, 2024
1 parent 852cdd3 commit 3ad66d2
Show file tree
Hide file tree
Showing 18 changed files with 497 additions and 671 deletions.
16 changes: 5 additions & 11 deletions common/daq/can_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@
"msg_pgn":1
},
{
"msg_name": "flowrate_temps",
"msg_desc": "Flowrate and Water temp of cooling loops",
"msg_name": "coolant_temps",
"msg_desc": "Water temp of cooling loops",
"signals": [
{"sig_name": "battery_in_temp", "sig_desc":"In flow temperature of battery coolant loop", "type":"int8_t", "unit":"C"},
{"sig_name": "battery_out_temp", "sig_desc":"Out flow temperature of battery coolant loop", "type":"int8_t", "unit":"C"},
{"sig_name": "drivetrain_in_temp", "sig_desc":"In flow temperature of drivetrain coolant loop", "type":"int8_t", "unit":"C"},
{"sig_name": "drivetrain_out_temp", "sig_desc":"Out flow temperature of drivetrain coolant loop", "type":"int8_t", "unit":"C"},
{"sig_name": "battery_flowrate", "sig_desc": "Flow rate for battery coolant loop", "type": "uint8_t", "scale": 0.1, "unit":"LPM"},
{"sig_name": "drivetrain_flowrate", "sig_desc": "Flow rate for drivetrain coolant loop", "type": "uint8_t", "scale": 0.1, "unit":"LPM"},
{"sig_name": "battery_fan_speed", "sig_desc": "Speed of battery fan", "type": "uint8_t", "scale":100, "unit":"RPM"},
{"sig_name": "drivetrain_fan_speed", "sig_desc": "Speed of drivetrain fan", "type": "uint8_t", "scale":100, "unit":"RPM"}
{"sig_name": "drivetrain_out_temp", "sig_desc":"Out flow temperature of drivetrain coolant loop", "type":"int8_t", "unit":"C"}
],
"msg_period":200,
"msg_hlp":1,
Expand Down Expand Up @@ -229,9 +225,7 @@
{"msg_name": "max_cell_temp"},
{"msg_name": "LWS_Standard"},
{"msg_name": "main_module_bl_cmd" , "callback": true},
{"msg_name": "cooling_driver_request", "callback": true},
{"msg_name": "throttle_remapped"},
{"msg_name": "pdu_test"}
{"msg_name": "throttle_remapped"}
]
},
{
Expand Down Expand Up @@ -708,7 +702,7 @@
{"msg_name": "precharge_hb"},
{"msg_name": "torque_request_main"},
{"msg_name": "rear_wheel_speeds"},
{"msg_name": "flowrate_temps"},
{"msg_name": "coolant_temps"},
{"msg_name": "coolant_out", "callback": true},
{"msg_name": "gearbox"},
{"msg_name": "dashboard_bl_cmd" , "callback": true}
Expand Down
9 changes: 5 additions & 4 deletions common/daq/daq_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"node_name":"Main_Module",
"includes":"#include \"cooling.h\"\n#include\"main.h\"\n#include\"car.h\"",
"variables": [
{"var_name":"dt_temp_error", "access_phrase":"cooling.dt_temp_error", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"bat_temp_error", "access_phrase":"cooling.bat_temp_error", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"cal_steer_angle", "access_phrase": "calibrateSteeringAngle", "has_read_func":true, "read_only":true, "type":"uint8_t", "length": 1},
{"var_name":"cooling_daq_override", "access_phrase": "cooling.daq_override", "read_only": false, "type":"uint8_t", "length": 1},
{"var_name":"sdc_main_status", "access_phrase": "sdc_mux.main_stat", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"sdc_center_stop_status", "access_phrase": "sdc_mux.c_stop_stat", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"sdc_inertia_sw_status", "access_phrase": "sdc_mux.inertia_stat", "read_only": true, "type":"uint8_t", "length": 1},
Expand All @@ -27,7 +24,11 @@
{"var_name":"sdc_rear_hub_stat", "access_phrase": "sdc_mux.r_hub_stat", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"sdc_tsms_stat", "access_phrase": "sdc_mux.tsms_stat", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"sdc_pchg_out_stat", "access_phrase": "sdc_mux.pchg_out_stat", "read_only": true, "type":"uint8_t", "length": 1},
{"var_name":"daq_buzzer", "access_phrase": "daq_buzzer", "read_only": false, "type": "uint8_t", "length": 1, "unit": "%"}
{"var_name":"daq_buzzer", "access_phrase": "daq_buzzer", "read_only": false, "type": "uint8_t", "length": 1},
{"var_name":"daq_brake", "access_phrase": "daq_brake", "read_only": false, "type": "uint8_t", "length": 1},
{"var_name":"daq_buzzer_brake_status", "access_phrase": "buzzer_brake_fault", "read_only": false, "type": "uint8_t", "length": 1}


],
"files":[]
},
Expand Down
12 changes: 2 additions & 10 deletions common/daq/per_dbc.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ BO_ 2214592577 torque_request_main: 8 Main_Module
SG_ front_right : 16|16@1- (1,0) [0|0] "" Vector__XXX
SG_ front_left : 0|16@1- (1,0) [0|0] "" Vector__XXX

BO_ 2214594689 flowrate_temps: 8 Main_Module
SG_ drivetrain_fan_speed : 56|8@1+ (100,0) [0|0] "RPM" Vector__XXX
SG_ battery_fan_speed : 48|8@1+ (100,0) [0|0] "RPM" Vector__XXX
SG_ drivetrain_flowrate : 40|8@1+ (0.1,0) [0|0] "LPM" Vector__XXX
SG_ battery_flowrate : 32|8@1+ (0.1,0) [0|0] "LPM" Vector__XXX
BO_ 2214594689 coolant_temps: 4 Main_Module
SG_ drivetrain_out_temp : 24|8@1- (1,0) [0|0] "C" Vector__XXX
SG_ drivetrain_in_temp : 16|8@1- (1,0) [0|0] "C" Vector__XXX
SG_ battery_out_temp : 8|8@1- (1,0) [0|0] "C" Vector__XXX
Expand Down Expand Up @@ -595,11 +591,7 @@ CM_ SG_ 2214592577 rear_right "torque request. -4095-4095";
CM_ SG_ 2214592577 rear_left "torque request. -4095-4095";
CM_ SG_ 2214592577 front_right "torque request. -4095-4095";
CM_ SG_ 2214592577 front_left "torque request. -4095-4095";
CM_ BO_ 2214594689 "Flowrate and Water temp of cooling loops";
CM_ SG_ 2214594689 drivetrain_fan_speed "Speed of drivetrain fan";
CM_ SG_ 2214594689 battery_fan_speed "Speed of battery fan";
CM_ SG_ 2214594689 drivetrain_flowrate "Flow rate for drivetrain coolant loop";
CM_ SG_ 2214594689 battery_flowrate "Flow rate for battery coolant loop";
CM_ BO_ 2214594689 "Water temp of cooling loops";
CM_ SG_ 2214594689 drivetrain_out_temp "Out flow temperature of drivetrain coolant loop";
CM_ SG_ 2214594689 drivetrain_in_temp "In flow temperature of drivetrain coolant loop";
CM_ SG_ 2214594689 battery_out_temp "Out flow temperature of battery coolant loop";
Expand Down
104 changes: 79 additions & 25 deletions common/faults/fault_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,94 @@
"lcd_message": "HIGH PDU MCU TEMP"
},
{
"fault_name": "lv_bat_low",
"max": 34,
"min": 24,
"fault_name": "dt_l_temp_ot",
"max": 90,
"min":-100,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 2000,
"lcd_message": "LV Bat Getting Low"
"time_to_unlatch": 1000,
"lcd_message": "Left Gearbox Overheating"
},
{
"fault_name": "lv_bat_very_low",
"max": 34,
"min": 22,
"priority": "error",
"fault_name": "dt_r_temp_ot",
"max": 90,
"min":-100,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 2000,
"lcd_message": "LV Bat Very Low"
"time_to_unlatch": 1000,
"lcd_message": "Right Gearbox Overheating"
},
{
"fault_name": "lv_bat_bms",
"max": 1,
"min": 0,
"priority": "error",
"time_to_latch": 50,
"time_to_unlatch": 2000,
"lcd_message": "LV Bat BMS Fault"
"fault_name": "dt_l_temp_high",
"max": 80,
"min":-100,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "Left Gearbox High (>80C)"
},
{
"fault_name": "drive_flow",
"max": 63,
"min": 46,
"priority": "error",
"time_to_latch": 10,
"time_to_unlatch": 10,
"lcd_message": "battery pump flow brokey"
"fault_name": "dt_r_temp_high",
"max": 80,
"min":-100,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "Right Gearbox High (>80C)"
},
{
"fault_name": "bat_cool_loop_high",
"max": 50,
"min":-100,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "Batt Coolant Loop Temp High"
},
{
"fault_name": "dt_cool_loop_high",
"max": 90,
"min":-100,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "DT Coolant Loop Temp High"
},
{
"fault_name": "dt_r_therm_disc",
"max": 200,
"min":-30,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "Right DT Therm Disconnect"
},
{
"fault_name": "dt_l_therm_disc",
"max": 200,
"min":-30,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "Left DT Therm Disconnect"
},
{
"fault_name": "batt_cl_disc",
"max": 200,
"min":-30,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "Batt CL Therm Disc"
},
{
"fault_name": "dt_cl_disc",
"max": 200,
"min":-30,
"priority": "warning",
"time_to_latch": 1000,
"time_to_unlatch": 1000,
"lcd_message": "DT CL Therm Disc"
}
]
},
Expand Down
Loading

0 comments on commit 3ad66d2

Please sign in to comment.