Skip to content

Commit 7da70ed

Browse files
authored
Merge pull request #612 from Northeastern-Electric-Racing/topics-drift
claude topics updates
2 parents 17f2e1f + 66fde69 commit 7da70ed

1 file changed

Lines changed: 64 additions & 28 deletions

File tree

angular-client/src/utils/topic.utils.ts

Lines changed: 64 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ export const chipFault = (segment: Segment, chip: Chip, fault: ChipFault) =>
3939
`BMS/PerCell/${chipToString(chip)}/${segment}/Faults/${fault}`;
4040
export const accCCL = () => `BMS/Commands/Max_DC_Brake_Current_Target`;
4141
export const accDCL = () => `BMS/Commands/Max_DC_Current_Target`;
42+
// Argos/Message_Rate is a server-side synthetic topic — not stored in Scylla
43+
// (absent from /datatypes) but still pushed live, so the header msgs/sec
44+
// indicator keeps working. Left unchanged.
4245
export const msgsPerSecond = () => 'Argos/Message_Rate';
46+
// BMS/PerChip/* branch was removed from the CAN schema; no replacement topic
47+
// found for per-chip PEC error count. Left as-is pending a new source.
4348
export const pecErrorChip = () => `BMS/PerChip/PECErrorChip`;
4449
export const highVoltsChip = () => `BMS/Cells/Volts_High_Chip`;
4550
export const highVoltsCell = () => `BMS/Cells/Volts_High_Cell`;
@@ -57,6 +62,10 @@ export const lowTempCell = () => `BMS/Cells/Temp_Low_Cell`;
5762
export const tempAvgValue = () => `BMS/Cells/Temp_Avg_Value`;
5863

5964
// General
65+
// NOTE: The five topics below are not found in /datatypes (not stored in Scylla)
66+
// but are still published as live MQTT/client-side values, so their string values
67+
// are left unchanged. `latency`/`newLatency` are produced client-side by
68+
// socket.service; `driver`/`location`/`viewers` come from the Argos server itself.
6069
export const driver = () => `Driver`;
6170
export const location = () => `Location`;
6271
export const viewers = () => `Viewers`;
@@ -65,17 +74,27 @@ export const newLatency = () => `Latency`;
6574

6675
// VCU
6776
export const speed = () => `VCU/CarState/speed`;
68-
export const motorController = () => `MPU/Current/Motor_Controller`; // superseded by the MC efuse reading
69-
export const battboxFans = () => `MPU/Current/Battbox_Fans`; // superseded by the fanbatt eFuse reading
70-
export const pumps = () => `MPU/Current/Pumps`; // superseded by the pump1 and pump2 efuse readings
71-
export const lvBoards = () => `MPU/Current/LV_Boards`; // superseded by the LV efuse reading
72-
export const brakePressureFront = () => `VCU/Pedals/PSI/Brake_Front`;
73-
export const brakePressureBack = () => `VCU/Pedals/PSI/Brake_Back`;
77+
// The MPU/Current/* topics were removed when load-current sensing moved off the MPU
78+
// onto the VCU eFuse boards. The replacement topics below are picked from the
79+
// current VCU/eFuses/*/Current set that appears in the live /datatypes list.
80+
export const motorController = () => `VCU/eFuses/MC/Current`; // was MPU/Current/Motor_Controller; MC eFuse reading
81+
export const battboxFans = () => `VCU/eFuses/Fanbatt/Current`; // was MPU/Current/Battbox_Fans; fanbatt eFuse reading
82+
export const pumps = () => `VCU/eFuses/PumpOne/Current`; // was MPU/Current/Pumps; pumps are now two separate eFuses (PumpOne/PumpTwo), only PumpOne is wired here
83+
export const lvBoards = () => `VCU/eFuses/LV/Current`; // was MPU/Current/LV_Boards; LV eFuse reading
84+
// Pedals are now published as raw channel voltages instead of the old PSI-derived
85+
// Brake_Front/Brake_Back names (see VCU/Pedals/Voltages/* in /datatypes).
86+
export const brakePressureFront = () => `VCU/Pedals/Voltages/brake_1`; // was VCU/Pedals/PSI/Brake_Front
87+
export const brakePressureBack = () => `VCU/Pedals/Voltages/brake_2`; // was VCU/Pedals/PSI/Brake_Back
7488

7589
// DTI
7690
export const motorTemp = () => `DTI/Temps/Motor_Temperature`;
7791

