f60bdac268
Protocol v2 (shared header, byte-identical with the 1.3 repo): - typed DATA/CONFIG frames: 0xAA | ver | type | len | payload | XOR | 0x55 - gear split into lever (P/R/N/D/S/M) + target/engaged nibbles, engine rpm, alert bitmap decided here from tunable thresholds, link_config_t tunables - docs/UART_PROTOCOL.md rewritten for v2 Controller A modules: - tunables: gauge calibration + alert thresholds in NVS, 'cfg' serial console, bench override (never persisted) - espnow_link: every frame also broadcast on ESP-NOW ch 1; radio stays in STA (WiFiManager no longer powers it off) - uart_manager: DATA at 5 Hz + CONFIG on change/5 s on both transports - can_driver: publishes gear pieces and rpm, evaluates alerts - tuning_screen: hand-coded Gauge Tuning page (swipe right from Driveline), -/+ rows, enable switches, override sliders, Driveline/Defaults buttons UI: SquareLine Home screen (3 meters + battery) and meters_manager removed; Driveline is the boot screen; Settings back-gesture calls app_show_driveline(). tools/fix_penv_deps.ps1: repairs the shared PlatformIO penv after a 1.3 build. Bench-verified with Controller B: both transports alive, dedupe, override rpm 2000 -> 133.3 Hz tach output. Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.4 KiB
C
47 lines
1.4 KiB
C
// This file was generated by SquareLine Studio
|
|
// SquareLine Studio version: SquareLine Studio 1.5.4
|
|
// LVGL version: 8.3.6
|
|
// Project name: ESP32-S3-Touch-LCD-5B
|
|
|
|
#include "ui.h"
|
|
#include "ui_helpers.h"
|
|
|
|
///////////////////// VARIABLES ////////////////////
|
|
|
|
// EVENTS
|
|
lv_obj_t * ui____initial_actions0;
|
|
|
|
// IMAGES AND IMAGE SETS
|
|
|
|
///////////////////// TEST LVGL SETTINGS ////////////////////
|
|
#if LV_COLOR_DEPTH != 16
|
|
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
|
|
#endif
|
|
#if LV_COLOR_16_SWAP !=0
|
|
#error "LV_COLOR_16_SWAP should be 0 to match SquareLine Studio's settings"
|
|
#endif
|
|
|
|
///////////////////// ANIMATIONS ////////////////////
|
|
|
|
///////////////////// FUNCTIONS ////////////////////
|
|
|
|
///////////////////// SCREENS ////////////////////
|
|
|
|
void ui_init(void)
|
|
{
|
|
lv_disp_t * dispp = lv_disp_get_default();
|
|
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
|
|
true, LV_FONT_DEFAULT);
|
|
lv_disp_set_theme(dispp, theme);
|
|
// Home screen removed (2026-09-21): the firmware boots into the hand-coded
|
|
// Driveline screen (DrivelineScreen::show() in display_init.cpp). Settings is
|
|
// created lazily by _ui_screen_change() when swiped to.
|
|
ui____initial_actions0 = lv_obj_create(NULL);
|
|
lv_disp_load_scr(ui____initial_actions0);
|
|
}
|
|
|
|
void ui_destroy(void)
|
|
{
|
|
ui_Settings_Screen_screen_destroy();
|
|
}
|