DisplayDriver seam: fold the bulge-exclude span into present() (#345) - #369
Merged
Conversation
The seam's present now takes exclude: Option<(u16, u16)> — "these rows belong to the overlay plane this frame: keep the diff store current for them, but don't push them". The diff/clip/overflow-fallback skeleton that implemented this only inside Ls021Flpr::present_within moves to obc-platform as RowDiff::diff_clipped (with host tests); both backends now run it verbatim. FLPR: present_within becomes the pub(crate) engine behind the seam method; the map plane's `match overlay_span` on the concrete type is gone — it calls present(overlay_span) unconditionally. ST7789: present(exclude) clips a live bulge's rows out of the banded push, fixing the documented mid-hold flash (a dirty.map redraw used to blank the bulge until the overlay task's next ~8 ms tick). The tft MapDisplay now holds the InputPlane handle, so poll_overlay reports the real live span (read-only — the overlay task keeps the one-shot dirty edge) and hold_progress returns the real value, un-breaking the in-screen hold-to-confirm fills (the Reset bar) on tft. Closes #345. Part of epic #353. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The rendering page credited only the MIP/FLPR backend with clipping the bulge's rows out of a mid-animation redraw; with present(exclude) in the seam both panels share that discipline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #345 (epic #353, phase 2).
What
DisplayDriver::present(&mut self, exclude: Option<(u16, u16)>) -> bool— excluded rows are diffed (the store tracks the clean fb) but not pushed; the overlay plane owns repainting them. Contract documented on the trait.Ls021Flpr::present_withintoobc_platform::RowDiff::diff_clipped(fb, stride, exclude, &mut spans) -> &[(u16,u16)](caller-provided scratch, returns the filled prefix — no_std, no alloc). Four new host tests: clipping, store-updated-for-excluded-rows (a later un-excluded present doesn't re-push), priming-with-exclude, and the overflow fallback respecting the exclude.present_withinshrinks todiff_clipped+push_spansand goespub(crate)(only thedisplay::ls021_flpradapter calls it); the map plane'smatch overlay_span+ concretepresent_withincall is deleted — it calls the seam'spresent(overlay_span)unconditionally.present(exclude)bands only the clipped spans — the documented "dev-only-best-effort" mid-hold flash is gone. ThetftMapDisplaynow holds theInputPlanehandle:poll_overlayreturns the live bulge span (read-onlyoverlay_rows— the one-shottake_overlay_dirtyedge stays withinput_overlay_task, which still owns the bulge push), andhold_progress()returns the real value, so the in-screen Reset-bar fill finally moves ontft.poll_overlay/hold_progress/render_presentbodies are now near-identical across the twoMapDisplays; the structs stay separate (bus-mutex vs owned-panel is the genuine asymmetry). Not folded further per the issue ("full merge optional stretch").Note:
render_present's FLPR-onlyreset_diff()fault-recovery call remains a concrete-type touch — that recovery shape is #349's remit.Verification
diff_clippedhost tests + all existing rowdiff/clip_span tests pass (workspacecargo testgreen).grep present_withinhits onlyls021_flpr.rs+ its seam adapter; the map plane has no concrete present call left.-D warnings-clean on default/tft/ble.tftmid-hold no-blank + Reset-bar fill.Docs
docs/content/software/rendering.mdcredited only the FLPR with presenting around the bulge — updated in a separatedocs:commit (link check passes).firmware/docs/ls021-flpr.mddoesn't describe the present seam; the public display-protocol page is wire-level only — both unaffected.🤖 Generated with Claude Code