From dabd82b1d9f70e94d6564b19dd2ca5896a51847d Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Fri, 8 Nov 2024 18:42:20 -0500 Subject: [PATCH 1/7] Did not change pca9539 to tca9549 actually. Just added current CAN to mpu.json --- cangen/can-messages/mpu.json | 185 +++++++++++++++++++---------------- 1 file changed, 101 insertions(+), 84 deletions(-) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 62d43cd..5eb5e17 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -16,8 +16,7 @@ "size": 8 } ] - } - , + }, { "name": "MPU/State/ModeIndex", "unit": "", @@ -30,8 +29,7 @@ "size": 8 } ] - } - , + }, { "name": "MPU/State/Speed", "unit": "mph", @@ -45,8 +43,7 @@ "signed": true } ] - } - , + }, { "name": "MPU/State/TSMS", "unit": "", @@ -61,8 +58,7 @@ ] } ] - } - , + }, { "id": "0x500", "desc": "MPU Sense Acceleromter", @@ -78,25 +74,21 @@ "points": [ { "size": 16 - } - , + }, { "size": 16 - } - , + }, { "size": 16 } ] } ] - } - , + }, { "id": "0x506", "desc": "MPU Sense Gyro", "sim_freq": 250, - "fields": [ { "name": "MPU/Sense/Gyro", @@ -108,20 +100,17 @@ "points": [ { "size": 16 - } - , + }, { "size": 16 - } - , + }, { "size": 16 } ] } ] - } - , + }, { "id": "0x507", "desc": "MPU Sense Temp", @@ -142,8 +131,7 @@ ] } ] - } - , + }, { "id": "0x502", "desc": "MPU Fault", @@ -161,8 +149,7 @@ "size": 32 } ] - } - , + }, { "name": "MPU/Fault/Severity", "unit": "", @@ -177,8 +164,7 @@ ] } ] - } - , + }, { "id": "0x503", "desc": "MPU Sense Voltage", @@ -200,8 +186,7 @@ ] } ] - } - , + }, { "id": "0x504", "desc": "MPU Accel Pedals", @@ -219,8 +204,7 @@ "size": 32 } ] - } - , + }, { "name": "MPU/Pedals/Accelerator_2", "unit": "", @@ -235,8 +219,7 @@ ] } ] - } - , + }, { "id": "0x505", "desc": "MPU Brake Pedals", @@ -254,8 +237,7 @@ "size": 32 } ] - } - , + }, { "name": "MPU/Pedals/Brake_2", "unit": "", @@ -270,8 +252,7 @@ ] } ] - } - , + }, { "id": "0x701", "desc": "MPU Debug", @@ -289,8 +270,7 @@ "size": 8 } ] - } - , + }, { "name": "MPU/Debug/Spare1", "unit": "", @@ -304,8 +284,7 @@ "signed": true } ] - } - , + }, { "name": "MPU/Debug/Spare2", "unit": "", @@ -319,8 +298,7 @@ "endianness": "little" } ] - } - , + }, { "name": "MPU/Debug/Spare3", "unit": "", @@ -337,8 +315,7 @@ ] } ] - } - , + }, { "id": "0x123", "desc": "MPU Shutdown", @@ -356,8 +333,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/BMS", "unit": "", @@ -370,8 +346,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/Inertia", "unit": "", @@ -384,8 +359,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/Spare_GPIO_1", "unit": "", @@ -398,8 +372,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/IMD", "unit": "", @@ -412,8 +385,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/BSPD", "unit": "", @@ -426,8 +398,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/BOTS", "unit": "", @@ -440,8 +411,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/HVD_Interlock", "unit": "", @@ -454,8 +424,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/HVC_Interlock", "unit": "", @@ -468,8 +437,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Shutdown/Reserved", "unit": "", @@ -481,8 +449,7 @@ ] } ] - } - , + }, { "id": "0x111", "desc": "MPU Fuses", @@ -500,8 +467,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/LVBox", "unit": "", @@ -514,8 +480,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/FanRadiator", "unit": "", @@ -528,8 +493,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/MC", "unit": "", @@ -542,8 +506,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/FanBattbox", "unit": "", @@ -556,8 +519,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/Pump", "unit": "", @@ -570,8 +532,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/Dashboard", "unit": "", @@ -584,8 +545,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/Brakelight", "unit": "", @@ -598,8 +558,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/BRB", "unit": "", @@ -612,8 +571,7 @@ "size": 1 } ] - } - , + }, { "name": "MPU/Fuses/Reserved", "unit": "", @@ -625,5 +583,64 @@ ] } ] + }, + { + "id": "0x508", + "desc": "PDU Current", + "sim_freq": 1000, + "fields": [ + { + "name": "PDU/Current/Motor_Controller_Current", + "unit": "A", + "sim_min": 0, + "sim_max": 1, + "sim_inc_min": 1, + "sim_inc_max": 1, + "points": [ + { + "size": 16 + } + ] + }, + { + "name": "PDU/Current/Battbox_Fans_Current", + "unit": "A", + "sim_min": 0, + "sim_max": 1, + "sim_inc_min": 1, + "sim_inc_max": 1, + "points": [ + { + "size": 16 + } + ] + }, + { + "name": "PDU/Current/Pumps_Current", + "unit": "A", + "sim_min": 0, + "sim_max": 1, + "sim_inc_min": 1, + "sim_inc_max": 1, + "points": [ + { + "size": 16 + } + ] + }, + { + "name": "PDU/Current/LV_Boards_Current", + "unit": "A", + "sim_min": 0, + "sim_max": 1, + "sim_inc_min": 1, + "sim_inc_max": 1, + "points": [ + { + "size": 16 + } + ] + } + ] } -] +] \ No newline at end of file From 1158d0ee6df219e1c742aadf901b0ab45725fed8 Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Fri, 8 Nov 2024 20:08:14 -0500 Subject: [PATCH 2/7] Changes to current stuff in mpu.json --- cangen/can-messages/mpu.json | 40 +++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 5eb5e17..8d985e1 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -593,12 +593,14 @@ "name": "PDU/Current/Motor_Controller_Current", "unit": "A", "sim_min": 0, - "sim_max": 1, - "sim_inc_min": 1, - "sim_inc_max": 1, + "sim_max": 3, + "sim_inc_min": 0.01, + "sim_inc_max": 3, "points": [ { - "size": 16 + "size": 16, + "endianness": "little", + "format": "divide1000" } ] }, @@ -606,12 +608,14 @@ "name": "PDU/Current/Battbox_Fans_Current", "unit": "A", "sim_min": 0, - "sim_max": 1, - "sim_inc_min": 1, - "sim_inc_max": 1, + "sim_max": 5, + "sim_inc_min": 0.01, + "sim_inc_max": 5, "points": [ { - "size": 16 + "size": 16, + "endianness": "little", + "format": "divide1000" } ] }, @@ -619,12 +623,14 @@ "name": "PDU/Current/Pumps_Current", "unit": "A", "sim_min": 0, - "sim_max": 1, - "sim_inc_min": 1, - "sim_inc_max": 1, + "sim_max": 2, + "sim_inc_min": 0.01, + "sim_inc_max": 2, "points": [ { - "size": 16 + "size": 16, + "endianness": "little", + "format": "divide1000" } ] }, @@ -632,12 +638,14 @@ "name": "PDU/Current/LV_Boards_Current", "unit": "A", "sim_min": 0, - "sim_max": 1, - "sim_inc_min": 1, - "sim_inc_max": 1, + "sim_max": 1.25, + "sim_inc_min": 0.01, + "sim_inc_max": 1.25, "points": [ { - "size": 16 + "size": 16, + "endianness": "little", + "format": "divide1000" } ] } From 1e5192c7ca97c262e6a47b651c5dc53a8faeac59 Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Sat, 9 Nov 2024 14:34:43 -0500 Subject: [PATCH 3/7] Corrected names for PDU Current CAN messages in mpu.json --- cangen/can-messages/mpu.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 8d985e1..92cf402 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -590,7 +590,7 @@ "sim_freq": 1000, "fields": [ { - "name": "PDU/Current/Motor_Controller_Current", + "name": "MPU/Current/Motor_Controller_Current", "unit": "A", "sim_min": 0, "sim_max": 3, @@ -605,7 +605,7 @@ ] }, { - "name": "PDU/Current/Battbox_Fans_Current", + "name": "MPU/Current/Battbox_Fans_Current", "unit": "A", "sim_min": 0, "sim_max": 5, @@ -620,7 +620,7 @@ ] }, { - "name": "PDU/Current/Pumps_Current", + "name": "MPU/Current/Pumps_Current", "unit": "A", "sim_min": 0, "sim_max": 2, @@ -635,7 +635,7 @@ ] }, { - "name": "PDU/Current/LV_Boards_Current", + "name": "MPU/Current/LV_Boards_Current", "unit": "A", "sim_min": 0, "sim_max": 1.25, From e32f394040d91597b2a34538e151ec13ac12e1fa Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Sun, 10 Nov 2024 17:29:56 -0500 Subject: [PATCH 4/7] Updated fuse and shutdown repackaging as bools in mpu.json --- cangen/can-messages/mpu.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 92cf402..176852b 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -323,7 +323,7 @@ "fields": [ { "name": "MPU/Shutdown/CockpitBRB", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -336,7 +336,7 @@ }, { "name": "MPU/Shutdown/BMS", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -349,7 +349,7 @@ }, { "name": "MPU/Shutdown/Inertia", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -362,7 +362,7 @@ }, { "name": "MPU/Shutdown/Spare_GPIO_1", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -375,7 +375,7 @@ }, { "name": "MPU/Shutdown/IMD", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -388,7 +388,7 @@ }, { "name": "MPU/Shutdown/BSPD", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -401,7 +401,7 @@ }, { "name": "MPU/Shutdown/BOTS", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -414,7 +414,7 @@ }, { "name": "MPU/Shutdown/HVD_Interlock", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -427,7 +427,7 @@ }, { "name": "MPU/Shutdown/HVC_Interlock", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -457,7 +457,7 @@ "fields": [ { "name": "MPU/Fuses/Battbox", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -470,7 +470,7 @@ }, { "name": "MPU/Fuses/LVBox", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -483,7 +483,7 @@ }, { "name": "MPU/Fuses/FanRadiator", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -496,7 +496,7 @@ }, { "name": "MPU/Fuses/MC", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -509,7 +509,7 @@ }, { "name": "MPU/Fuses/FanBattbox", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -522,7 +522,7 @@ }, { "name": "MPU/Fuses/Pump", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -535,7 +535,7 @@ }, { "name": "MPU/Fuses/Dashboard", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -548,7 +548,7 @@ }, { "name": "MPU/Fuses/Brakelight", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, @@ -561,7 +561,7 @@ }, { "name": "MPU/Fuses/BRB", - "unit": "", + "unit": "bool", "sim_min": 0, "sim_max": 1, "sim_inc_min": 1, From 92b631fc92eeed07b36a6598e6845ccfbd4b5728 Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Wed, 13 Nov 2024 15:10:32 -0500 Subject: [PATCH 5/7] Added PUMP_FUSE_STAT1 to MPU Fuses list --- cangen/can-messages/mpu.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 176852b..0b7a44b 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -572,6 +572,19 @@ } ] }, + { + "name": "MPU/Fuses/Pump1", + "unit": "bool", + "sim_min": 0, + "sim_max": 1, + "sim_inc_min": 1, + "sim_inc_max": 1, + "points": [ + { + "size": 1 + } + ] + }, { "name": "MPU/Fuses/Reserved", "unit": "", From fd9a84579eceaceb5b324699baaab24301c1745c Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Tue, 19 Nov 2024 16:51:42 -0500 Subject: [PATCH 6/7] Changed names for Current in mpu.json --- cangen/can-messages/mpu.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index 0b7a44b..36d274a 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -603,7 +603,7 @@ "sim_freq": 1000, "fields": [ { - "name": "MPU/Current/Motor_Controller_Current", + "name": "MPU/Current/Motor_Controller", "unit": "A", "sim_min": 0, "sim_max": 3, @@ -618,7 +618,7 @@ ] }, { - "name": "MPU/Current/Battbox_Fans_Current", + "name": "MPU/Current/Battbox_Fans", "unit": "A", "sim_min": 0, "sim_max": 5, @@ -633,7 +633,7 @@ ] }, { - "name": "MPU/Current/Pumps_Current", + "name": "MPU/Current/Pumps", "unit": "A", "sim_min": 0, "sim_max": 2, @@ -648,7 +648,7 @@ ] }, { - "name": "MPU/Current/LV_Boards_Current", + "name": "MPU/Current/LV_Boards", "unit": "A", "sim_min": 0, "sim_max": 1.25, From 5859a7ba81d73f0dc9dea29b70921e7a9e80b301 Mon Sep 17 00:00:00 2001 From: bjackson312006 Date: Mon, 13 Jan 2025 12:03:07 -0500 Subject: [PATCH 7/7] Added CAN messages for Pump Sensors --- cangen/can-messages/mpu.json | 76 +++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/cangen/can-messages/mpu.json b/cangen/can-messages/mpu.json index d7cdd85..d28a544 100644 --- a/cangen/can-messages/mpu.json +++ b/cangen/can-messages/mpu.json @@ -130,8 +130,7 @@ "format": "divide100" } ] - } - , + }, { "name": "MPU/State/TorqueLimit", "unit": "percentage", @@ -963,10 +962,10 @@ "name": "MPU/Current/Motor_Controller", "unit": "A", "sim": { - "min": 0, - "max": 3, - "inc_min": 0.01, - "inc_max": 3 + "min": 0, + "max": 3, + "inc_min": 0.01, + "inc_max": 3 }, "points": [ { @@ -980,10 +979,10 @@ "name": "MPU/Current/Battbox_Fans", "unit": "A", "sim": { - "min": 0, - "max": 5, - "inc_min": 0.01, - "inc_max": 5 + "min": 0, + "max": 5, + "inc_min": 0.01, + "inc_max": 5 }, "points": [ { @@ -997,10 +996,10 @@ "name": "MPU/Current/Pumps", "unit": "A", "sim": { - "min": 0, - "max": 2, - "inc_min": 0.01, - "inc_max": 2 + "min": 0, + "max": 2, + "inc_min": 0.01, + "inc_max": 2 }, "points": [ { @@ -1014,10 +1013,10 @@ "name": "MPU/Current/LV_Boards", "unit": "A", "sim": { - "min": 0, - "max": 1.25, - "inc_min": 0.01, - "inc_max": 1.25 + "min": 0, + "max": 1.25, + "inc_min": 0.01, + "inc_max": 1.25 }, "points": [ { @@ -1028,5 +1027,46 @@ ] } ] + }, + { + "id": "0x509", + "desc": "Pump Sensors Voltage", + "sim_freq": 1000, + "fields": [ + { + "name": "MPU/Pump_Sensors/Sensor0", + "unit": "V", + "sim": { + "min": 0, + "max": 3.3, + "inc_min": 0.01, + "inc_max": 1 + }, + "points": [ + { + "size": 32, + "endianness": "little", + "format": "divide10000" + } + ] + }, + { + "name": "MPU/Pump_Sensors/Sensor1", + "unit": "V", + "sim": { + "min": 0, + "max": 3.3, + "inc_min": 0.01, + "inc_max": 1 + }, + "points": [ + { + "size": 32, + "endianness": "little", + "format": "divide10000" + } + ] + } + ] } ] \ No newline at end of file