Layout and picker fixes for all three boards. No firmware change since
v1.1.0 - the .uf2 and the two .bin images are byte-identical to it.
A row back on every screen
The line pitch followed the font's glyph BOX, but a .pf box usually carries
a spare row of padding that is never inked. It now follows the font's INK,
floored at the ink height so nothing can clip:
line pitch = max(ink height, glyph box + the panel's leading)
On the 296x128 panels (E290 and Badger, leading: -1):
| font | box | ink | before | after |
|---|---|---|---|---|
| Literata (default) | 15 | 14 | 8 lines | 9 lines |
| Dejavu | 13 | 12 | 9 lines | 10 lines |
| Open Sans | 13 | 13 | 9 lines | 9 lines |
| Literata Large / Larger | 16 / 19 | 16 / 19 | 7 / 6 | 7 / 6 |
Three of the five fonts have no spare row, so a flat -1 would have clipped
them - the floor is what makes this safe per font. The E213 is unchanged.
The menu artefacts, and what was actually causing them
A dark bar appeared over the top of the first list entry when the selection
moved off it. The cause was not the highlight: it was the banded transpose in
fbrotate, which cleared whole byte columns. One landscape row is one
bit inside a byte column, so a band is a few bits per native row, not a few
bytes - and whenever the band edge fell mid-byte, blanking the column wiped
rows just outside it. The picker's header band ends at the row pitch, so it
destroyed the top of the row below; the highlight XOR then inverted the
damage to black.
It scaled with the pitch - 1 row lost at a pitch of 15, 2 at 14, 4 at 12 -
so it was already present before the layout change, as a thinner line. Now
masked per row, the same arithmetic menufast.xor_band() always used.
This affects the E290 as well, which shares the rotation-3 path.
Also: picker labels are positioned by their ink rather than their box, which
is a per-font offset, so a bar exactly one pitch tall contains the whole
glyph including descenders.
Other fixes
- "No books yet." A drive with no
.txton it reported
[Errno 2] No such file/directory: book.txt, naming a file the user never
had. It now says what to copy, or points at the library when there is an
.epubwaiting to be converted. Deleting the book you were reading was
already handled and is unchanged. - Sleep hold is 3 s, up from 1.2 s, which was easy to trigger by
accident. The same threshold backs out of the picker and cancels jump-to. - The boot log now records the derived layout:
Font literata.pf: box 15, ink 14, pitch 14, 9 lines/page.
Assets
badger-1.1.2.zip- precompiled Badger reader, use this onebadger2040-circuitpython-real-light-sleep.uf2- unchanged since v1.1.0,
only reflash if coming from older firmwareheltec_vision_master_e213.bin/heltec_vision_master_e290_lightsleep.bin- unchanged since v1.0.0, flash at
0x0
- unchanged since v1.0.0, flash at
SHA256SUMS
E213/E290 readers: copy the contents of device/ from the repository. The
Badger needs the precompiled package - its RP2040 cannot compile code.py at
boot and still leave a contiguous page buffer.