Skip to content

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.

WidgetDriven byNotes
kmh_valueGPS_Angles.GPS_Speed, converted m/s to km/hSee CAN for the byte-order/unit gotchas fixed here
soc_valueBMS_SoC_Voltage.Adaptive_SOCColor-interpolates white to red as SoC drops below 50%
temp_valueBMS_Errors_Temps.High_TemperatureColor-interpolates white to red above 45C
powerkw_boxPack_Current * Pack_Inst_Voltage, clamped 0-40 kW, mapped to a 0-100 progress bar40 kW is the car's max draw; see CAN
laptime_text / lapdelta_textui_data.currentLapTimeMs / ui_data.liveDeltaMsWildcard text widgets, updated every frame regardless of CAN traffic. See Lap Tracking
imd_text / ams_text / tsoff_textNot yet wired to GPIO/CAN data (TODO in the presenter)Alpha-toggled on/off placeholders
fan_gif_1Hysteresis over GIL_Inv_Data_2/GIR_Inv_Data_2 motor and inverter tempsOn above 45C, stays on until below 40C. See the presenter's fan logic and CAN

button1_screen

Recalibration triggers and two persistent toggles.

WidgetBehavior
apps_recal_btn, steering_recal_btn, susp_recal_btnMomentary 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_btnReal 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.

WidgetBehavior
imu_recal_btn, force_cooling_btnMomentary, one-shot triggers, same "always send 1" pattern as button1_screen's recal buttons
motor_control_toggle_btnToggle button, slip control on/off
motor_control_mode_btnCycles 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.

Released under the MIT License.