fix: quieter serial log and cache short upscaled images - #57
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Storage.open, which does not print on a miss, instead ofopenFileForRead."%s".PixelCache::beginclampsmaxBlockDstRowsto the image height, because the decoder already clamps each block to that height.Size vs f8214b8:
🤖 Generated with Claude Code
https://claude.ai/code/session_01XgLRarbAmBVepTPKCK7mgd
Generated by Claude Code