Files
ESP32-S3-Touch-LCD-5B/src/modules/tuning_screen.h
T

38 lines
1.2 KiB
C++

/*
* Gauge Tuning Screen Module
*
* Hand-coded LVGL screen for the Patrol gauge tunables (link_config_t):
* tach pulses/rev + trim, coolant PWM law, alert thresholds, enables, and a
* bench override (force an rpm / a duty) so the needles can be calibrated
* from the touchscreen while watching the cluster.
*
* Four tabs: Tachometer / Coolant gauge / Alerts / Simulation.
* Reached by swiping RIGHT on the Driveline screen; swipe left or the Driveline
* button (top right) goes back. The Simulation sliders don't bubble gestures,
* so dragging them never changes screens.
* Every change goes through Tunables, so it is saved to NVS (overrides
* excepted) and pushed to Inst. Cluster in the next CONFIG frame.
*/
#pragma once
#include <Arduino.h>
#include <lvgl.h>
namespace TuningScreen {
/**
* @brief Build the screen (idempotent), refresh it from Tunables, and load it.
* @note Caller must hold the LVGL lock.
*/
void show();
/**
* @brief Refresh displayed values if the tunables changed elsewhere (console).
* Cheap no-op unless the screen exists and is on display. Call from
* loop(); takes its own lock.
*/
void tick();
} // namespace TuningScreen