/* * Driveline Screen Module * * A hand-coded LVGL screen showing the CAN signals we have actually verified on * the swap's bus: gear (hero), coolant, gearbox oil temp, engine RPM, turbine * speed and output shaft, plus ignition / engine / clutch / mismatch status. * * WHY THIS IS NOT A SQUARELINE SCREEN * SquareLine Studio owns include/ui/ and overwrites it on every export. Editing * generated files loses the edit — that is exactly how the CAN toggle's event * handler went missing. This screen lives entirely in src/, which SquareLine * never touches, so it cannot be clobbered. Since 2026-09-21 it IS the boot * screen: the SquareLine Home screen was removed, and the generated Settings * screen's back gesture calls app_show_driveline() (defined at the bottom of * driveline_screen.cpp) to return here. * * Navigation: swipe LEFT -> Settings (SquareLine), swipe RIGHT -> Gauge Tuning. * * Signals deliberately NOT shown: engine oil temp (no sensor on this M57N — * 0x1D0 byte 1 is permanently 0xFF) and battery voltage (0x3B4 publishes the * invalid marker almost always). See wiki/pages/can-id-candidates.md. */ #pragma once #include #include namespace DrivelineScreen { /** * @brief Build the screen (idempotent) and load it. * @note Caller must hold the LVGL lock. */ void show(); /** * @brief Refresh all values from the CAN driver / shared automotive data. * Cheap no-op unless the screen exists and is currently on display. * Call from loop(); takes its own locks. */ void tick(); } // namespace DrivelineScreen