Commit Graph
94 Commits
Author SHA1 Message Date
jpirnay 8add255bc3 Add some linter comments 2026-04-11 19:44:40 +02:00
jpirnay 4d9484af57 Add mutex to SleepActivity 2026-04-08 12:10:52 +02:00
jpirnay 75277dbee5 Minor changes 2026-04-08 10:20:05 +02:00
jpirnay 655b5d4678 Some fixes 2026-04-08 09:49:44 +02:00
jpirnay 66508258d3 Extended bitmap viewer by option to togglie between grayscale and bw mode 2026-04-08 09:37:08 +02:00
jpirnay e828245c6b Fix sleep overlay rendering conditions 2026-04-08 00:17:01 +02:00
jpirnay 1f99ed404d Fix duplicate include 2026-04-08 00:12:01 +02:00
jpirnay d49b7434c9 Merge branch 'fix-darkpng' of https://github.com/jpirnay/crosspoint-reader into fix-darkpng 2026-04-07 23:52:04 +02:00
jpirnay effa39bd58 Properly deal with pngs as sleep images 2026-04-07 23:50:57 +02:00
jpirnay 09ec454146 Properly deal with pngs as sleep images 2026-04-07 23:50:38 +02:00
jpirnay 7168c46dec Minor fixes 2026-04-07 23:28:51 +02:00
jpirnay fb8196e946 Change index type 2026-04-07 11:12:07 +02:00
jpirnay 93669ff492 Treat .sleep and sleep as equal 2026-04-07 10:13:02 +02:00
jpirnay f45b780900 Support png and jpg in Image Viewer 2026-04-06 12:39:37 +02:00
jpirnay e00ac4b63a Only load info when needed 2026-04-06 10:56:01 +02:00
jpirnay 26dc65735f Review comments 2026-04-06 10:52:05 +02:00
jpirnay b1462b37b7 Make information overlay applicable for custom bitmaps too 2026-04-06 10:40:04 +02:00
jpirnay 6056b6fe61 Proper centering 2026-04-03 11:52:42 +02:00
jpirnay 1563e034d3 Remove superfluous prefix str 2026-04-03 11:51:48 +02:00
jpirnay 0cf0009cd0 Remove Chapter prefix 2026-04-02 19:01:38 +02:00
jpirnay 9cdc1b8784 Resync with PR 1534 2026-04-01 11:00:51 +02:00
jpirnay f764d9c6a0 Merge remote-tracking branch 'pablohc/refactor/pr-1258-cover-overlay' into mybuild
# Conflicts:
#	lib/I18n/translations/english.yaml
#	scripts/gen_i18n.py
#	src/CrossPointSettings.h
#	src/SettingsList.h
#	src/activities/boot_sleep/SleepActivity.cpp
#	src/activities/boot_sleep/SleepActivity.h
2026-03-30 16:12:00 +02:00
pablohc fbeaf48e32 refactor: pass precomputed BookOverlayInfo to renderBitmapSleepScreen 2026-03-29 22:14:21 +02:00
pablohc 1a7acd91bb fix: align overlay textBlockHeight with actual rendering transitions 2026-03-29 22:03:28 +02:00
pablohc 0f1d3ef31d fix: localize sleep overlay strings, validate TXT cache header, migrate overlay enum 2026-03-29 21:55:51 +02:00
pablohc 389ed7266b Refactor sleep cover overlay: BookOverlayInfo struct, multi-line layout, 4 color modes (White/Gray/Black/Off) 2026-03-29 20:51:56 +02:00
jpirnay b96750f30e Fix information box 2026-03-24 09:46:55 +01:00
jpirnay 05003c605a cast currentpage 2026-03-24 09:46:55 +01:00
jpirnay 9addba2886 Amend xtc logic 2026-03-24 09:46:55 +01:00
jpirnay 4dff52b83e Review changes 2026-03-24 09:46:55 +01:00
jpirnay dea0503040 Add sleep screen information overlay 2026-03-24 09:46:54 +01:00
jpirnay d53f8caeb4 clangf 2026-03-23 21:22:27 +01:00
jpirnay 6781ac75b5 Merge branch 'feat-page-overlay' of https://github.com/jpirnay/crosspoint-reader into mybuild 2026-03-19 17:25:57 +01:00
jpirnay 84044886a7 Use both .sleep and sleep directory 2026-03-19 17:25:05 +01:00
jpirnay ba7aa1e694 Merge branch 'feat-overlay' of https://github.com/jpirnay/crosspoint-reader into mybuild 2026-03-18 12:38:54 +01:00
jpirnay 7144450934 Fix information box 2026-03-18 12:38:08 +01:00
jpirnay 9b70ddc93b Merge branch 'master' of https://github.com/jpirnay/crosspoint-reader into mybuild 2026-03-13 21:24:04 +01:00
jpirnay beeab0ff55 cast currentpage 2026-03-13 21:15:05 +01:00
jpirnay fb3997aae5 fix: Init lastSleepImage (edge case) (#1360)
## Summary

* **What is the goal of this PR?** fix edge case for definition

## Additional Context

If loadFromFile() returns false (no state file exists — first boot, or
SD missing), lastSleepImage is never set and contains garbage.
[SleepActivity.cpp:83] then uses it in a while comparison to avoid
repeating the same image. The JSON path (doc["lastSleepImage"] |
(uint8_t)0) handles it, but only if the file exists.

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _** NO **_
2026-03-11 18:37:13 -05:00
jpirnay 0a4a369d25 Merge branch 'feat-page-overlay' of https://github.com/jpirnay/crosspoint-reader into mybuild 2026-03-09 19:51:52 +01:00
jpirnay 3e52fad331 Overlay always use portrait 2026-03-09 19:51:28 +01:00
jpirnay 7ab6d5ac4b Proper fix 2026-03-08 10:13:36 +01:00
jpirnay 47257fe4b4 Add include 2026-03-08 10:12:16 +01:00
jpirnay c63659311e Merge branch 'feat-overlay' of https://github.com/jpirnay/crosspoint-reader into mybuild 2026-03-08 09:58:14 +01:00
jpirnay 9ca0f30b16 Sync to master 2026-03-07 10:29:41 +01:00
jpirnay 34a96d717d Merge branch 'master' of https://github.com/crosspoint-reader/crosspoint-reader into feat-page-overlay 2026-03-07 10:22:18 +01:00
jpirnay 761a050185 Merge branch 'master' of https://github.com/jpirnay/crosspoint-reader into feat-page-overlay 2026-03-05 18:28:38 +01:00
Zach Nelson 5b8787b2bc perf: Avoid creating strings for file extension checks (#1303)
## Summary

**What is the goal of this PR?**

This change avoids the pattern of creating a `std::string` using
`.substr` in order to compare against a file extension literal.
```c++
std::string path;
if (path.length() >= 4 && path.substr(path.length() - 4) == ".ext")
```

The `checkFileExtension` utility has moved from StringUtils to
FsHelpers, to be available to code in lib/. The signature now accepts a
`std::string_view` instead of `std::string`, which makes the single
implementation reusable for Arduino `String`.

Added utility functions for commonly repeated extensions.

These changes **save about 2 KB of flash (5,999,427 to 5,997,343)**.

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _**NO**_
2026-03-05 10:12:22 -06:00
jpirnay add08bc6c5 feat: Prefer ".sleep" over "sleep" for custom image directory (#948)
## Summary

* Custom sleep screen images now load from /.sleep directory
(preferred), falling back to /sleep for backwards compatibility. The
dot-prefix keeps the directory hidden from the file browser.
* Rewrote User Guide section 3.6 to document all six sleep screen modes,
cover settings, and the updated custom image setup.

## Additional Context

* The sleep directoy entry while browsing files was distracting.

---

### AI Usage

While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.

Did you use AI tools to help write this code? _NO_
2026-03-02 13:28:14 +01:00
jpirnay 87cac6f8b4 clang 2026-03-02 11:54:52 +01:00