Retire SquareLine: hand-coded gauge screen (oil quadrant dropped), LVGL lock, updates on change only; LVGL pool in PSRAM, millis tick, log off; 16 MB flash + OTA partitions; docs and wiki

This commit is contained in:
2026-09-27 18:50:44 +02:00
parent bde1f57f62
commit de6752d558
43 changed files with 439 additions and 19804 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
---
type: index
updated: 2026-09-21
updated: 2026-09-27
---
# Index
@@ -19,7 +19,7 @@ Catalog of every page in the wiki. Read this first when answering questions. Kee
## Synthesis
- [[open-questions]] — the research frontier: will the bare A-line wire survive the car, which Patrol cluster / tach pull-up, temp needle calibration + CANNY PWM clock, gauge behaviour on link loss, pull-the-wire failover test, BLE or not, vehicle power, environmental specs
- [[open-questions]] — the research frontier (#8 engine-oil quadrant: dropped 2026-09-27): will the bare A-line wire survive the car, which Patrol cluster / tach pull-up, temp needle calibration + CANNY PWM clock, gauge behaviour on link loss, pull-the-wire failover test, BLE or not, vehicle power, environmental specs
## Sources
+5
View File
@@ -53,3 +53,8 @@ Implemented in both repos (not yet committed): shared header v2 (typed DATA/CONF
## [2026-09-21] update | Gauge Tuning touchscreen page on A; calibration procedure filed
A gained a hand-coded LVGL Gauge Tuning screen (Home → right → Driveline → right): −/+ rows for every `link_config_t` field, enable switches, and an override panel with RPM/duty sliders; changes go through `Tunables` (saved + pushed), overrides never persisted (A's NVS save strips them). Built and flashed. Step-by-step needle calibration procedure added to [[patrol-gauge-outputs]].
## [2026-09-27] update | SquareLine retired on Controller B; LVGL lock; oil quadrant dropped; 16 MB flash declared
Mirror of the A-side clean-up. `include/ui/` (SquareLine export) deleted; the screen is now `src/modules/gauge_screen.cpp` - same layout minus the engine-oil cell (user decision, closes open question #8: the M57N has no oil temperature sensor), battery centred at the bottom. Kept the two fonts and six icons the screen uses as plain LVGL arrays in `src/assets/`. New `DisplayInit::lock()/unlock()` recursive mutex: `lvglTask` renders under it and `loop()` updates under it - before, the higher-priority render task could preempt `loop()` mid-`lv_label_set_text()`, the bug class that froze A. Labels, colours and icons are written only on change. `DebugMonitor` now records A's debug flag in the receiver and applies it from `loop()` under the lock (it used to touch LVGL from the ESP-NOW callback). `lv_conf.h`: 128 KB pool in PSRAM, logging off, `LV_TICK_CUSTOM` from `millis()`. `platformio.ini`: flash declared 16 MB with `default_16MB.csv` (two 6.5 MB OTA slots; NVS unchanged so the cached gauge config survives), stale `-mfix-esp32-psram-cache-issue` and include paths removed. Waveshare's page adds nothing new for firmware (Arduino core 2.0.x, LVGL 8.3.7 demo, 800 mA LDO); no operating-temperature figure. Built and flashed COM13. Updated [[esp32-s3-lcd-1-3]], [[open-questions]] #8, index; root CLAUDE.md and README.
+2 -1
View File
@@ -1,7 +1,7 @@
---
type: entity
tags: [hardware, waveshare, display, gpio]
updated: 2026-09-21
updated: 2026-09-27
---
# Waveshare ESP32-S3-LCD-1.3
@@ -67,6 +67,7 @@ Net: **10 clean, unconstrained GPIOs** (IO4, IO5, IO7–IO14) plus IO2 and IO3 w
## Firmware-side facts worth knowing (repo)
- Display driven by LovyanGFX 1.1 + LVGL 8.4.0, 80 MHz SPI write; LVGL task on Core 1, UART receiver on Core 0
- **2026-09-27**: SquareLine Studio retired (as on A) - the one screen is hand-coded, built once, updated only on value change under a new LVGL lock; engine-oil quadrant dropped; LVGL's pool moved to PSRAM (128 KB); flash declared 16 MB with two OTA slots (`default_16MB.csv`) for a future update path; LVGL logging off, tick from `millis()`
- Warning thresholds baked in: coolant 110 °C, engine oil 130 °C, gearbox oil 130 °C, battery below 11.0 V
- Link considered lost after 1000 ms without a valid packet → [[controller-link]]
- Original implementation guide proposed the link on GPIO 43/44, which would have collided with the CH343 console; the shipped firmware moved it to IO1 `(repo)`
+1 -1
View File
@@ -20,7 +20,7 @@ The research frontier for Controller B. Answering any of these should trigger up
6. **Gauge behaviour on link loss** — zero, hold + warn, or sweep to a "no data" mark? A safety/UX decision the user must make. → [[link-redundancy]]
7. **Temp gauge °C → duty curve — partly answered.** The user's old CANNY program gives `duty = 1.5·T + 50` on 0–255 ([[temp-stage-cfd]]). Still needed: the old circuit's series resistor / driver and PWM frequency, and a needle check with the new MOSFET stage. Measurement procedure is on [[patrol-gauge-outputs]].
13. **CANNY 5.3 pico details**: what is the HR PWM base clock (period 255 = what frequency), and what sat between the CANNY pin and the gauge wire? The user may still have the unit and harness. → [[temp-stage-cfd]]
8. **Does `engine_oil_temp` stay in the packet?** Its CAN source reads 0xFF on this engine (sensor not fitted). B currently reserves screen space and a warning threshold for it `(repo)`. Drop it, or repurpose the slot.
8. ~~**Does `engine_oil_temp` stay in the packet?**~~ **Answered 2026-09-27 (user): dropped from the screen.** The field stays in the packet (protocol v2 unchanged, never valid on this engine), but B's hand-coded screen no longer has an oil quadrant - the battery cell sits alone at the bottom.
## Hardware