From 2a55adcb934a9fd5bf5d75f30dc4e7e0f647aeaa Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Sat, 10 Aug 2024 21:10:49 -0400 Subject: [PATCH] initial versioning scheme, mpu only --- cangen/can-messages/mpu.yaml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/cangen/can-messages/mpu.yaml b/cangen/can-messages/mpu.yaml index 8bed954..d39abe8 100644 --- a/cangen/can-messages/mpu.yaml +++ b/cangen/can-messages/mpu.yaml @@ -151,6 +151,51 @@ msgs: - !CANPoint size: 32 +# versioning message, identical to shep +- !CANMsg + id: "0x698" + desc: "Cerberus Version Tag" + feilds: + - !NetField: # the version number + name: "MPU/Version/Tag" + unit: "major.minor.patch" + points: + - !CANPoint + size: 8 + - !CANPoint + size: 8 + - !CANPoint + size: 8 + - !NetField: # whether there were uncommitted changes + name: "MPU/Version/Dirty" + unit: "bool" + points: + - !CANPoint + size: 8 + - !NetField: # whether there were local commits not pushed to the remote + name: "MPU/Version/LocalCommit" + unit: "bool" + points: + - !CANPoint + size: 8 + +- !CANMsg + id: "0x699" + desc: "Cerberus Version Hash" + feilds: + - !NetField: # the short hash of the code when make was ran + name: "MPU/Version/ShortHash" # use `git show $(echo "obase=16; ")` to fetch + unit: "" + points: + - !CANPoint + size: 32 + - !NetField: # a random commit hash of the individual's git name who ran make + name: "MPU/Version/AuthorHash" # use `git log --format=%an -1 -p $(echo "obase=16; ") | head -n 1` to fetch + unit: "" + points: + - !CANPoint + size: 32 + # debugging only - use messages as needed, be sure to fill rest with FFs and only send from one place in code - !CANMsg id: "0x701"