7892
// TPU
93+
// NOTE: The entire TPU/* namespace is absent from the current /datatypes list;
94+
// it appears the Raspberry-Pi telemetry feed (CPU/RAM/Wi-Fi/GPS) is no longer
95+
// wired through. Strings left in place because no replacement topics have been
96+
// identified — the raspberry-pi, map, and related components will stay blank
97+
// until a new topic source exists.
7998
export const cpuUsage = () => `TPU/OnBoard/CpuUsage`;
8099
export const cpuTemp = () => `TPU/OnBoard/CpuTemp`;
81100
export const ramUsage = () => `TPU/OnBoard/MemAvailable`;
@@ -87,41 +106,54 @@ export const gpsLocation = () => `TPU/GPS/Location`;
87106
export const packTemp = () => `BMS/Status/Temp_Average`;
88107
export const stateOfCharge = () => `BMS/Pack/SOC`;
89108
export const current = () => `BMS/Charging/Current`;
90-
export const chargeCurrentLimit = () => `BMS/Pack/CCL`;
91-
export const dischargeCurrentLimit = () => `BMS/Pack/DCL`;
109+
// BMS/Pack no longer publishes CCL/DCL in the current bms.json; the CCL/DCL
110+
// values are now conveyed via BMS/Commands/Max_DC_{Brake_,}Current_Target
111+
// (same topics aliased by accCCL/accDCL above).
112+
export const chargeCurrentLimit = () => `BMS/Commands/Max_DC_Brake_Current_Target`; // was BMS/Pack/CCL
113+
export const dischargeCurrentLimit = () => `BMS/Commands/Max_DC_Current_Target`; // was BMS/Pack/DCL
92114
export const statusBalancing = () => `BMS/Status/Balancing`;
93115
export const bmsMode = () => `BMS/Status/State`;
94116
export const charging = () => `BMS/Charging/Control`;
95117
export const packVoltage = () => `BMS/Pack/Voltage`;
96-
export const cellUndervoltage = () => `BMS/Status/F/Cell_Undervoltage`;
97-
export const cellOvervoltage = () => `BMS/Status/F/Cell_Overvoltage`;
98-
export const cellsNotBalancing = () => `BMS/Status/F/Cells_Not_Balancing`;
118+
// BMS faults were moved out of BMS/Status/F/* into BMS/Faults/Critical/* — the
119+
// old Status/F branch no longer exists in /datatypes. Leaf names are unchanged.
120+
export const cellUndervoltage = () => `BMS/Faults/Critical/Cell_Undervoltage`; // was BMS/Status/F/Cell_Undervoltage
121+
export const cellOvervoltage = () => `BMS/Faults/Critical/Cell_Overvoltage`; // was BMS/Status/F/Cell_Overvoltage
122+
export const cellsNotBalancing = () => `BMS/Faults/Critical/Cells_Not_Balancing`; // was BMS/Status/F/Cells_Not_Balancing
99123

100124
// Charger Faults
101125
export const commTimeoutFault = () => `Charger/Box/F_CommTimeout`;
102126
export const hardwareFailureFault = () => `Charger/Box/F_HardwareFailure`;
103127
export const overTempFault = () => `Charger/Box/F_OverTemp`;
104-
export const overVoltageFault = () => `Charger/Box/F_OverVoltage`;
105-
export const wrongBatConnectFault = () => `Charger/Box/F_WrongBatConnect`;
128+
// charger.json renamed F_OverVoltage → F_VoltageWrong and F_WrongBatConnect → F_WrongBatConnection.
129+
export const overVoltageFault = () => `Charger/Box/F_VoltageWrong`; // was Charger/Box/F_OverVoltage
130+
export const wrongBatConnectFault = () => `Charger/Box/F_WrongBatConnection`; // was Charger/Box/F_WrongBatConnect
106131

