Skip to content

Commit eaecadf

Browse files
committed
feat: release YACP 1.5.0
1 parent d50d1e8 commit eaecadf

76 files changed

Lines changed: 3497 additions & 272 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,213 @@
1+
## [v1.5.0-yacp] - 2026-08-03
2+
3+
### Added
4+
5+
- Added a dedicated Sleep Images web page for managing global sleep images and the gallery attached to one selected
6+
book without exposing the hidden SD-card folders.
7+
- Added per-book image galleries. Compatible gallery BMPs can be opened from the reader menu and used as sleep images
8+
when sleep starts from that book.
9+
- Added browser-side image preparation to File Transfer, with visual crop selection, X3/X4 target sizing, four-level
10+
grayscale preview, threshold tuning, and reader-ready BMP generation before upload.
11+
- Added `Previous Page` as an optional side-button long-press action in EPUB, TXT, and XTC readers.
12+
13+
### Changed
14+
15+
- Sleep-image rendering now analyzes each image's tonal range before dithering, preserving substantially more useful
16+
highlight and midtone detail on the four-level e-ink output.
17+
- Rendered grayscale sleep-image planes are cached on the SD card and reused while the source image remains unchanged.
18+
- Per-book sleep images take priority in Cover, Custom, and Cover/Custom modes, rotate randomly, and avoid immediately
19+
repeating the previous image when several prepared BMPs are available.
20+
- Waking after an image-based sleep screen restores the pre-sleep framebuffer instead of showing the normal boot
21+
splash. This implementation was inspired by CrossPoint PR #2731 by Marek Vesely (`notmarek`).
22+
- Finished Books now groups completed titles by finish month and shows each month's book count, reading time, titles,
23+
and authors.
24+
25+
### Removed
26+
27+
- Removed the temporary on-device grayscale comparator and browser sorting tools used while validating the new image
28+
pipeline.
29+
30+
### Fixed
31+
32+
- Reaching the real EPUB or XTC ending now completes the book automatically, while leaving from the final page or a
33+
rounded 100 percent asks for confirmation.
34+
- First completion dates remain stable across rereads, pending Reading Achievement screens survive activity replacement
35+
or restart, and legacy Finished Books entries reconcile their dates and authors from persistent statistics.
36+
- Sleep-image management loads gallery data and previews only when requested, reducing SD-card contention during file
37+
uploads.
38+
- File Transfer keeps the selected book-gallery destination explicit throughout image preparation, reducing accidental
39+
uploads to the current folder.
40+
- Quick Resume back into the reader restores the loading-dot indicator before live battery status replaces it.
41+
42+
## [v1.4.0-yacp.226] - 2026-08-02
43+
44+
### Changed
45+
46+
- Simplified the Sleep Images page around default images and one selected book, with contextual add actions instead
47+
of technical folder shortcuts.
48+
- Adding an image from the Sleep Images page now opens the existing image preparation workflow with the correct
49+
destination and selected book already set, then returns to Sleep Images after a successful upload.
50+
51+
## [v1.4.0-yacp.225] - 2026-08-02
52+
53+
### Added
54+
55+
- Added a dedicated Sleep Images web page for global sleep images and per-book galleries. File Manager no longer loads
56+
sleep-image lists when managing regular files.
57+
- File Transfer can still upload directly into the hidden `/.sleep` folder when that folder is opened explicitly.
58+
59+
### Removed
60+
61+
- Removed the temporary sleep-image test UI and browser sorting page used during grayscale tuning.
62+
63+
### Fixed
64+
65+
- Sleep-image management now loads gallery contents and image previews only on demand, reducing SD-card contention
66+
during uploads.
67+
- Quick Resume back into the reader now shows the small loading-dot indicator in the bottom-left corner again before
68+
the live battery status replaces it.
69+
- Per-book gallery sleep-image rotation now avoids immediately repeating the previously used BMP when several
70+
prepared images are available for the book.
71+
72+
## [v1.4.0-yacp.214] - 2026-08-02
73+
74+
### Fixed
75+
76+
- File Transfer now keeps the chosen book-gallery destination clearer and less fragile, so prepared BMP uploads are
77+
less likely to be sent to the current folder by mistake.
78+
79+
## [v1.4.0-yacp.211] - 2026-08-02
80+
81+
### Fixed
82+
83+
- Per-book gallery sleep-image rotation now uses the ESP32 hardware RNG, avoiding the same first image after each
84+
deep-sleep boot.
85+
86+
## [v1.4.0-yacp.210] - 2026-08-02
87+
88+
### Fixed
89+
90+
- Per-book gallery sleep images now choose randomly among the book's prepared BMPs instead of always using the first
91+
uploaded image.
92+
93+
## [v1.4.0-yacp.209] - 2026-08-02
94+
95+
### Changed
96+
97+
- Book gallery BMPs now take priority as the sleep image when sleep starts from that book in Cover, Custom, or
98+
Cover/Custom sleep modes.
99+
100+
## [v1.4.0-yacp.208] - 2026-08-02
101+
102+
### Added
103+
104+
- File Transfer's e-reader image preparation now exposes three grayscale threshold sliders, so uploads can be tuned
105+
before generating the 2-bit BMP used on the reader.
106+
107+
## [v1.4.0-yacp.206] - 2026-08-02
108+
109+
### Added
110+
111+
- File Transfer can now attach images to a per-book gallery. The reader menu shows `Book Gallery` only for books with
112+
compatible gallery images, and opens the existing image viewer for that book's gallery.
113+
- File Transfer can now prepare uploaded images for the e-reader in the browser, with crop selection, X3/X4 target
114+
sizing, four-level grayscale dithering, and 2-bit BMP output before upload.
115+
116+
### Changed
117+
118+
- Dropping or selecting images in File Transfer now uploads the originals by default; e-reader crop/resize preparation
119+
is an explicit opt-in choice.
120+
- Quick resume now shows a wake-up label over the restored sleep frame only when waking to Home, keeping direct
121+
reader resumes visually quiet.
122+
123+
## [v1.4.0-yacp.200] - 2026-08-02
124+
125+
### Changed
126+
127+
- Custom BMP sleep images now use adaptive tonal analysis before dithering, preserving more useful detail while
128+
keeping the corrected four-level grayscale mapping.
129+
- Rendered custom sleep-image grayscale planes are cached on the SD card and reused when the source image has not
130+
changed.
131+
- Added a temporary main-menu diagnostic screen for comparing legacy and adaptive sleep-image grayscale rendering
132+
directly on device, with a taller label badge and Confirm mapped to the next image.
133+
- Fixed the temporary sleep-image diagnostic so it uses the same white BW base and crop ratios as the real sleep-image
134+
renderer, and keeps the label out of the grayscale planes.
135+
- The temporary sleep-image diagnostic now uses English overlay labels, `Before` and `After`, regardless of UI
136+
language.
137+
- The temporary sleep-image diagnostic now uses Left/Right for the linear Before/After sequence, while Confirm jumps
138+
to the next image's `Before` frame.
139+
- Added a lightweight web Sleep Images page for previewing sleep-screen images and sorting them into `keep` or
140+
`reject` folders from the browser.
141+
142+
## [v1.4.0-yacp.185] - 2026-08-01
143+
144+
### Changed
145+
146+
- Removed the temporary real-device sleep-image comparison mode from the firmware build.
147+
148+
## [v1.4.0-yacp.184] - 2026-08-01
149+
150+
### Changed
151+
152+
- The temporary sleep-image grayscale comparison build now opens the real-device comparator automatically at boot,
153+
without requiring a button combo.
154+
155+
## [v1.4.0-yacp.183] - 2026-08-01
156+
157+
### Added
158+
159+
- Added a hidden real-device diagnostic mode to compare the legacy and corrected sleep-image grayscale mappings on
160+
every BMP in `/.sleep`.
161+
162+
## [v1.4.0-yacp.181] - 2026-08-01
163+
164+
### Fixed
165+
166+
- Waking from image-based sleep screens to Home now reuses the wake cleanup refresh and avoids a second strong Home
167+
refresh.
168+
169+
## [v1.4.0-yacp.180] - 2026-08-01
170+
171+
### Fixed
172+
173+
- Waking from image-based sleep screens now uses the wake half-refresh as the cleanup pass and avoids a second half
174+
refresh when the reader page opens.
175+
176+
## [v1.4.0-yacp.179] - 2026-08-01
177+
178+
### Changed
179+
180+
- Rebuilt the Tiny firmware with the remote File Transfer firmware-install endpoint and the current sleep-cover
181+
grayscale correction.
182+
183+
## [v1.4.0-yacp.178] - 2026-08-01
184+
185+
### Fixed
186+
187+
- Sleep cover grayscale generation now keeps more midtone detail instead of pushing many light-mid tones to white.
188+
189+
## [v1.4.0-yacp.176] - 2026-08-01
190+
191+
### Added
192+
193+
- File Transfer now exposes a remote firmware install endpoint so a developer can upload a `.bin` over HTTP, trigger
194+
validation and OTA flashing from the computer, and let the reader restart without navigating the firmware menu.
195+
196+
## [v1.4.0-yacp.174] - 2026-08-01
197+
198+
### Changed
199+
200+
- Sleep wake now skips the boot splash after every sleep screen mode by restoring the pre-sleep frame first; X3 keeps
201+
the no-flash wake indicator only after true Quick Resume sleep screens and uses a half refresh after image-based
202+
sleep screens.
203+
204+
## [v1.4.0-yacp.168] - 2026-08-01
205+
206+
### Changed
207+
208+
- Finished Books now groups completed titles by finish month, showing each month's book count, total reading time,
209+
titles, and authors instead of exact per-book date timelines.
210+
1211
## [v1.4.0-yacp.167] - 2026-08-01
2212

