Screens
main_screen
The primary driving screen. Shows speed, state of charge, instant power draw, TS (traction system) temperature, lap time and delta to best, three fault/status indicators (IMD, AMS, TS-off), and an animated fan icon.
| Widget | Driven by | Notes |
|---|---|---|
kmh_value | GPS_Angles.GPS_Speed, converted m/s to km/h | See CAN for the byte-order/unit gotchas fixed here |
soc_value | BMS_SoC_Voltage.Adaptive_SOC | Color-interpolates white to red as SoC drops below 50% |
temp_value | BMS_Errors_Temps.High_Temperature | Color-interpolates white to red above 45C |
powerkw_box | Pack_Current * Pack_Inst_Voltage, clamped 0-40 kW, mapped to a 0-100 progress bar | 40 kW is the car's max draw; see CAN |
laptime_text / lapdelta_text | ui_data.currentLapTimeMs / ui_data.liveDeltaMs | Wildcard text widgets, updated every frame regardless of CAN traffic. See Lap Tracking |
imd_text / ams_text / tsoff_text | Not yet wired to GPIO/CAN data (TODO in the presenter) | Alpha-toggled on/off placeholders |
fan_gif_1 | Hysteresis over GIL_Inv_Data_2/GIR_Inv_Data_2 motor and inverter temps | On above 45C, stays on until below 40C. See the presenter's fan logic and CAN |
button1_screen
Recalibration triggers and two persistent toggles.
| Widget | Behavior |
|---|---|
apps_recal_btn, steering_recal_btn, susp_recal_btn | Momentary touch buttons. Each tap always sends a 1 trigger pulse on CAN (recalibrate now); the subtext (0%/100%, LEFT/RIGHT, LOW/HIGH, red/green) toggles purely on-screen to give the driver feedback, tracked by a local UI-only bool per button, independent of the transmitted value |
sd_logging_btn, telemetry_toggle_btn | Real toggle buttons. Reflect and set persistent flags (sd_logging_on_off, telemetry_on_off), saved to flash via the save-config screen |
Why the recal buttons don't toggle their sent value
They were originally toggle buttons whose pressed state doubled as the CAN payload bit. When the widgets were changed to momentary touch buttons in TouchGFX Designer, the payload was decoupled from the on-screen toggle so recalibration always fires a real "1" trigger regardless of how many times the driver has tapped it, while the subtext still gives visual feedback.
button2_screen
More recalibration/config controls, plus slip control.
| Widget | Behavior |
|---|---|
imu_recal_btn, force_cooling_btn | Momentary, one-shot triggers, same "always send 1" pattern as button1_screen's recal buttons |
motor_control_toggle_btn | Toggle button, slip control on/off |
motor_control_mode_btn | Cycles slip control mode 1 through 12 on each tap, wraps back to 1. Displays the plain number via a wildcard text widget |
Slip control modes are intentionally unnamed (SLIP_MODE_1 .. SLIP_MODE_12 in slip_control_mode_t), the UI just shows the number and the tuning meaning of each mode lives on the inverter/gateway side, not in the dashboard.
lap_data_screen
Lets the driver review and manage lap timing: view the fastest lap, switch between BEST (organic fastest-lap) and MANUAL (driver-entered target) delta modes, set a manual target lap time, and reset lap data. See Lap Tracking for the underlying state machine.
data1_screen
Placeholder for calibration value display. The presenter's updateCANData() is currently empty with a TODO, waiting on the gateway boards' CAN DBC to gain calibration-value signals to display.
bober_screen
Unimplemented placeholder screen. setupScreen()/tearDownScreen() just call the generated base with no additional logic.
save_cfg_screen
A confirmation screen that calls Model::saveConfigToFlash(), persisting the current ui_data.button_states_t (recal flags, logging/telemetry toggles, slip control mode) to flash-emulated EEPROM. See Flash Config.
startup_screen
Boot/intro screen. The presenter's updateCANData() is a stub (// Handle CAN data during startup if needed); currently just plays a startup animation while the rest of the system finishes initializing.