107132
// BMS Faults
108-
export const openWire = () => `BMS/Status/F/Open_Wire`;
109-
export const chargerLimitEnforcementFault = () => `BMS/Status/F/CCL_Enforce`;
110-
export const chargerCanFault = () => `BMS/Status/F/Charger_Can`;
111-
export const batteryThermistor = () => `BMS/Status/F/Battery_Therm`;
112-
export const chargerSafetyRelay = () => `BMS/Status/F/Charger_Safety`;
113-
export const dischargeLimitEnforcementFault = () => `BMS/Status/F/DCL_Enforce`;
114-
export const externalCanFault = () => `BMS/Status/F/External_Can`;
115-
export const weakPackFault = () => `BMS/Status/F/Weak_Pack`;
116-
export const lowCellVoltage = () => `BMS/Status/F/Low_Cell_Volts`;
117-
export const chargeReadingMismatch = () => `BMS/Status/F/Charge_Reading`;
118-
export const currentSensorFault = () => `BMS/Status/F/Current_Sense`;
119-
export const internalCellCommFault = () => `BMS/Status/F/IC_Comm`;
120-
export const internalThermalError = () => `BMS/Status/F/Thermal_Err`;
121-
export const internalSoftwareFault = () => `BMS/Status/F/Software`;
122-
export const packOverheat = () => `BMS/Status/F/Pack_Overheat`;
133+
// All BMS faults moved from BMS/Status/F/* to BMS/Faults/Critical/* — see the
134+
// Cell_Undervoltage/Overvoltage/NotBalancing block above for the same rename.
135+
// Leaf names unchanged.
136+
export const openWire = () => `BMS/Faults/Critical/Open_Wire`; // was BMS/Status/F/Open_Wire
137+
export const chargerLimitEnforcementFault = () => `BMS/Faults/Critical/CCL_Enforce`; // was BMS/Status/F/CCL_Enforce
138+
export const chargerCanFault = () => `BMS/Faults/Critical/Charger_Can`; // was BMS/Status/F/Charger_Can
139+
export const batteryThermistor = () => `BMS/Faults/Critical/Battery_Therm`; // was BMS/Status/F/Battery_Therm
140+
export const chargerSafetyRelay = () => `BMS/Faults/Critical/Charger_Safety`; // was BMS/Status/F/Charger_Safety
141+
export const dischargeLimitEnforcementFault = () => `BMS/Faults/Critical/DCL_Enforce`; // was BMS/Status/F/DCL_Enforce
142+
export const externalCanFault = () => `BMS/Faults/Critical/External_Can`; // was BMS/Status/F/External_Can
143+
export const weakPackFault = () => `BMS/Faults/Critical/Weak_Pack`; // was BMS/Status/F/Weak_Pack
144+
export const lowCellVoltage = () => `BMS/Faults/Critical/Low_Cell_Volts`; // was BMS/Status/F/Low_Cell_Volts
145+
export const chargeReadingMismatch = () => `BMS/Faults/Critical/Charge_Reading`; // was BMS/Status/F/Charge_Reading
146+
export const currentSensorFault = () => `BMS/Faults/Critical/Current_Sense`; // was BMS/Status/F/Current_Sense
147+
export const internalCellCommFault = () => `BMS/Faults/Critical/IC_Comm`; // was BMS/Status/F/IC_Comm
148+
export const internalThermalError = () => `BMS/Faults/Critical/Thermal_Err`; // was BMS/Status/F/Thermal_Err
149+
export const internalSoftwareFault = () => `BMS/Faults/Critical/Software`; // was BMS/Status/F/Software
150+
export const packOverheat = () => `BMS/Faults/Critical/Pack_Overheat`; // was BMS/Status/F/Pack_Overheat
123151

124152
// Fake / Mock Data
153+
// These placeholder names were never real CAN/MQTT topics; the widgets that
154+
// consume them (motor-info, steering-angle-display, torque-display, accel
155+
// graphs) still reference them but will remain blank until real source topics
156+
// are identified. Leaving strings untouched.
125157
export const motorUsage = () => `Motor Usage`;
126158
export const coolingUsage = () => `Cooling Usage`;
127159
export const steeringAngle = () => `Steering Angle`;
@@ -130,6 +162,10 @@ export const acceleration = () => `Acceleration`;
130162
export const xyzAcceleration = () => `XYZAcceleration`;
131163

132164
// BMS Debug / Per Cell
165+
// BMS/PerCell/OverflowID and BMS/PerChip/PECErrorChip no longer appear in
166+
// /datatypes — the PerChip branch was removed and PerCell/OverflowID wasn't
167+
// carried forward. No replacement identified; the bms-debug-page overflow and
168+
// crc widgets will stay blank until a new source is wired in.
133169
export const perCellOverflowId = () => `BMS/PerCell/OverflowID`;
134170

135171
export const topics = {

0 commit comments

Comments
 (0)