Repository navigation
TEL: Fix dashboard labels - #200
Conversation
26af8b7 to
158acd7
Compare
gregorybian
left a comment
There was a problem hiding this comment.
Greg's AI Review
🟡 Medium — sunlite DBC still decodes 0x764 as CPULoad
This PR turns ID 1892 (0x764, which matches TEL_HEALTH_CAN_ID in firmware_v4 tel/driver/can_driver.h:101) into TELMCUHealth with two u16 signals. But sunlite/dbc/brightside.dbc:400 still defines it as a 32-bit float CPULoad (and line 803 still has its SIG_VALTYPE_). It also lacks the new GPSWriteFail/MCUOvertemp/MCUUndervoltage bits. Over the LTE path, sunlite will write the voltage and temperature bytes into Influx as a meaningless float CPULoad field, so the new MCU Voltage/Temperature panels stay empty. Per the workspace's cross-repo rule, make the same DBC edit in sunlite, either in this PR or a linked one.
🔵 Low — New MCU panels carry copy-pasted IMU config, no units
dashboards/PROD/PROD_TEL_Brightside.json:1853
The MCU Voltage (id 19) and MCU Temperature (id 20) panels were cloned from the IMU Gyroscope Z panel. They keep a byName override on Gyroscope_Z {car="Brightside", class="IMU_Z"} and an unused red threshold at 80 that has nothing to do with these signals. They also set no unit, even though the query converts mV to V and the DBC unit is Celsius. Remove the stale override and threshold, and set unit: "volt" and unit: "celsius". Optionally, add thresholds matching the firmware's MIN_VOLT_MV/MAX_TEMP_C so the plot shows the fault limits.
🔵 Low — New flag panels skip measurement filter; GPSWriteFail has no panel
dashboards/PROD/PROD_TEL_Brightside.json:604
The MCU Overtemp and MCU Undervoltage stat queries filter only on _field, while GPS Read Fail and the new timeseries panels also filter _measurement == "TEL". If any other board's DBC ever reuses the field name, the panel will mix sources. Add the measurement filter for consistency. Separately, this PR adds GPSWriteFail (bit 4) to the DBC, but no panel shows it, so a GPS write fault will go unseen on the dashboard. Add a stat panel next to GPS Read Fail.
Summary
The PR replaces the old CPULoad message (0x764) with TELMCUHealth (MCU voltage in mV and temperature in °C as u16) and adds three TEL diagnostic bits (GPSWriteFail, MCUOvertemp, MCUUndervoltage). It also adds Grafana panels for them and fixes the flag value mappings. The new signal layout matches firmware_v4 (DiagnosticsSendTelHealth and the DiagnosticTEL bitfield), so the sunlink parsing side is correct. The main gap is that sunlite's DBC was not updated, which breaks the cellular path. The panels also need cleanup: a stale gyro override, missing units, and no GPSWriteFail panel. Outside this PR: firmware_v4 tel/app/diagnostics.c:27 declares void McuHealthDriverInit(void); instead of calling it, so the MCU health readings these panels show may be invalid until that is fixed.
aabc70c to
8502046
Compare
Sunlink Pull Request Description
Monday Link
Effected Components
Testing
Sanity check
Sources