Skip to content

TFT: horizontal noise lines on some animations #2

Description

@wsclx

Symptom

Reported by @wsclx on 2026-05-14 after the chunk-header magic fix (0x064F → 0x0650) landed in 382d59c and made the panel render full-screen instead of just the corner:

"Teilweise gehen die Animationen auch über den gesamten Bildschirm, haben aber teilweise horizontale Störlinien."

What we know

  • Affects some but not all animations. Which presets show it, and where on the panel, is the data we need next.
  • Encode geometry looks correct on paper: 128 × 128 × 2 = 32 768 bytes per frame + 256-byte frame-delay header. See crates/ak820-protocol/src/commands/tft.rs lines 30-176.
  • Chunked upload: 4096-byte payload chunks with an 8-byte custom header. See crates/ak820-protocol/src/device.rs:608-660.
  • Chunk boundary math: chunk 0 carries the 256-byte frame-delay header + first 3840 px-bytes (= 15 rows). Subsequent chunks carry 4096 bytes = 16 rows each. So chunk N's first byte does not necessarily land on a row boundary for chunks 1+ relative to the panel's scan order.

Hypotheses (in order of likelihood)

  1. Chunk-boundary stride bug. The firmware may be writing each chunk's payload starting at a different VRAM offset than we assume — manifesting as a band of corrupted pixels at the seam between chunks. Test: render a preset with a flat solid colour (e.g. solid-magenta). If the noise lines are at row offsets that match chunk boundaries (rows 15, 31, 47, …), this is it.
  2. Missing inter-chunk ack. The web driver's setTftUserAnimation may wait for a SET_LED_USER_ANIMATION = 65 ack between chunks. We don't wait. Test: insert a small delay (~5ms) between device.write calls and see if the noise vanishes.
  3. Trailing-pad bug. Our last chunk is zero-filled to 4096 bytes. Maybe the firmware reads past the declared payload length. Test: pad with 0xFF or with a repeated last-byte instead.

What's needed to triage

  • Phone photo of the AK820 Pro's TFT showing the artefact on one named preset (so we can re-run with the same byte stream).
  • Approximate band positions (row counts from top, full-width vs partial).

Repro

  1. pnpm tauri dev
  2. TFT view → apply a preset that shows the bug.
  3. Photo.

Workaround

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions