Phase 4 LVGL UI + guest channel + brand-agnostic naming

- LVGL 8.3 round-screen UI (replaces the LovyanGFX direct-draw functional UI):
  master volume arc, per-channel connection dots, SPEAKERS list, per-channel
  DETAIL (volume arc + delay -/+ + scan), SCAN list. Rendered through LovyanGFX;
  configured via build flags (LV_CONF_SKIP); tick via lv_tick_inc in loop.
- Third channel "Guest" @ I2C 0x12 (the onboard-antenna ESP32 — the long-range
  link to an occasional passenger speaker). New [env:source_guest].
- Channels are now brand-agnostic, in order: index0 "Headset" (0x11),
  index1 "Speaker 1" (0x10), index2 "Guest" (0x12). Discovery picks the real
  device per channel, so labels stay generic.
- hub_proto.h: HUB_I2C_ADDR_GUEST 0x12.

Built clean: hub_s3 (LVGL, 3 channels) + source_guest. LVGL render verified on
hardware (basic); guest board needs flashing + wiring into the I2S/I2C buses.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
blue — ESP32/PlatformIO firmware 2026-06-11 13:06:10 -04:00
parent de61905e9c
commit dca7d3ba46
3 changed files with 639 additions and 432 deletions

View File

@ -38,6 +38,13 @@ build_flags = '-DTARGET_SPEAKER="JBL Charge 5"' -DHUB_I2C_ADDR=0x10
build_src_filter = +<board_source.cpp> build_src_filter = +<board_source.cpp>
build_flags = '-DTARGET_SPEAKER="Tangerine EDGE"' -DHUB_I2C_ADDR=0x11 build_flags = '-DTARGET_SPEAKER="Tangerine EDGE"' -DHUB_I2C_ADDR=0x11
; --- Board D: I2S slave -> A2DP source -> GUEST speaker (antenna board) -------
; Occasional passenger speaker, furthest away (hence the onboard antenna).
; No hardcoded name — pick the speaker via the hub's scan UI (Phase 3).
[env:source_guest]
build_src_filter = +<board_source.cpp>
build_flags = '-DTARGET_SPEAKER="Guest"' -DHUB_I2C_ADDR=0x12
; --- Hub: ESP32-S3-Touch-LCD-1.28 (round GC9A01 LCD + CST816S touch) ---------- ; --- Hub: ESP32-S3-Touch-LCD-1.28 (round GC9A01 LCD + CST816S touch) ----------
; Different chip (esp32s3) from the relay boards. Drives the UI; later the ; Different chip (esp32s3) from the relay boards. Drives the UI; later the
; wired control bus to Boards B/C. NOT in default_envs — build with -e hub_s3. ; wired control bus to Boards B/C. NOT in default_envs — build with -e hub_s3.
@ -49,4 +56,22 @@ board_upload.flash_size = 4MB
board_build.partitions = default.csv board_build.partitions = default.csv
monitor_speed = 115200 monitor_speed = 115200
build_src_filter = +<hub_s3.cpp> build_src_filter = +<hub_s3.cpp>
lib_deps = lovyan03/LovyanGFX@^1.1.16 lib_deps =
lovyan03/LovyanGFX@^1.1.16
lvgl/lvgl@^8.3.11
; LVGL configured via build flags (LV_CONF_SKIP -> defaults + overrides), so
; there is no separate lv_conf.h to maintain. 16-bit colour, byte-swapped for
; the SPI panel; millis() tick; the big Montserrat fonts for glanceable text.
; NOTE: keep flag values free of shell-special chars (parens/spaces) — they go
; through a shell. LV_MEM_SIZE as a plain int; tick driven via lv_tick_inc() in
; loop() (no LV_TICK_CUSTOM, which needs a parenthesised millis() expr).
build_flags =
-DLV_CONF_SKIP=1
-DLV_COLOR_DEPTH=16
-DLV_COLOR_16_SWAP=1
-DLV_MEM_SIZE=49152
-DLV_FONT_MONTSERRAT_14=1
-DLV_FONT_MONTSERRAT_20=1
-DLV_FONT_MONTSERRAT_28=1
-DLV_FONT_MONTSERRAT_48=1
-DLV_USE_LOG=0

View File

@ -12,6 +12,7 @@
#define HUB_I2C_ADDR_JBL 0x10 #define HUB_I2C_ADDR_JBL 0x10
#define HUB_I2C_ADDR_CARDO 0x11 #define HUB_I2C_ADDR_CARDO 0x11
#define HUB_I2C_ADDR_GUEST 0x12 // antenna board: source for an occasional guest speaker
// Master -> slave WRITE: first byte = command, then args (little-endian). // Master -> slave WRITE: first byte = command, then args (little-endian).
#define HUB_CMD_SET_DELAY 0x01 // arg: uint16 delay_ms (0..HUB_MAX_DELAY_MS) #define HUB_CMD_SET_DELAY 0x01 // arg: uint16 delay_ms (0..HUB_MAX_DELAY_MS)

File diff suppressed because it is too large Load Diff