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)
- 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.
- 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.
- 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
pnpm tauri dev
- TFT view → apply a preset that shows the bug.
- Photo.
Workaround
None.
Symptom
Reported by @wsclx on 2026-05-14 after the chunk-header magic fix (0x064F → 0x0650) landed in
382d59cand made the panel render full-screen instead of just the corner:What we know
crates/ak820-protocol/src/commands/tft.rslines 30-176.crates/ak820-protocol/src/device.rs:608-660.Hypotheses (in order of likelihood)
solid-magenta). If the noise lines are at row offsets that match chunk boundaries (rows 15, 31, 47, …), this is it.setTftUserAnimationmay wait for aSET_LED_USER_ANIMATION = 65ack between chunks. We don't wait. Test: insert a small delay (~5ms) betweendevice.writecalls and see if the noise vanishes.0xFFor with a repeated last-byte instead.What's needed to triage
Repro
pnpm tauri devWorkaround
None.