Skip to content

Restore the lost v1.8.0 fix for swapped middle grays in EP75 4-gray mode - #564

Open
kk1987 wants to merge 1 commit into
usetrmnl:mainfrom
kk1987:fix/ep75-4gray-translate
Open

Restore the lost v1.8.0 fix for swapped middle grays in EP75 4-gray mode#564
kk1987 wants to merge 1 commit into
usetrmnl:mainfrom
kk1987:fix/ep75-4gray-translate

Conversation

@kk1987

@kk1987 kk1987 commented Aug 19, 2026

Copy link
Copy Markdown

After v1.8.0, 2-bpp rendering on EP75 panels swaps the two middle gray levels. PNG level 1, the dark gray, renders lighter than level 2, the light gray. Black and white are correct, so it's easy to miss without a calibration chart.

The fix already exists. Commit 2ed5c80 added a translate table to the split-plane path of png_draw(), but that commit is reachable only from tag v1.8.0 and never made it into main. This PR takes just that rendering hunk, byte for byte. The rest of 2ed5c80, the temp profile plumbing, is also absent from main, but that's a separate question.

I verified this on an E1001, on a v1.8.12 base together with the bb_epaper pin from #563. Without the hunk the two middle bands of a 4-band chart render inverted, and with it all four bands come out in order. v1.8.0 was always correct on the same panel. It pairs with that PR, since today's 2.1.9 pin can't draw on the E1001 at all and its EP75 gray tables predate the 3d3df73 rewrite. Pin plus hunk is the combination that has actually been tested.

Two things are deliberately left out. Profile "b" (EP75_800x480_4GRAY_V2) keeps Larry's original two-panel check, because its LUT appears to encode the two mid-gray waveforms in swapped order already and translating there could swap them back. And jpeg_draw() has the same un-translated plane split, but that path is currently unreachable since the JPEG path hard-codes 1-bit dithered, so I left it alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RnbEJHrfQMVgshYATiSfMq

Commit 2ed5c80 ("Fixed temp profile toggling and improves 4-gray mode
on all 7.5 inch panels") added the gray translate table to png_draw(),
but it is reachable only from tag v1.8.0 and never made it to main, so
2-bpp rendering on EP75 panels swaps the two middle gray levels: PNG
level 1 (dark gray) renders lighter than level 2 (light gray).

This takes just that rendering hunk, byte-for-byte. Verified on a
Seeed reTerminal E1001 with a 4-band calibration chart (with the
bb_epaper pin from the companion PR; the current 2.1.9 pin cannot
draw on that board at all).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnbEJHrfQMVgshYATiSfMq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants