Skip to content

Commit 0a7e985

Browse files
header modifications and ADC updates
forgot to modify adc_readings struct WIP: tmu changes
1 parent 3c7143f commit 0a7e985

File tree

10 files changed

+546
-326
lines changed

10 files changed

+546
-326
lines changed

common/daq/can_config.json

Lines changed: 98 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,23 @@
297297
"msg_period": 1000
298298
},
299299
{
300-
"msg_name": "num_therm_bad",
301-
"msg_desc": "Number of wonky thermistors on pack",
302-
"signals":[
303-
{"sig_name": "A", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t"},
304-
{"sig_name": "B", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t"},
305-
{"sig_name": "C", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t"},
306-
{"sig_name": "D", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t"}
307-
],
308-
"msg_period": 500,
309-
"msg_hlp": 4,
310-
"msg_pgn": 515
300+
"msg_name": "num_therm_bad",
301+
"msg_desc": "Number of wonky thermistors on pack",
302+
"signals":[
303+
{"sig_name": "A_left", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
304+
{"sig_name": "A_right", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
305+
{"sig_name": "B_left", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
306+
{"sig_name": "B_right", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
307+
{"sig_name": "C_left", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
308+
{"sig_name": "C_right", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
309+
{"sig_name": "D_left", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
310+
{"sig_name": "D_right", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
311+
{"sig_name": "E_left", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4},
312+
{"sig_name": "E_right", "sig_desc": "Number of thermistors > 1.5v", "type": "uint8_t", "length": 4}
313+
],
314+
"msg_period": 500,
315+
"msg_hlp": 4,
316+
"msg_pgn": 515
311317
},
312318
{
313319
"msg_name": "pack_charge_status",
@@ -331,64 +337,124 @@
331337
"msg_hlp":3,
332338
"msg_pgn":5016
333339
},
334-
{ "msg_name": "mod_cell_temp_avg",
340+
{ "msg_name": "mod_cell_temp_avg_a_b_c",
335341
"msg_desc": "Average cell temperature for each module",
336342
"signals":[
337343
{"sig_name": "temp_A", "type": "int16_t", "scale": 0.1},
338344
{"sig_name": "temp_B", "type": "int16_t", "scale": 0.1},
339-
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1},
340-
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1}
345+
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1}
341346
],
342347
"msg_period":0,
343348
"msg_hlp":5,
344349
"msg_pgn":1234
345350
},
346-
{"msg_name": "mod_cell_temp_max",
347-
"msg_desc": "Max cell temperature for each module",
351+
{ "msg_name": "mod_cell_temp_avg_d_e",
352+
"msg_desc": "Average cell temperature for each module",
353+
"signals":[
354+
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1},
355+
{"sig_name": "temp_E", "type": "int16_t", "scale": 0.1}
356+
],
357+
"msg_period":0,
358+
"msg_hlp":5,
359+
"msg_pgn":1235
360+
},
361+
{"msg_name": "mod_cell_temp_max_a_b_c",
362+
"msg_desc": "Max cell temperature for a, b, and c",
348363
"signals":[
349364
{"sig_name": "temp_A", "type": "int16_t", "scale": 0.1},
350365
{"sig_name": "temp_B", "type": "int16_t", "scale": 0.1},
351-
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1},
352-
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1}
366+
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1}
353367
],
354368
"msg_period":0,
355369
"msg_hlp":5,
356370
"msg_pgn":516
357371
},
358-
{"msg_name": "mod_cell_temp_min",
359-
"msg_desc": "Min cell temperature for each module",
372+
{"msg_name": "mod_cell_temp_max_d_e",
373+
"msg_desc": "Max cell temperature for d and e",
374+
"signals":[
375+
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1},
376+
{"sig_name": "temp_E", "type": "int16_t", "scale": 0.1}
377+
],
378+
"msg_period":0,
379+
"msg_hlp":5,
380+
"msg_pgn":517
381+
},
382+
{"msg_name": "mod_cell_temp_min_a_b_c",
383+
"msg_desc": "Min cell temperature for each a, b, and c",
360384
"signals":[
361385
{"sig_name": "temp_A", "type": "int16_t", "scale": 0.1},
362386
{"sig_name": "temp_B", "type": "int16_t", "scale": 0.1},
363-
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1},
364-
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1}
387+
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1}
365388
],
366389
"msg_period":0,
367390
"msg_hlp":5,
368391
"msg_pgn":520
369392
},
370-
{ "msg_name": "raw_cell_temp_a_b",
371-
"msg_desc": "Raw Cell temperature of a specific thermistor in each module",
393+
{"msg_name": "mod_cell_temp_min_d_e",
394+
"msg_desc": "Min cell temperature for each d and e",
395+
"signals":[
396+
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1},
397+
{"sig_name": "temp_E", "type": "int16_t", "scale": 0.1}
398+
],
399+
"msg_period":0,
400+
"msg_hlp":5,
401+
"msg_pgn":521
402+
},
403+
{ "msg_name": "raw_cell_temp_module1",
404+
"msg_desc": "Raw cell temperature for each module of thermistor at index",
372405
"signals":[
373-
{"sig_name": "index", "sig_desc": "Thermistor number being read (Starting from 0)", "type": "uint8_t", "length": 8},
374-
{"sig_name": "temp_A", "type": "int16_t", "scale": 0.1, "unit": "C"},
375-
{"sig_name": "temp_B", "type": "int16_t", "scale": 0.1, "unit": "C"}
406+
{"sig_name": "index", "type": "uint8_t", "length": 8},
407+
{"sig_name": "temp_left", "type": "int16_t", "scale": 0.1, "unit": "C"},
408+
{"sig_name": "temp_right", "type": "int16_t", "scale": 0.1, "unit": "C"}
376409
],
377410
"msg_period":0,
378411
"msg_hlp":5,
379412
"msg_pgn":1222
380413
},
381-
{"msg_name": "raw_cell_temp_c_d",
382-
"msg_desc": "Raw Cell temperature of a specific thermistor in each module",
414+
{"msg_name": "raw_cell_temp_module2",
415+
"msg_desc": "Raw cell temperature for each module of thermistor at index",
383416
"signals":[
384-
{"sig_name": "index", "sig_desc": "Thermistor number being read (Starting from 0)", "type": "uint8_t", "length": 8},
385-
{"sig_name": "temp_C", "type": "int16_t", "scale": 0.1, "unit": "C"},
386-
{"sig_name": "temp_D", "type": "int16_t", "scale": 0.1, "unit": "C"}
417+
{"sig_name": "index", "type": "uint8_t", "length": 8},
418+
{"sig_name": "temp_left", "type": "int16_t", "scale": 0.1, "unit": "C"},
419+
{"sig_name": "temp_right", "type": "int16_t", "scale": 0.1, "unit": "C"}
387420
],
388421
"msg_period":0,
389422
"msg_hlp":5,
390423
"msg_pgn":526
391424
},
425+
{"msg_name": "raw_cell_temp_module3",
426+
"msg_desc": "Raw cell temperature for each module of thermistor at index",
427+
"signals":[
428+
{"sig_name": "index", "type": "uint8_t", "length": 8},
429+
{"sig_name": "temp_left", "type": "int16_t", "scale": 0.1, "unit": "C"},
430+
{"sig_name": "temp_right", "type": "int16_t", "scale": 0.1, "unit": "C"}
431+
],
432+
"msg_period":0,
433+
"msg_hlp":5,
434+
"msg_pgn":527
435+
},
436+
{"msg_name": "raw_cell_temp_module4",
437+
"msg_desc": "Raw cell temperature for each module of thermistor at index",
438+
"signals":[
439+
{"sig_name": "index", "type": "uint8_t", "length": 8},
440+
{"sig_name": "temp_left", "type": "int16_t", "scale": 0.1, "unit": "C"},
441+
{"sig_name": "temp_right", "type": "int16_t", "scale": 0.1, "unit": "C"}
442+
],
443+
"msg_period":0,
444+
"msg_hlp":5,
445+
"msg_pgn":528
446+
},
447+
{"msg_name": "raw_cell_temp_module5",
448+
"msg_desc": "Raw cell temperature for each module of thermistor at index",
449+
"signals":[
450+
{"sig_name": "index", "type": "uint8_t", "length": 8},
451+
{"sig_name": "temp_left", "type": "int16_t", "scale": 0.1, "unit": "C"},
452+
{"sig_name": "temp_right", "type": "int16_t", "scale": 0.1, "unit": "C"}
453+
],
454+
"msg_period":0,
455+
"msg_hlp":5,
456+
"msg_pgn":529
457+
},
392458
{
393459
"msg_name": "a_box_can_stats",
394460
"msg_desc": "CAN diagnostics",

common/daq/daq_config.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,16 @@
5151
{"var_name":"user_charge_voltage_request", "access_phrase":"user_charge_voltage_request", "read_only": false, "type":"uint16_t", "length": 16},
5252
{"var_name":"tmu_daq_override", "access_phrase": "tmu_daq_override", "read_only": false, "type":"uint8_t", "length": 1},
5353
{"var_name":"tmu_daq_therm", "access_phrase": "tmu_daq_therm", "read_only": false, "type": "uint8_t", "length":4},
54-
{"var_name":"tmu_1", "access_phrase": "adc_readings.tmu_1", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
55-
{"var_name":"tmu_2", "access_phrase": "adc_readings.tmu_2", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
56-
{"var_name":"tmu_3", "access_phrase": "adc_readings.tmu_3", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
57-
{"var_name":"tmu_4", "access_phrase": "adc_readings.tmu_4", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
54+
{"var_name":"tmu_1_1", "access_phrase": "adc_readings.tmu_1_1", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
55+
{"var_name":"tmu_1_2", "access_phrase": "adc_readings.tmu_1_2", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
56+
{"var_name":"tmu_2_1", "access_phrase": "adc_readings.tmu_2_1", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
57+
{"var_name":"tmu_2_2", "access_phrase": "adc_readings.tmu_2_2", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
58+
{"var_name":"tmu_3_1", "access_phrase": "adc_readings.tmu_3_1", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
59+
{"var_name":"tmu_3_2", "access_phrase": "adc_readings.tmu_3_2", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
60+
{"var_name":"tmu_4_1", "access_phrase": "adc_readings.tmu_4_1", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
61+
{"var_name":"tmu_4_2", "access_phrase": "adc_readings.tmu_4_2", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
62+
{"var_name":"tmu_5_1", "access_phrase": "adc_readings.tmu_5_1", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
63+
{"var_name":"tmu_5_2", "access_phrase": "adc_readings.tmu_5_2", "read_only": true, "type": "uint16_t", "length": 12, "unit": "12-bit adc"},
5864
{"var_name":"bms_daq_override", "access_phrase": "bms_daq_override", "read_only": false, "type":"uint8_t", "length": 1},
5965
{"var_name":"bms_daq_stat", "access_phrase": "bms_daq_stat", "read_only": false, "type": "uint8_t", "length":1},
6066
{"var_name":"can_esr", "access_phrase": "CAN1->ESR", "read_only": true, "type":"uint32_t", "length": 32}

0 commit comments

Comments
 (0)