From 1f52cccb0d4a31bd17346e829cda2071bab123ea Mon Sep 17 00:00:00 2001
From: tszwingli
Date: Sat, 11 Jan 2025 15:04:04 -0500
Subject: [PATCH 1/3] fix bad diff
---
.gitignore | 3 +-
cangen/can-messages/bms.json | 2000 +++++++++++++++++-----------------
2 files changed, 1014 insertions(+), 989 deletions(-)
diff --git a/.gitignore b/.gitignore
index 825d20a..e19e25a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@
__pycache__/
*.egg-info/
-*.nix
\ No newline at end of file
+*.nix
+.DS_Store
\ No newline at end of file
diff --git a/cangen/can-messages/bms.json b/cangen/can-messages/bms.json
index 3a009d5..e16a22a 100644
--- a/cangen/can-messages/bms.json
+++ b/cangen/can-messages/bms.json
@@ -1,997 +1,1021 @@
[
- {
- "id": "0x80",
- "desc": "accumulator status",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Pack/Voltage",
- "unit": "V",
- "sim": {
- "min": 400,
- "max": 505,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 16,
- "format": "divide10"
- }
- ]
- },
- {
- "name": "BMS/Pack/Current",
- "unit": "A",
- "sim": {
- "min": 0,
- "max": 50,
- "inc_min": 0,
- "inc_max": 3
- },
- "send": false,
- "points": [
- {
- "size": 16
- }
- ]
- },
- {
- "name": "BMS/Pack/Amp-hours",
- "unit": "Ah",
- "sim": {
- "min": 0,
- "max": 100,
- "inc_min": 0,
- "inc_max": 0.1
- },
- "points": [
- {
- "size": 16
- }
- ]
- },
- {
- "name": "BMS/Pack/SOC",
- "unit": "%",
- "sim": {
- "min": 0,
- "max": 100,
- "inc_min": 0.01,
- "inc_max": 0.1
- },
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Pack/Health",
- "unit": "%",
- "sim": {
- "min": 0,
- "max": 100,
- "inc_min": 0,
- "inc_max": 0.1
- },
- "points": [
- {
- "size": 8
- }
- ]
- }
+ {
+ "id": "0x80",
+ "desc": "accumulator status",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Pack/Voltage",
+ "unit": "V",
+ "sim": {
+ "min": 400,
+ "max": 505,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 16,
+ "format": "divide10"
+ }
]
- },
- {
- "id": "0x81",
- "desc": "BMS Status",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Status/State",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.01
- ],
- [
- 1,
- 0.80
- ],
- [
- 2,
- 0.15
- ],
- [
- 3,
- 0.04
- ]
- ]
- },
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Status/F/Extra",
- "unit": "",
- "send": false,
- "points": [
- {
- "size": 14
- }
- ]
- },
- {
- "name": "BMS/Status/F/CCL_Enforce",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Charger_Can",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Battery_Therm",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Charger_Safety",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/DCL_Enforce",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/External_Can",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Weak_Pack",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Low_Cell_Volts",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Charge_Reading",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Current_Sense",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/IC_Comm",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Thermal_Err",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Software",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Open_Wire",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Pack_Overheat",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Cell_Undervoltage",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Cell_Overvoltage",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/F/Cells_Not_Balancing",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.5
- ]
- ]
- },
- "points": [
- {
- "size": 1
- }
- ]
- },
- {
- "name": "BMS/Status/Temp_Average",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.5
- },
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Status/Temp_Internal",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 1,
- "inc_max": 1
- },
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Status/Balancing",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.40
- ],
- [
- 1,
- 0.60
- ]
- ]
- },
- "points": [
- {
- "size": 8
- }
- ]
- }
+ },
+ {
+ "name": "BMS/Pack/Current",
+ "unit": "A",
+ "sim": {
+ "min": 0,
+ "max": 50,
+ "inc_min": 0,
+ "inc_max": 3
+ },
+ "send": false,
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ },
+ {
+ "name": "BMS/Pack/Amp-hours",
+ "unit": "Ah",
+ "sim": {
+ "min": 0,
+ "max": 100,
+ "inc_min": 0,
+ "inc_max": 0.1
+ },
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ },
+ {
+ "name": "BMS/Pack/SOC",
+ "unit": "%",
+ "sim": {
+ "min": 0,
+ "max": 100,
+ "inc_min": 0.01,
+ "inc_max": 0.1
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Pack/Health",
+ "unit": "%",
+ "sim": {
+ "min": 0,
+ "max": 100,
+ "inc_min": 0,
+ "inc_max": 0.1
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x81",
+ "desc": "BMS Status",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Status/State",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.01
+ ],
+ [
+ 1,
+ 0.80
+ ],
+ [
+ 2,
+ 0.15
+ ],
+ [
+ 3,
+ 0.04
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Status/Temp_Average",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.5
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Status/Temp_Internal",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 1,
+ "inc_max": 1
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Status/Balancing",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.40
+ ],
+ [
+ 1,
+ 0.60
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x83",
+ "desc": "Cell Data",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Cells/Volts_High_Value",
+ "unit": "V",
+ "sim": {
+ "min": 2.5,
+ "max": 4.25,
+ "inc_min": 0.001,
+ "inc_max": 0.1
+ },
+ "points": [
+ {
+ "size": 16,
+ "format": "divide10000"
+ }
]
- },
- {
- "id": "0x83",
- "desc": "Cell Data",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Cells/Volts_High_Value",
- "unit": "V",
- "sim": {
- "min": 2.5,
- "max": 4.25,
- "inc_min": 0.001,
- "inc_max": 0.1
- },
- "points": [
- {
- "size": 16,
- "format": "divide10000"
- }
- ]
- },
- {
- "name": "BMS/Cells/Volts_High_Chip",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 12,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Volts_High_Cell",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 120,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Volts_Low_Value",
- "unit": "V",
- "sim": {
- "min": 2.5,
- "max": 4.25,
- "inc_min": 0.001,
- "inc_max": 0.1
- },
- "points": [
- {
- "size": 16,
- "format": "divide10000"
- }
- ]
- },
- {
- "name": "BMS/Cells/Volts_Low_Chip",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 12,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Volts_Low_Cell",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 120,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Volts_Avg_Value",
- "unit": "V",
- "sim": {
- "min": 2.5,
- "max": 4.25,
- "inc_min": 0.001,
- "inc_max": 0.1
- },
- "points": [
- {
- "size": 16,
- "format": "divide10000"
- }
- ]
- }
+ },
+ {
+ "name": "BMS/Cells/Volts_High_Chip",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 12,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Volts_High_Cell",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 120,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Volts_Low_Value",
+ "unit": "V",
+ "sim": {
+ "min": 2.5,
+ "max": 4.25,
+ "inc_min": 0.001,
+ "inc_max": 0.1
+ },
+ "points": [
+ {
+ "size": 16,
+ "format": "divide10000"
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Volts_Low_Chip",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 12,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Volts_Low_Cell",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 120,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Volts_Avg_Value",
+ "unit": "V",
+ "sim": {
+ "min": 2.5,
+ "max": 4.25,
+ "inc_min": 0.001,
+ "inc_max": 0.1
+ },
+ "points": [
+ {
+ "size": 16,
+ "format": "divide10000"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x84",
+ "desc": "Cell Temperatures",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Cells/Temp_High_Value",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Temp_High_Cell",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 120,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Temp_High_Chip",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 12,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Temp_Low_Value",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Temp_Low_Cell",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 120,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Temp_Low_Chip",
+ "unit": "",
+ "sim": {
+ "min": 1,
+ "max": 12,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 4
+ }
+ ]
+ },
+ {
+ "name": "BMS/Cells/Temp_Avg_Value",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x85",
+ "desc": "Segment Temperatures",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Segment_Temp/1",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 8,
+ "signed": true
+ }
+ ]
+ },
+ {
+ "name": "BMS/Segment_Temp/2",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 8,
+ "signed": true
+ }
+ ]
+ },
+ {
+ "name": "BMS/Segment_Temp/3",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 8,
+ "signed": true
+ }
+ ]
+ },
+ {
+ "name": "BMS/Segment_Temp/4",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 8,
+ "signed": true
+ }
+ ]
+ },
+ {
+ "name": "BMS/Segment_Temp/5",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 8,
+ "signed": true
+ }
+ ]
+ },
+ {
+ "name": "BMS/Segment_Temp/6",
+ "unit": "C",
+ "sim": {
+ "min": 10,
+ "max": 50,
+ "inc_min": 0.01,
+ "inc_max": 0.3
+ },
+ "points": [
+ {
+ "size": 8,
+ "signed": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x86",
+ "desc": "Current Limits",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Pack/DCL",
+ "unit": "",
+ "sim": {
+ "min": 20,
+ "max": 520,
+ "inc_min": 0.1,
+ "inc_max": 4
+ },
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ },
+ {
+ "name": "BMS/Pack/CCL",
+ "unit": "",
+ "sim": {
+ "min": 0,
+ "max": 25,
+ "inc_min": 0,
+ "inc_max": 2
+ },
+ "points": [
+ {
+ "size": 16,
+ "signed": true
+ }
+ ]
+ },
+ {
+ "name": "BMS/Pack/Current",
+ "unit": "",
+ "sim": {
+ "min": 0,
+ "max": 100,
+ "inc_min": 0,
+ "inc_max": 5
+ },
+ "points": [
+ {
+ "size": 16,
+ "signed": true
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x89",
+ "desc": "Fault Status",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Faults/Extra",
+ "unit": "",
+ "send": false,
+ "points": [
+ {
+ "size": 14
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/CCL_Enforce",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Charger_Can",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Battery_Therm",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Charger_Safety",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/DCL_Enforce",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/External_Can",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Weak_Pack",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Low_Cell_Volts",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Charge_Reading",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Current_Sense",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/IC_Comm",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Thermal_Err",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
]
- },
- {
- "id": "0x84",
- "desc": "Cell Temperatures",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Cells/Temp_High_Value",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 16
- }
- ]
- },
- {
- "name": "BMS/Cells/Temp_High_Cell",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 120,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Temp_High_Chip",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 12,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Temp_Low_Value",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 16
- }
- ]
- },
- {
- "name": "BMS/Cells/Temp_Low_Cell",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 120,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Temp_Low_Chip",
- "unit": "",
- "sim": {
- "min": 1,
- "max": 12,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 4
- }
- ]
- },
- {
- "name": "BMS/Cells/Temp_Avg_Value",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 16
- }
- ]
- }
+ },
+ {
+ "name": "BMS/Faults/Software",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
]
- },
- {
- "id": "0x85",
- "desc": "Segment Temperatures",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Segment_Temp/1",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 8,
- "signed": true
- }
- ]
- },
- {
- "name": "BMS/Segment_Temp/2",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 8,
- "signed": true
- }
- ]
- },
- {
- "name": "BMS/Segment_Temp/3",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 8,
- "signed": true
- }
- ]
- },
- {
- "name": "BMS/Segment_Temp/4",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 8,
- "signed": true
- }
- ]
- },
- {
- "name": "BMS/Segment_Temp/5",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 8,
- "signed": true
- }
- ]
- },
- {
- "name": "BMS/Segment_Temp/6",
- "unit": "C",
- "sim": {
- "min": 10,
- "max": 50,
- "inc_min": 0.01,
- "inc_max": 0.3
- },
- "points": [
- {
- "size": 8,
- "signed": true
- }
- ]
- }
+ },
+ {
+ "name": "BMS/Faults/Open_Wire",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
]
- },
- {
- "id": "0x86",
- "desc": "Current Limits",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Pack/DCL",
- "unit": "",
- "sim": {
- "min": 20,
- "max": 520,
- "inc_min": 0.1,
- "inc_max": 4
- },
- "points": [
- {
- "size": 16
- }
- ]
- },
- {
- "name": "BMS/Pack/CCL",
- "unit": "",
- "sim": {
- "min": 0,
- "max": 25,
- "inc_min": 0,
- "inc_max": 2
- },
- "points": [
- {
- "size": 16,
- "signed": true
- }
- ]
- },
- {
- "name": "BMS/Pack/Current",
- "unit": "",
- "sim": {
- "min": 0,
- "max": 100,
- "inc_min": 0,
- "inc_max": 5
- },
- "points": [
- {
- "size": 16,
- "signed": true
- }
- ]
- }
+ },
+ {
+ "name": "BMS/Faults/Pack_Overheat",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
]
- },
- {
- "id": "0x702",
- "desc": "BMS Debug",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Debug/Spare0",
- "unit": "",
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Debug/Spare1",
- "unit": "",
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Debug/Spare2",
- "unit": "",
- "points": [
- {
- "size": 16
- }
- ]
- },
- {
- "name": "BMS/Debug/Spare3",
- "unit": "",
- "points": [
- {
- "size": 32
- }
- ]
- }
+ },
+ {
+ "name": "BMS/Faults/Cell_Undervoltage",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Cell_Overvoltage",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Cells_Not_Balancing",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Non_Critical",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 1
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 32
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x702",
+ "desc": "BMS Debug",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Debug/Spare0",
+ "unit": "",
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Debug/Spare1",
+ "unit": "",
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Debug/Spare2",
+ "unit": "",
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ },
+ {
+ "name": "BMS/Debug/Spare3",
+ "unit": "",
+ "points": [
+ {
+ "size": 32
+ }
]
+ }
+ ]
},
{
"id": "0x6FF",
@@ -1165,5 +1189,5 @@
]
}
]
- }
-]
+ }
+]
\ No newline at end of file
From e42b148fde3df21069a54b97a4ce48e90cb6a3e9 Mon Sep 17 00:00:00 2001
From: tszwingli
Date: Sat, 11 Jan 2025 15:08:19 -0500
Subject: [PATCH 2/3] applied formatter
---
cangen/can-messages/bms.json | 320 +++++++++++++++++------------------
1 file changed, 160 insertions(+), 160 deletions(-)
diff --git a/cangen/can-messages/bms.json b/cangen/can-messages/bms.json
index e16a22a..6d3a33a 100644
--- a/cangen/can-messages/bms.json
+++ b/cangen/can-messages/bms.json
@@ -1016,178 +1016,178 @@
]
}
]
- },
- {
- "id": "0x6FF",
- "desc": "BMS Fault Timers",
- "sim_freq": 700,
- "fields": [
- {
- "name": "BMS/Fault_Timer/Start_Stop",
- "unit": "",
- "sim": {
- "options": [
- [
- 0,
- 0.5
- ],
- [
- 1,
- 0.25
- ],
- [
- 2,
- 0.25
- ]
- ]
- },
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Fault_Timer/Code",
- "unit": "",
- "sim": {
- "min": 0,
- "max": 31,
- "inc_min": 0,
- "inc_max": 31,
- "round": true
- },
- "points": [
- {
- "size": 8
- }
- ]
- },
- {
- "name": "BMS/Fault_Timer/Value",
- "unit": "",
- "sim": {
- "min": -100,
- "max": 100,
- "inc_min": 0.05,
- "inc_max": 1
- },
- "points": [
- {
- "size": 16
- }
- ]
- }
- ]
- },
- {
- "id": "0x69A",
- "desc": "Shepherd Version Tag",
- "sim_freq": 1000,
- "fields": [
- {
- "name": "BMS/Version/Tag",
- "unit": "major.minor.patch",
- "sim": {
- "min": 0,
- "max": 3,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 8
- },
- {
- "size": 8
- },
- {
- "size": 8
- }
+ },
+ {
+ "id": "0x6FF",
+ "desc": "BMS Fault Timers",
+ "sim_freq": 700,
+ "fields": [
+ {
+ "name": "BMS/Fault_Timer/Start_Stop",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.25
+ ],
+ [
+ 2,
+ 0.25
]
+ ]
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Fault_Timer/Code",
+ "unit": "",
+ "sim": {
+ "min": 0,
+ "max": 31,
+ "inc_min": 0,
+ "inc_max": 31,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Fault_Timer/Value",
+ "unit": "",
+ "sim": {
+ "min": -100,
+ "max": 100,
+ "inc_min": 0.05,
+ "inc_max": 1
+ },
+ "points": [
+ {
+ "size": 16
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "0x69A",
+ "desc": "Shepherd Version Tag",
+ "sim_freq": 1000,
+ "fields": [
+ {
+ "name": "BMS/Version/Tag",
+ "unit": "major.minor.patch",
+ "sim": {
+ "min": 0,
+ "max": 3,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 8
},
{
- "name": "BMS/Version/Dirty",
- "unit": "bool",
- "sim": {
- "options": [
- [
- 0,
- 0.95
- ],
- [
- 1,
- 0.05
- ]
- ]
- },
- "points": [
- {
- "size": 8
- }
- ]
+ "size": 8
},
{
- "name": "BMS/Version/LocalCommit",
- "unit": "bool",
- "sim": {
- "options": [
- [
- 0,
- 0.95
- ],
- [
- 1,
- 0.05
- ]
- ]
- },
- "points": [
- {
- "size": 8
- }
- ]
+ "size": 8
}
]
},
{
- "id": "0x69B",
- "desc": "Shepherd Version Hash",
- "sim_freq": 1000,
- "fields": [
- {
- "name": "BMS/Version/ShortHash",
- "unit": "hash",
- "sim": {
- "min": 0,
- "max": 4294967295,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 32
- }
+ "name": "BMS/Version/Dirty",
+ "unit": "bool",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.95
+ ],
+ [
+ 1,
+ 0.05
]
- },
+ ]
+ },
+ "points": [
{
- "name": "BMS/Version/AuthorHash",
- "unit": "hash",
- "sim": {
- "min": 0,
- "max": 4294967295,
- "inc_min": 1,
- "inc_max": 1,
- "round": true
- },
- "points": [
- {
- "size": 32
- }
+ "size": 8
+ }
+ ]
+ },
+ {
+ "name": "BMS/Version/LocalCommit",
+ "unit": "bool",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.95
+ ],
+ [
+ 1,
+ 0.05
]
+ ]
+ },
+ "points": [
+ {
+ "size": 8
}
]
- }
+ }
+ ]
+ },
+ {
+ "id": "0x69B",
+ "desc": "Shepherd Version Hash",
+ "sim_freq": 1000,
+ "fields": [
+ {
+ "name": "BMS/Version/ShortHash",
+ "unit": "hash",
+ "sim": {
+ "min": 0,
+ "max": 4294967295,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 32
+ }
+ ]
+ },
+ {
+ "name": "BMS/Version/AuthorHash",
+ "unit": "hash",
+ "sim": {
+ "min": 0,
+ "max": 4294967295,
+ "inc_min": 1,
+ "inc_max": 1,
+ "round": true
+ },
+ "points": [
+ {
+ "size": 32
+ }
+ ]
+ }
+ ]
+ }
]
\ No newline at end of file
From 35658817edec8f07b94247ab525be719b8d29313 Mon Sep 17 00:00:00 2001
From: tszwingli
Date: Sat, 11 Jan 2025 16:11:04 -0500
Subject: [PATCH 3/3] mirror bmsfault upper and lower 32-bit
---
cangen/can-messages/bms.json | 377 ++++++++++++++++++++++++++++++++++-
1 file changed, 374 insertions(+), 3 deletions(-)
diff --git a/cangen/can-messages/bms.json b/cangen/can-messages/bms.json
index 6d3a33a..0026f8e 100644
--- a/cangen/can-messages/bms.json
+++ b/cangen/can-messages/bms.json
@@ -956,19 +956,390 @@
]
},
{
- "name": "BMS/Faults/Non_Critical",
+ "name": "BMS/Faults/Extra",
+ "unit": "",
+ "send": false,
+ "points": [
+ {
+ "size": 14
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/CCL_Enforce",
"unit": "",
"sim": {
"options": [
[
0,
- 1
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
]
]
},
"points": [
{
- "size": 32
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Charger_Can",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Battery_Therm",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Charger_Safety",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/DCL_Enforce",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/External_Can",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Weak_Pack",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Low_Cell_Volts",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Charge_Reading",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Current_Sense",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/IC_Comm",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Thermal_Err",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Software",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Open_Wire",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Pack_Overheat",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Cell_Undervoltage",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Cell_Overvoltage",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
+ }
+ ]
+ },
+ {
+ "name": "BMS/Faults/Cells_Not_Balancing",
+ "unit": "",
+ "sim": {
+ "options": [
+ [
+ 0,
+ 0.5
+ ],
+ [
+ 1,
+ 0.5
+ ]
+ ]
+ },
+ "points": [
+ {
+ "size": 1
}
]
}