3213
### Added

README.md

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,39 @@ YACP is expected to use less energy and perform less incidental work than its ba
2626
measured battery-life claim yet. Long-running current analysis continues so future choices can be based on repeatable
2727
hardware measurements rather than optimistic estimates.
2828

29-
## What is new in 1.4.0-yacp.167
29+
## What is new in 1.5.0-yacp
3030

31-
- **Reliable book completion:** reaching the real EPUB or XTC ending completes the book automatically, while leaving
32-
from its final page or a rounded 100% asks for confirmation. The first completion date remains stable across rereads.
33-
- **Dated Finished Books timelines:** every known reading span now shows its start date, finish date, both years, and
34-
active reading time. Opening Reading Stats repairs older retained entries from the book's persistent dates.
35-
- **Safer reading start dates:** a short preview no longer starts a book's timeline; YACP waits for meaningful active
36-
reading and forward progress.
37-
- **Previous Page on a side-button hold:** the optional long-press action turns back exactly one page in EPUB, TXT,
38-
and XTC while preserving the side button's normal short-press direction.
31+
This release is centered on one visible e-ink improvement: a new adaptive grayscale path for sleep images. The previous
32+
mapping could wash out highlights or collapse useful midtones. YACP now analyzes the image's tonal range before
33+
dithering it to the four levels available on the panel.
3934

