Decommission SquareLine: delete include/ui, theme set in display_init
Firmware / build (push) Successful in 4m1s
Firmware / build (push) Successful in 4m1s
include/ui (SquareLine export: ui_init, placeholder screen, helpers, theme manager, project metadata) is no longer used - every screen is hand-coded. The one live line, the dark default LVGL theme, moves to display_init.cpp. Build filter and include path drop include/ui. Comments, CLAUDE.md and the stale README sections (features, layout, partitions) updated. Verified on the board (USB, dev): Wi-Fi on/forget/scan/join, dark keyboard and dialogs, update check + install of v0.1.5 from the screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
#include "display_init.h"
|
||||
#include "display/lvgl_v8_port.h"
|
||||
#include "ui/ui.h"
|
||||
#include "driveline_screen.h"
|
||||
#include "config/ota_config.h" // FW_VERSION
|
||||
|
||||
@@ -90,17 +89,20 @@ DisplayObjects init() {
|
||||
Serial.println("[DisplayInit] Step 11: LVGL initialized successfully!");
|
||||
Serial.flush();
|
||||
|
||||
// Step 12-13: Load SquareLine Studio UI
|
||||
Serial.println("[DisplayInit] Step 12: Loading SquareLine Studio UI...");
|
||||
// Step 12-13: Theme + boot screen
|
||||
Serial.println("[DisplayInit] Step 12: Loading UI...");
|
||||
lvgl_port_lock(-1);
|
||||
ui_init(); // Initialize the SquareLine Studio generated UI
|
||||
// Boot screen: the hand-coded Driveline screen. ui_init() only loads an
|
||||
// empty placeholder now (the SquareLine Home screen was removed 2026-09-21);
|
||||
// swap while the backlight is still off so there's no flash.
|
||||
// Dark default theme, blue primary. The hand-coded screens override most
|
||||
// styles, but the keyboard, dialogs, text areas, switches and sliders take
|
||||
// their base look from it.
|
||||
lv_disp_t* disp = lv_disp_get_default();
|
||||
lv_disp_set_theme(disp, lv_theme_default_init(disp, lv_palette_main(LV_PALETTE_BLUE),
|
||||
lv_palette_main(LV_PALETTE_RED), true, LV_FONT_DEFAULT));
|
||||
// Boot screen, loaded while the backlight is still off so there's no flash.
|
||||
DrivelineScreen::show();
|
||||
createVersionLabel();
|
||||
lvgl_port_unlock();
|
||||
Serial.println("[DisplayInit] Step 13: SquareLine UI loaded successfully!");
|
||||
Serial.println("[DisplayInit] Step 13: UI loaded");
|
||||
|
||||
// Small delay to ensure UI is rendered
|
||||
delay(100);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Handles hardware-specific initialization for the Waveshare ESP32-S3-Touch-LCD-5B:
|
||||
* - Board initialization (LCD panel, touch controller)
|
||||
* - LVGL initialization and configuration
|
||||
* - SquareLine Studio UI loading
|
||||
* - LVGL theme and the boot (Driveline) screen
|
||||
* - Backlight control to prevent white flash during startup
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,7 @@ struct DisplayObjects {
|
||||
* 3. Initialize backlight (off initially to prevent white flash)
|
||||
* 4. Start the board
|
||||
* 5. Initialize LVGL porting layer
|
||||
* 6. Load SquareLine Studio UI
|
||||
* 6. Set the LVGL theme and show the Driveline screen
|
||||
* 7. Turn on backlight after UI is ready
|
||||
*
|
||||
* @return DisplayObjects containing board and backlight pointers
|
||||
|
||||
@@ -5,16 +5,8 @@
|
||||
* 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.
|
||||
* The boot screen. Navigation: swipe LEFT -> Settings, swipe RIGHT -> Gauge
|
||||
* Tuning (both hand-coded, like this one).
|
||||
*
|
||||
* Signals deliberately NOT shown: engine oil temp (no sensor on this M57N —
|
||||
* 0x1D0 byte 1 is permanently 0xFF) and battery voltage (0x3B4 publishes the
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/*
|
||||
* Settings Screen Module
|
||||
*
|
||||
* Hand-coded (replaces the SquareLine Settings screen, 2026-09-27). Sidebar
|
||||
* with three sections:
|
||||
* Sidebar with three sections:
|
||||
* Wi-Fi - switch, connection status, networks nearby, full-screen password
|
||||
* entry; the joined network is remembered (WiFiManager)
|
||||
* Updates - installed vs latest release, Check, Install behind a confirm
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
* UI State Manager Module
|
||||
*
|
||||
* Holds the debug flag (sent to Controller B, shows LVGL's performance overlay).
|
||||
* The screen-sync logic for the SquareLine Settings screen went with that
|
||||
* screen (2026-09-27): the hand-coded Settings screen reads live state itself.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
Reference in New Issue
Block a user