Skip to content

DfuFailed clips the staged version: centred on one line, no wrap #1474

Description

@timohueser

Found by the V0 screen-verification net (#1441, PR #1469) and deliberately recorded rather than fixed there — V0 must not change screen behavior.

What happens

DfuFailedScreen ("UPDATE FAILED") centres the staged version on a single line. A git describe tag longer than the panel runs off both edges. Its sibling DfuUpdatedScreen ("Updated to vX") wraps the same string to a second centred line, so the two cards disagree about a string they both receive from the same place.

Reproduce (both use the identical version string):

cargo build --release -p obc-sim
target/release/obc-sim MAP.obcm --boot --dfu confirmed=v1.0.0-14-g0a1b2c3-dirty --png updated.png   # wraps
target/release/obc-sim MAP.obcm --boot --dfu failed=reverted:v1.0.0-14-g0a1b2c3-dirty --png failed.png  # clips

failed.png renders v1.0.0-14-g0a1b2c3 with the leading v and the trailing -dirty cut off at the panel edges.

Why it matters

The version is the only thing on that card identifying which update failed, and a released builds git describe tag is exactly the shape that overflows. The card is also one-shot — it is shown once, on the first boot after a failed update — so a rider gets no second look.

Scope

The fix is in firmware/obc-app/src/screen/dfu.rs (DfuFailedScreen::draw), most likely by reusing whatever DfuUpdatedScreen already does for the same string. Both cards are card-family screens, so this may be better done inside the epic #1396 card work (CardFrame) than as a spot fix — either is fine, but it should not be left implicit.

Baseline

dfu-failed-reverted.png in firmware/ui-snapshots.sha256 currently records the clipped frame. Fixing this is an intentional pixel change: run the sweep, look at the frame, and record it with

python3 firmware/tools/ui_snapshot_manifest.py update firmware/ui-snapshots.sha256 OUT

listing the changed basename in the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions