Skip to content

fix: quieter serial log and cache short upscaled images - #57

Merged
prokrypt merged 3 commits into
developmentfrom
claude/project-thread-poetck
Sep 27, 2026
Merged

prokrypt merged 3 commits into
developmentfrom
claude/project-thread-poetck

Conversation

@prokrypt

Copy link
Copy Markdown
Owner

Before: the serial log printed errors for normal events. These included a missing image, section or dictionary cache file on first open, an outdated section cache, and a device without a clock chip or motion sensor. Some log lines were missing their newline. A short image that is scaled up, such as a DC-only progressive JPEG, was never cached, so it was decoded again on every render pass.

After: those events log quietly or at INF, and every line ends with a newline. SD, display, TLS and frontlight messages go through LOG_*. Short upscaled images are cached after the first decode.

How:

  • Cache probes use Storage.open, which does not print on a miss, instead of openFileForRead.
  • Ternary format strings now go through "%s".
  • freeink-sdk is bumped to ad146a5 on the fork. That commit is log-only and based on the previous pin 44d4209.
  • PixelCache::begin clamps maxBlockDstRows to the image height, because the decoder already clamps each block to that height.

Size vs f8214b8:

  • C3 default: flash −420 B, static RAM +0
  • x4-pro-light-sleep: flash −1,140 B, static RAM +0

🤖 Generated with Claude Code

https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd


Generated by Claude Code

- Probe image/section/dictionary caches with Storage.open so a miss on
  first open is not logged as an error.
- Stale section cache version logs at INF as a rebuild.
- No RTC / no IMU log at INF; ternary format strings go through "%s" so
  both branches get the newline.
- Bump freeink-sdk to ad146a5 (EpdBus, SecureClient, SDCardManager and
  Frontlight prints routed through LOG_*).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
The decoder clamps each block to the image height, so the band never
needs more than h rows. A DC-only progressive JPEG could report 121 rows
for a 67-row image, fail the band check, and re-decode on every pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
Section, ImageBlock and Epub now call Storage.open(path) with the
default read-only flag.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
@prokrypt
prokrypt merged commit b047fd4 into development Sep 27, 2026
9 checks passed
@prokrypt
prokrypt deleted the claude/project-thread-poetck branch September 27, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants