Add LilyGO T4-S3 board target + UI layout refactor#3
Closed
jjhuff wants to merge 3 commits into
Closed
Conversation
Split board-specific config out of display_cfg.h into per-board headers selected by a -DBOARD_* flag; display_cfg.h becomes a 10-line dispatcher. Each board header declares pins, driver typedefs (DisplayDriver, TouchDriver, PmuDriver, ImuDriver), and capability flags (HAS_IMU, HAS_PMU_BUTTON, HAS_BTN_FWD) so shared code can gate features without naming a board. LilyGO T4-S3 specifics: * RM690B0 450x600 AMOLED via QSPI; CST226SE touch; SY6970 charger; no IMU. * SY6970 is at I2C 0x6A (XPowersLib's SY6970_SLAVE_ADDRESS), not 0x6B. * PMICEN (GPIO 9) gates the panel rail, so panel power must come up before gfx->begin() or the display init sequence clocks against a dead panel. Split power_early_enable() out of power_init() and call it from setup() before the display is touched. No-op on the Waveshare which self-powers. * RM690B0 controller is 482px wide but only 450 are visible, so x-coords get +16 via the col_offset1/col_offset2 constructor params. New LCD_COL_OFFSET macro keeps the Waveshare path zero. * Only one user button (BOOT/GPIO 0), so a long-press on it cycles screens / advances splash animations to substitute for the missing middle button. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Firmware reports panel width/height with the SCREENSHOT_START header, but the script was hardcoded to ffmpeg -video_size 480x480, which mangled the output for the 450x600 LilyGO panel. Pass the parsed (w, h) through to ffmpeg. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move per-board layout numbers (margins, panel sizes, font choices, splash cell size) out of ui.cpp / splash.cpp into a single ui_layout.h with #if branches per board. Shared values stay outside any ifdef; overrides are added only where the original metrics actually break — currently just UI_BT_LINE_FONT, which drops to styrene_24 on the 450-wide LilyGO so the BT-screen MAC line doesn't clip at the right panel edge. Adapted from the approach in PR HermannBjorgvin#5 (1.8" AMOLED port). Both Waveshare and LilyGO envs build; BT screen verified on LilyGO hardware. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
|
Re-opened against upstream as HermannBjorgvin#11. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork-internal review PR — not intended for upstream yet.
Summary
Adds a second board target (LilyGO T4-S3, 450×600 portrait, RM690B0 + CST226SE + SY6970) alongside the existing Waveshare 2.16" 480×480.
Commits
Test plan