Compare commits

..

19 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
9b8d565b99 Refactor duplicate progress bar functions into drawStatusProgressBar
Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
2026-02-01 22:13:39 +00:00
Luke Stein
58c2d8453e Fix progress bar vertical alignment 2026-02-01 16:32:26 -05:00
copilot-swe-agent[bot]
0645ad9632 Fix text overlap with chapter progress bar by adjusting textY position
Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
2026-02-01 16:32:26 -05:00
copilot-swe-agent[bot]
df8ce19144 Remove accidentally added llvm.sh script
Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
2026-02-01 16:32:26 -05:00
copilot-swe-agent[bot]
a28a9ab6d6 Run clang-format on modified files
Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
2026-02-01 16:32:26 -05:00
Luke Stein
1beef69f82 Rename progress bar height variable and make 6 pixels 2026-02-01 16:32:26 -05:00
copilot-swe-agent[bot]
30b56eb977 Add Chapter Progress Bar status bar option
Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
2026-02-01 16:32:26 -05:00
copilot-swe-agent[bot]
e0db851db9 Initial plan 2026-02-01 16:32:26 -05:00
Uri Tauber
e5c0ddc9fa
feat: Debugging monitor script (#555)
Some checks are pending
CI / build (push) Waiting to run
## Summary

* **What is the goal of this PR?**
Add a debugging script to help developers monitor the ESP32 serial port
directly from a PC.

* **What changes are included?**
Added a new script: scripts/debugging_monitor.py

## Additional Context

While working on a new Crosspoint-Reader feature, it quickly became
clear that watching the ESP32 serial output without any visual cues was
inconvenient and easy to mess up.

This script improves the debugging experience by reading data from the
serial port and providing:

1. A timestamp prefix for every log line (instead of milliseconds since
power-up)
2. Color-coded output for different message types
3. A secondary window displaying a live graph of RAM usage, which is
especially useful for tracking the memory impact of new features

<img width="1916" height="1049" alt="Screenshot_20260126_183811"
src="https://github.com/user-attachments/assets/6291887f-ac17-43ac-9e43-f5dec8a7097e"
/>

---

### AI Usage

Did you use AI tools to help write this code? _**< PARTIALLY >**_
I wrote the initial version of the script. Gemini was used to help add
the Matplotlib-based graphing and threading logic.
2026-02-01 22:53:20 +11:00
Arthur Tazhitdinov
b1dcb7733b
fix: truncating chapter titles using UTF-8 safe function (#599)
## Summary

* Truncating chapter titles using utf8 safe functions (Cyrillic titles
were split mid codepoint)
* refactoring of lib/Utf8

---

### 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? _**< PARTIALLY >**_
2026-02-01 22:23:48 +11:00
Arthur Tazhitdinov
0d82b03981
fix: don't wake up after USB connect (#644)
## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
2026-02-01 22:19:33 +11:00
Dave Allie
5a97334ace
Revert "fix: don't wake up after USB connect" (#643)
Reverts crosspoint-reader/crosspoint-reader#576

Causing a boot loop on master
2026-02-01 21:35:25 +11:00
Gaspar Fabrega Ragni
4dd73a211a
fix: custom sleep not showing image at index 0 (#639)
Some checks are pending
CI / build (push) Waiting to run
## Summary

* Fixing custom sleep behaviour where the first image in the /sleep
directory is not shown
* image at index 0 is not being rendered when more than 1 image is
stored in /sleep directory, because `APP_STATE.lastSleepImage` is always
0.

## Additional Context

* `APP_STATE.lastSleepImage` is reset to 0 when a epub is open, this
value is only used to compare it to the randomly selected one in
`renderCustomSleepScreen()` that should always be a valid index, since
the list of valid bmp images is colected from scratch. -> no need to
reset it and block image @ index 0 from being rendered

---

### 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**_

Co-authored-by: Oyster <Oyster@home>
2026-02-01 19:22:52 +11:00
Thomas Foskolos
634f6279cb
docs: Update USER_GUIDE.md (#625)
Add Greek as not supported language atm on the use guide
2026-02-01 19:21:36 +11:00
nscheung
11b2a59233
fix: Hide button hints in landscape CW mode (#637)
## Summary

* This change hides the button hints from overlapping chapter titles
when in landscape CW mode.

Before

![Before](https://github.com/user-attachments/assets/3015a9b3-3fa5-443b-a641-3e65841a6fbc)
After

![After](https://github.com/user-attachments/assets/011de15d-5ae6-429c-8f91-d8f37abe52d9)

## Additional Context

* I initially considered implementing an offset fix, but with potential
UI changes on the horizon, hiding the button hints appears to be the
simplest solution for now.

---

### 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? < Partially >
2026-02-01 19:21:28 +11:00
Luke Stein
12c20bb09e
fix: WiFi error screen text clarifications (#612)
## Summary

* Clarify strings on Wifi connection error screens
* I have confirmed on device that these are short enough not to overflow
screen margins

## Additional Context

* Several screens give duplicative text (e.g., header "Connection
Failed" with contents text "Connection failed") or slightly confusing
text (header "Forget Network?" with text "Remove saved password?")

---

### AI Usage

Did you use AI tools to help write this code? **No**
2026-02-01 19:19:23 +11:00
Arthur Tazhitdinov
6b7065b986
fix: don't wake up after USB connect (#576)
## Summary

* fixes problem that if short power button press is enabled, connecting
device to usb leads to waking up
2026-02-01 18:51:31 +11:00
Arthur Tazhitdinov
f4df513bf3
feat(ui): change popup logic (#442)
## Summary

* refactors Indexing popups into ScreenComponents (they had different
implementations in different files)
* removes Indexing popup for small chapters
* only show Indexing popup (without progress bar) for large chapters
(using same minimum file size condition as for progress bar before)

## Additional Context

* Having to show even single popup message and redraw the screen slows
down the flow significantly
* Testing results:
    * Opening large chapter with progress bar - 11 seconds
* Same chapter without progress bar, only single Indexing popup - 5
seconds

---

### AI Usage

Did you use AI tools to help write this code? _**< PARTIALLY>**_
2026-02-01 18:41:24 +11:00
Jonas Diemer
f935b59a41
feat: Add reading menu and delete cache function (#433)
## Summary

* Adds a menu in the Epub reader
* The Chapter selection is moved there to pos 1 (so it can be reached by
double tapping the confirm button)
* A Go Home is there, too
* Most significantly, a function "Delete Book Cache" is added. This
returns to main (to avoid directly rebuilding cached items, eg. if this
is used to debug/develop other areas - and it's also easier ;))

Probably, the Sync function could now be moved from the Chapter
selection to this menu, too.

---

### 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? _**PARTIALLY**_
2026-02-01 18:34:30 +11:00
4 changed files with 7 additions and 19 deletions

View File

@ -74,25 +74,14 @@ void ScreenComponents::fillPopupProgress(const GfxRenderer& renderer, const Popu
renderer.displayBuffer(HalDisplay::FAST_REFRESH);
}
void ScreenComponents::drawBookProgressBar(const GfxRenderer& renderer, const size_t bookProgress) {
void ScreenComponents::drawStatusProgressBar(const GfxRenderer& renderer, const size_t progress) {
int vieweableMarginTop, vieweableMarginRight, vieweableMarginBottom, vieweableMarginLeft;
renderer.getOrientedViewableTRBL(&vieweableMarginTop, &vieweableMarginRight, &vieweableMarginBottom,
&vieweableMarginLeft);
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - PROGRESS_BAR_HEIGHT;
const int barWidth = progressBarMaxWidth * bookProgress / 100;
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, PROGRESS_BAR_HEIGHT, true);
}
void ScreenComponents::drawChapterProgressBar(const GfxRenderer& renderer, const size_t chapterProgress) {
int vieweableMarginTop, vieweableMarginRight, vieweableMarginBottom, vieweableMarginLeft;
renderer.getOrientedViewableTRBL(&vieweableMarginTop, &vieweableMarginRight, &vieweableMarginBottom,
&vieweableMarginLeft);
const int progressBarMaxWidth = renderer.getScreenWidth() - vieweableMarginLeft - vieweableMarginRight;
const int progressBarY = renderer.getScreenHeight() - vieweableMarginBottom - PROGRESS_BAR_HEIGHT;
const int barWidth = progressBarMaxWidth * chapterProgress / 100;
const int barWidth = progressBarMaxWidth * progress / 100;
renderer.fillRect(vieweableMarginLeft, progressBarY, barWidth, PROGRESS_BAR_HEIGHT, true);
}

View File

@ -23,8 +23,7 @@ class ScreenComponents {
};
static void drawBattery(const GfxRenderer& renderer, int left, int top, bool showPercentage = true);
static void drawBookProgressBar(const GfxRenderer& renderer, size_t bookProgress);
static void drawChapterProgressBar(const GfxRenderer& renderer, size_t chapterProgress);
static void drawStatusProgressBar(const GfxRenderer& renderer, size_t progress);
static PopupLayout drawPopup(const GfxRenderer& renderer, const char* message);

View File

@ -541,14 +541,14 @@ void EpubReaderActivity::renderStatusBar(const int orientedMarginRight, const in
if (showBookProgressBar) {
// Draw progress bar at the very bottom of the screen, from edge to edge of viewable area
ScreenComponents::drawBookProgressBar(renderer, static_cast<size_t>(bookProgress));
ScreenComponents::drawStatusProgressBar(renderer, static_cast<size_t>(bookProgress));
}
if (showChapterProgressBar) {
// Draw chapter progress bar at the very bottom of the screen, from edge to edge of viewable area
const float chapterProgress =
(section->pageCount > 0) ? (static_cast<float>(section->currentPage + 1) / section->pageCount) * 100 : 0;
ScreenComponents::drawChapterProgressBar(renderer, static_cast<size_t>(chapterProgress));
ScreenComponents::drawStatusProgressBar(renderer, static_cast<size_t>(chapterProgress));
}
if (showBattery) {

View File

@ -527,12 +527,12 @@ void TxtReaderActivity::renderStatusBar(const int orientedMarginRight, const int
if (showProgressBar) {
// Draw progress bar at the very bottom of the screen, from edge to edge of viewable area
ScreenComponents::drawBookProgressBar(renderer, static_cast<size_t>(progress));
ScreenComponents::drawStatusProgressBar(renderer, static_cast<size_t>(progress));
}
if (showChapterProgressBar) {
// For text mode, treat the entire book as one chapter, so chapter progress == book progress
ScreenComponents::drawChapterProgressBar(renderer, static_cast<size_t>(progress));
ScreenComponents::drawStatusProgressBar(renderer, static_cast<size_t>(progress));
}
if (showBattery) {