From a799851eaae4f1ba4c8d2606c226439dc470e028 Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Sun, 29 Dec 2024 13:48:00 -0500 Subject: [PATCH] Add A calypso build check, (#219) * add a calypso build * add to mpu the versioning * remove docker container * it be annoying * why doesnt it understand zero * some fixes * add shep * fix duplicate key --- .github/workflows/build_calypso.yml | 22 ++++++ cangen/can-messages/bms.json | 112 +++++++++++++++++++++++++++- cangen/can-messages/mpu.json | 110 +++++++++++++++++++++++++++ 3 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_calypso.yml diff --git a/.github/workflows/build_calypso.yml b/.github/workflows/build_calypso.yml new file mode 100644 index 0000000..7800ebe --- /dev/null +++ b/.github/workflows/build_calypso.yml @@ -0,0 +1,22 @@ +name: Check CAN, build Calypso +on: + push: + paths: + - 'cangen/**' + +jobs: + run-build: + runs-on: ubuntu-latest + steps: + - name: Clone Calypso + uses: actions/checkout@v4 + with: + repository: Northeastern-Electric-Racing/Calypso + + - name: Clone Embedded-base + uses: actions/checkout@v4 + with: + path: "./Embedded-Base" + + - name: Build Calypso + run: cargo build --locked diff --git a/cangen/can-messages/bms.json b/cangen/can-messages/bms.json index 4e9c34a..b56f314 100644 --- a/cangen/can-messages/bms.json +++ b/cangen/can-messages/bms.json @@ -992,5 +992,115 @@ ] } ] - } + }, + { + "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 + } + ] + }, + { + "name": "BMS/Version/Dirty", + "unit": "bool", + "sim": { + "options": [ + [ + 0, + 0.95 + ], + [ + 1, + 0.05 + ] + ] + }, + "points": [ + { + "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 + } + ] + } + ] + } ] diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 67fa5e2..21f5d84 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -932,5 +932,115 @@ ] } ] + }, + { + "id": "0x698", + "desc": "Cerberus Version Tag", + "sim_freq": 1000, + "fields": [ + { + "name": "MPU/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 + } + ] + }, + { + "name": "MPU/Version/Dirty", + "unit": "bool", + "sim": { + "options": [ + [ + 0, + 0.95 + ], + [ + 1, + 0.05 + ] + ] + }, + "points": [ + { + "size": 8 + } + ] + }, + { + "name": "MPU/Version/LocalCommit", + "unit": "bool", + "sim": { + "options": [ + [ + 0, + 0.95 + ], + [ + 1, + 0.05 + ] + ] + }, + "points": [ + { + "size": 8 + } + ] + } + ] + }, + { + "id": "0x699", + "desc": "Cerberus Version Hash", + "sim_freq": 1000, + "fields": [ + { + "name": "MPU/Version/ShortHash", + "unit": "hash", + "sim": { + "min": 0, + "max": 4294967295, + "inc_min": 1, + "inc_max": 1, + "round": true + }, + "points": [ + { + "size": 32 + } + ] + }, + { + "name": "MPU/Version/AuthorHash", + "unit": "hash", + "sim": { + "min": 0, + "max": 4294967295, + "inc_min": 1, + "inc_max": 1, + "round": true + }, + "points": [ + { + "size": 32 + } + ] + } + ] } ]