40-
This is a focused reliability release built on the no-flash screen maintenance, Reading Achievement, Finished Books,
41-
and Home improvements introduced in `.155`. See the [changelog](CHANGELOG.md) for the complete inventory.
35+
<p align="center">
36+
<img src="https://github.com/Sichroteph/YACP/releases/download/v1.5.0-yacp/YACP-sleep-image-before-after.jpg"
37+
alt="Four real-device before and after comparisons of YACP adaptive grayscale sleep-image rendering"
38+
width="760">
39+
<br>
40+
<sub>The same source images rendered with the previous and adaptive mappings on a real X3.</sub>
41+
</p>
42+
43+
- **Adaptive grayscale rendering:** custom and per-book sleep images preserve more highlight and midtone detail, while
44+
rendered grayscale planes are cached on the SD card and reused when the source is unchanged.
45+
- **Per-book sleep-image galleries:** prepared images can be attached to a book, selected when sleep starts from that
46+
book, rotated randomly, and kept from repeating immediately.
47+
- **Image preparation in the browser:** File Transfer can crop, resize for X3 or X4, preview four-level grayscale,
48+
adjust the thresholds, and upload the resulting BMP without a separate conversion tool.
49+
- **A focused Sleep Images page:** global images and one selected book gallery can be viewed and updated without
50+
navigating the hidden storage layout.
51+
- **Cleaner sleep and wake:** image-based sleep screens wake without the normal boot splash; direct Quick Resume into
52+
the reader remains visually quiet.
53+
- **Reading reliability and ergonomics:** finished books are grouped by month, completion data survives rereads more
54+
reliably, and a side-button hold can optionally turn back one page.
55+
56+
[Watch the complete sleep-image workflow](https://github.com/Sichroteph/YACP/releases/download/v1.5.0-yacp/YACP-sleep-images-overview.mp4)
57+
from the phone interface to the resulting Alice in Wonderland and Jurassic Park sleep screens on the reader.
58+
59+
This builds on earlier YACP work such as X3 no-flash screen maintenance and seamless Quick Resume. When a technical
60+
finding appears broadly useful, I try to submit it to CrossPoint as a focused PR so its maintainers can review and,
61+
if they wish, adopt it upstream. See the [changelog](CHANGELOG.md) for the complete inventory.
4262

4363
## Direction
4464

@@ -161,10 +181,10 @@ book. The first completion date stays unchanged when the book is reopened or rer
161181

162182
Finishing a new book opens a Reading Achievement screen with its reading time, sessions, average session, favorite
163183
reading period, reading span, completed-book count, and total reading time on the device. The following Finished Books
164-
view keeps the 32 most recently completed books in a bounded SD index and presents each known reading span as a compact
165-
start-to-finish timeline with the year on both dates and the reading time. Existing installations recover completed
166-
entries from their recent-books list without scanning the entire SD card. Opening Reading Stats also reconciles a
167-
completed book's persistent dates with its retained entry, so legacy timelines repair themselves without a fake edit.
184+
view keeps the 32 most recently completed books in a bounded SD index and groups them by finish month, showing each
185+
month's book count, reading time, titles, and authors. Existing installations recover completed entries from their
186+
recent-books list without scanning the entire SD card. Opening Reading Stats also reconciles a completed book's
187+
persistent dates and author with its retained entry, so legacy entries repair themselves without a fake edit.
168188

169189
<table>
170190
<tr>
@@ -252,9 +272,9 @@ checksums, and applies the [build checklist](BUILD_CHECKLIST.md).
252272

253273
## Project status
254274

255-
This is not a community project. Issues, Discussions, pull requests, feature requests, support requests, and project
256-
contact are not accepted. External pull requests are closed automatically. The source is public for inspection and
257-
forking; maintain a fork if a different direction is needed.
275+
This remains a personal firmware project rather than a community roadmap. GitHub Issues are open for reproducible bug
276+
reports, hardware feedback, and focused technical discussion. General support requests, feature voting, and external
277+
pull requests are not accepted; maintain a fork if a different direction is needed.
258278

259279
Optional financial support does not buy features or influence project decisions:
260280
[PayPal](https://www.paypal.com/paypalme/ChrJeannette).

docs/data-cache.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The main data directory is `.crosspoint` on the SD card. It stores render caches
3434
├── clippings/ # EPUB clipping/highlight files, one per book
3535
├── home_carousel_cache.bin # Lyra Carousel home-screen snapshot cache
3636
├── sleep_frame.bin # Temporary sleep overlay framebuffer, when used
37+
├── sleep_images/ # Rendered custom sleep-image grayscale planes
3738
├── epub_12471232/ # Each EPUB is cached to epub_<hash>
3839
│ ├── progress.bin # Reading position (chapter, page, etc.)
3940
│ ├── stats.bin # Legacy per-book reading stats

docs/file-formats.md

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,37 @@ All POD fields are written in the ESP32 little-endian representation used by
55
`Serialization.h`; strings are length-prefixed UTF-8 unless a format notes a
66
fixed-size char buffer.
77

8+
## `/.crosspoint/sleep_images/<pathHash>_<sourceHash>_<sourceSize>_<WxH>_v1.bin`
9+
10+
### Version 1
11+
12+
Custom BMP sleep images are rendered once into the three native display planes
13+
used by the grayscale sleep refresh, then cached in `/.crosspoint/sleep_images/`.
14+
The cache key includes:
15+
16+
- `pathHash`: FNV-1a 32-bit hash of the SD-card source path
17+
- `sourceHash`: FNV-1a 32-bit hash of the source file bytes
18+
- `sourceSize`: source file size in bytes
19+
- `WxH`: renderer screen dimensions
20+
- `v1`: cache format version
21+
22+
Binary layout:
23+
24+
- header:
25+
- `magic` (`uint32_t`, ASCII `YSIC` in little-endian)
26+
- `version` (`uint16_t`, `1`)
27+
- `screenWidth` (`uint16_t`)
28+
- `screenHeight` (`uint16_t`)
29+
- `bufferSize` (`uint32_t`)
30+
- `sourceHash` (`uint32_t`)
31+
- `sourceSize` (`uint32_t`)
32+
- `bufferSize` bytes: black-and-white base plane
33+
- `bufferSize` bytes: grayscale LSB plane
34+
- `bufferSize` bytes: grayscale MSB plane
35+
36+
The firmware compares the full header before using the cache. If a read fails,
37+
the image is rendered from the original BMP and the cache can be rebuilt.
38+
839
## `book.bin`
940

1041
### Version 8
@@ -230,32 +261,33 @@ Binary layout:
230261

231262
## `/.crosspoint/finished_books.bin`
232263

233-
### Version 2
264+
### Version 3
234265

235266
`finished_books.bin` is a bounded chronological index used by the persistent
236267
Finished Books statistics page. It holds at most 32 entries, all navigable in
237-
five-entry pages, and is refreshed
268+
four-entry pages, and is refreshed
238269
when completion changes and when a completed EPUB or XTC reader exits. The
239270
normal reader page-turn path never reads or writes it.
240271

241272
The eight-byte header contains:
242273

243274
- `[0-3]` magic ASCII `CPFB`
244-
- `[4]` version (`2`)
275+
- `[4]` version (`3`)
245276
- `[5]` entry count (`uint8_t`, maximum `32`)
246277
- `[6-7]` reserved (`uint16_t`)
247278

248279
Each variable-length entry contains a `uint64_t` path key, total reading seconds
249280
(`uint32_t`), start date and finish date (each `year uint16_t`, `month uint8_t`,
250-
`day uint8_t`), a title length (`uint16_t`, maximum 160), then the UTF-8 title
251-
bytes. Entries are stored newest finish date first. Saves use `.tmp` and `.bak`
252-
rotation. When an EPUB is moved to `/Read/`, its path key is migrated explicitly
253-
so two different books with the same title remain separate entries.
254-
255-
Version 1 entries, which contain no start date, remain readable. Their timeline
256-
falls back to the finish date with its year and the reading time until Reading
281+
`day uint8_t`), a title length (`uint16_t`, maximum 160), UTF-8 title bytes, an
282+
author length (`uint16_t`, maximum 120), then UTF-8 author bytes. Entries are
283+
stored newest finish date first. Saves use `.tmp` and `.bak` rotation. When an
284+
EPUB is moved to `/Read/`, its path key is migrated explicitly so two different
285+
books with the same title remain separate entries.
286+
287+
Version 1 entries, which contain no start date, and version 2 entries, which
288+
contain no author, remain readable. Missing fields stay blank until Reading
257289
Stats reconciles the entry with the completed book's persistent statistics. The
258-
next index write uses version 2 and the real book-path key; accidental cache-path
290+
next index write uses version 3 and the real book-path key; accidental cache-path
259291
entries are merged during the same reconciliation.
260292

261293
When the file is first introduced, YACP checks only the bounded recent-books

docs/reader-features.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ If **Move finished books to Read folder** is enabled, books marked as finished a
168168

169169
Marking books as finished also contributes to the total **Books Read** reading stat.
170170

171-
The **Finished Books** statistics page shows the reading start and finish dates with their years, followed by the
172-
active reading time. It does not display a separate elapsed-day count.
173-
Opening Reading Stats for a completed EPUB or XTC reconciles those persistent dates with the bounded Finished Books
174-
index, including legacy entries that do not yet contain their known start date.
171+
The **Finished Books** statistics page groups completed books by finish month. Each month shows the completed-book
172+
count and total reading time for that month, followed by the finished titles and their authors when known.
173+
Opening Reading Stats for a completed EPUB or XTC reconciles its persistent dates and author with the bounded Finished
174+
Books index, including legacy entries that do not yet contain their known start date or author.
175175

176176
The file browser can also mark books as finished without opening them first.
177177

30.5 KB
Loading
47.6 KB
Loading
37.8 KB
Loading

0 commit comments

Comments
 (0)