Repository navigation
refactor(#273): E4 band 3d -- oled, display, ui_state and touch leave src.ino - #278
Merged
Merged
Conversation
… src.ino
Four units:
src/oled.{h,cpp} oled, oledAvailable, oledSleeping; DEBUG_SLEEP;
initOLED, sleepOLED, wakeOLED
src/display.{h,cpp} tft, tftSleeping, lastActivityTime, lastTFTReinit,
tftUpdateCount, lastTFTUpdate; TFT_REINIT_INTERVAL,
DEBUG_TFT, the sleep-timeout defaults, TFT_BL_PWM, the
RGB565 COLOR_* palette; initTFT, checkTFTHealth,
sleepTFT, wakeTFT, wakeAllDisplays, checkDisplaySleep
src/ui_state.{h,cpp} currentScreen, previousScreen, settingsSubScreen,
geocacheSubScreen, selectedCacheIndex, listScrollOffset;
NUM_SCREENS and the SCREEN_* defines. State only: the
navigate functions index the LVGL screen objects the
screen builders own, so they follow in band 4
src/touch.{h,cpp} ctp, touchAvailable; initTouch, touchISR
src/fc_config.h + CTP_INT
Seven cut-set variables leave src.ino (5,805 -> 5,581 lines). Every cut-set
variable of #264 except webServer and wifiConnected is now defined in a unit.
Harness: declarator lists and initialisers are parsed with one bracket- and
string-aware walker (a constructor call with commas, and a string initialiser
with commas, each broke the 3b version -- the second latently); the first
declarator on a line is named too.
Verified by scripts/verify_extraction.py, PASS: 589 -> 592 symbols (three
static initialisers, 99 bytes; src.ino's shrank 80), 29 relocated, 3 linkage
changes declared, 12 size deltas net -88 all attributed, 11 moved functions
checked by reference set, unexplained none. .flash.text +24 (inputs +16),
.flash.rodata +20, RAM unchanged. Flash 1,856,590 -> 1,856,634. Both
toolchains build. 58 tests pass. Record: section 13 of
docs/god-object-inventory.md.
Owner
Author
|
Merged autonomously under the owner's standing grant of 2026-09-07. Gate: Set aside for the owner's review, in the PR body: |
4 tasks
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.
E4 band 3d, task #273 under #264 and Epic #212. Opened autonomously under the owner's standing grant of 2026-09-07.
What moved
oled(3 functions),display(6),touch(2) and a state-onlyui_state; seven cut-set variables leavesrc.ino(5,805 → 5,581 lines). After this, every cut-set variable of #264 exceptwebServerandwifiConnectedis defined in a unit; those two go with the web unit in #274. Full composition indocs/god-object-inventory.md§13.Calls made under the grant — please review
ui_statecarries state and no functions. Reading the code answered E4-5d (band 3): oled, display and ui_state units #273's open question:navigateScreenindexes a static table of the LVGL screen objects (compassScr,geocacheScr, …) that the screen builders own, andnavigateToSettingsloadssettingsScr. Moving the navigate functions now would mean declaring those screen objects in a header while they stay insrc.ino— the reach-back the ruling forbids. The state moves now; the functions join the unit in band 4 when the screens do.ui_statealso takesselectedCacheIndexandlistScrollOffset(left by 3c): the web handlers read both, so they have to be published before E4-5e (band 3): the web unit, last #274.touchunit that E4-5d (band 3): oled, display and ui_state units #273 did not list:handleWebDiagsreadstouchAvailable, which had no unit. Two functions, two variables;lvglTouchReadCb, the LVGL input driver, stays for band 4.COLOR_*palette went todisplay.h:initTFTand the boot screen insetup()use it.Proof
scripts/verify_extraction.pyPASS; full output in §13: