Hand-coded Settings + tabbed Gauge Tuning; remembered Wi-Fi; on-screen updates
Firmware / build (push) Successful in 3m58s

Settings (replaces the SquareLine screen, now deleted): sidebar with
Wi-Fi (switch, status card with failure reasons, networks nearby,
full-screen password page), Updates (installed vs latest, Check, Install
behind a confirm dialog) and System (CAN / link / perf overlay switches,
live link, CAN, memory, uptime).

Gauge Tuning: tabs Tachometer / Coolant gauge / Alerts / Simulation,
56 px -/+ rows with hints and real units, accelerating hold-to-repeat,
per-tab Reset with confirm, save indicator, SIMULATION ON chip, swipe
left to go back.

WiFiManager rewritten without LVGL code: one remembered network (NVS
"wifi"), auto-join at boot, scans only on request, no endless reconnect
(keeps the ESP-NOW channel stable), failure reasons from the disconnect
event, password never logged. Ota gains getStatus()/requestCheck()/
requestInstall() for the screen. CAN/UART switches become setEnabled().
Shared ui_kit (header, buttons, switches, confirm dialog); Montserrat
20/24 enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 07:38:17 +02:00
parent 766019a01e
commit e68fad73b6
30 changed files with 2082 additions and 2276 deletions
+4 -16
View File
@@ -7,12 +7,9 @@
#include "display/lvgl_v8_port.h"
#include "drivers/can_driver.h"
#include "tuning_screen.h"
#include "settings_screen.h"
#include "esp_log.h"
extern "C" {
#include "ui.h"
}
namespace DrivelineScreen {
// ============================================================================
@@ -137,18 +134,15 @@ static lv_obj_t* makeStat(lv_obj_t* parent, const char* title,
}
/**
* @brief Gesture handler on OUR screen: swipe LEFT opens Settings (SquareLine),
* swipe RIGHT continues to the Gauge Tuning screen.
* @brief Gesture handler: swipe LEFT opens Settings, swipe RIGHT the Gauge
* Tuning screen (both hand-coded, instant switches).
*/
static void onScreenGesture(lv_event_t* e) {
if (lv_event_get_code(e) != LV_EVENT_GESTURE) return;
lv_dir_t dir = lv_indev_get_gesture_dir(lv_indev_get_act());
if (dir == LV_DIR_LEFT) {
lv_indev_wait_release(lv_indev_get_act());
// No transition animation: a full-screen fade is re-rendered and blended
// in software every frame and stutters on this 1024x600 panel.
_ui_screen_change(&ui_Settings_Screen, LV_SCR_LOAD_ANIM_NONE, 0, 0,
&ui_Settings_Screen_screen_init);
SettingsScreen::show();
} else if (dir == LV_DIR_RIGHT) {
lv_indev_wait_release(lv_indev_get_act());
TuningScreen::show();
@@ -392,9 +386,3 @@ void tick() {
}
} // namespace DrivelineScreen
// C entry point used by the SquareLine-generated Settings screen's back gesture.
// Runs inside an LVGL event handler, so the LVGL lock is already held.
extern "C" void app_show_driveline(void) {
DrivelineScreen::show();
}