Conversation
The middle-zone layout search took the largest text scale for which any QR module size fit, so on landscape panels >= 800x600 it kept oversized text and shrank the QR to 2-3px modules in the corner. Most visible on the reTerminal E1004 (1200x1600 dual-controller) rotated to 1600x1200; also hit 1304x984, 960x640 and 800x600. The search now first requires a module floor of half the panel's module cap (panels with cap >= 8 only) and shrinks the text to fit, falling back to the old any-size search if nothing fits. Panels below 800x600, portrait layouts and 1872x1404 render identically to before (checked with a host render of boot_screen.cpp across 14 panel sizes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BquLGp9hmm8sgAYixz8you
Rename the layout-search loop variable from `round` to `fitPass` so a later round() call inside it cannot bind to the int, and correct the comment: panels below 800x600 skip the floored pass entirely rather than falling back to the unfloored one. No behaviour change (host renders of 14 panel sizes are byte-identical). Note on the previous commit: besides the 800x600+ landscape panels, the floor also moves some near-square landscape sizes (e.g. 1700x1600, 1232x1028, 816x716) from the stacked layout to text-left/QR-right with a larger QR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BquLGp9hmm8sgAYixz8you
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.
Problem
On the reTerminal E1004 (1200x1600 dual-controller Spectra6) rotated to 1600x1200, the boot screen's middle zone had huge text and a QR code squeezed down to 2–3 px modules in the corner. This isn't specific to dual-controller panels. The same thing happened on every landscape panel ≥ 800x600, including 1304x984, 960x640 and 800x600. Only 1872x1404 avoided it, because of its hard-coded
ultraHiResPanelscale offset.Root cause: the layout search in
writeBootScreenWithQr()tried text scales from the largest down. It accepted the first scale at which any QR module size fit, even 1 px. So the text always stayed at its largest size and the QR took whatever space was left.Fix (
src/boot_screen.cpp)bootQrModuleMin(): returns half ofbootQrModuleMax()on panels whose cap is ≥ 8 (≥ 800x600), and 1 on smaller panels.moduleMinparameter inbootLayoutFit(): the module-size loop stops atmoduleMininstead of going down to 1.fitPass(so it doesn't shadowround()) and corrects the comment. No behaviour change.Performance: the search runs once at boot and does at most about 10 × 16 iterations of integer math. There is no heap allocation, no new globals and no change to the row-streaming path.
Verification
boot_screen.cppagainst stubs and renders 14 panel sizes, including the E1004 in both orientations with the split stream.54cf579). The change still needs a look on a real E1004.Known, not addressed here
The existing
qrX = contentRightX - modulePx*(qrSize+quiet)override leaves the QR's right blank margin narrower than the standard 4 modules (about 2.7–3.6) on some unchanged sizes (1872x1404, 2560x1440, 1024x576, 800x480). A possible follow-up fix is to clampqrXtow_log - qrPx.