FlexBLE 1.0.0: merge upstream CrossInk v1.2.11.1 + BLE-friendly heap budgeting - #6
Merged
Conversation
docs: update readme for v1.2.9.1 table support
… display in carousel theme
…r (#1807) ## Summary * **What is the goal of this PR?** Fixes a bug in the jpeg nearest-neighbor downscaler where source image rows containing visible content may be cropped. * **What changes are included?** Split the single `fineScaleFP`/`invScaleFP` scale pair in `JpegToFramebufferConverter.cpp` into separate X (`fineScaleFPX`/`invScaleFPX`) and Y (`fineScaleFPY`/`invScaleFPY`) pairs ## Additional Context The one case that I encountered in my epub: <img width="480" height="37" alt="img_6_0" src="https://github.com/user-attachments/assets/0de3778c-cf3d-42dc-a1ba-4ba729f6b1c4" /> The image generated from pxc cache with the latest commit: <img width="464" height="36" alt="img_6_0_master pxc" src="https://github.com/user-attachments/assets/92ba06e5-be15-4db6-840e-882bdddb1baf" /> With this fix, the bottom outline of each character is still there: <img width="464" height="36" alt="img_6_0_fixed pxc" src="https://github.com/user-attachments/assets/4246ce55-5a20-480f-862f-7988f804c1fb" /> --- ### 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**_
## Summary Update the Open X4 SDK to point to the CrossPoint organization fork. This allows us to take SDK changes without being blocked on the upstream repository. --- ### 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**_
## Summary Simplify duplicated code in `XtcReaderActivity` to use `ReaderUtils::detectPageTurn`. This implementation is now shared with `EpubReaderActivity` and `TxtReaderActivity`. Also deduplicated the chapter skip time constant. --- ### 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**_
## Summary Before, any sub-activity of a reader activity needed to override `isReaderActivity` to maintain correct bookkeeping through `ActivityManager::isReaderActivity`. We could easily miss this in any new sub-activities. Instead, simplify so each reader activity correctly reports and then `ActivityManager` checks for any reader activity in its stack. --- ### 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**_
Queue the post-pop redraw instead of waiting for it while unwinding nested activities, which avoids the Reader Options back-path render-lock assertion. Make requestUpdateAndWait() report whether a synchronous render completed or was rejected, and update blocking callers to handle rejected sync renders explicitly instead of relying on an implicit async fallback. Request redraws after OTA check state transitions so the UI leaves the checking screen for failure, no-update, or confirmation states. Use an initialized portMUX_TYPE for the ActivityManager render-wait critical sections. ESP-IDF FreeRTOS critical-section APIs take a spinlock parameter, so taskENTER_CRITICAL(nullptr) is not valid on device targets.
docs: update readme for v1.2.9.1 table support
* chore: update GitHub bug report template to include device type * ci: update release and release candidate workflows * docs: update readme for v1.2.9.1 table support * fix: serialize display and SD access on the shared SPI bus to prevent crashes * fix: prevent blank alert and crash screens * fix: replace assert with runtime null-check in HalSpiBus mutex init
…ake effect properly
## Summary SD card font fixes: - `TxtReaderActivity` needs to call `renderer.ensureSdCardFontReady` to build the advance lookup table to support rendering with SD card fonts. This revealed that `TxtReaderActivity` was inconsistently performing layout with `getTextWidth`, when the renderer actually uses `getTextAdvanceX`, which can lead to minor inconsistencies in alignment. - Avoid allocating one big `allText` string in `ParsedText::layoutAndExtractLines`. Instead, pass the vector of word strings directly to `SdCardFont::buildAdvanceTable`, where the algorithm just needs to iterate codepoints anyway. --- ### 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**_ --------- Co-authored-by: Justin Mitchell <justin@jmitch.com>
## Summary SD card font fixes: - `TxtReaderActivity` needs to call `renderer.ensureSdCardFontReady` to build the advance lookup table to support rendering with SD card fonts. This revealed that `TxtReaderActivity` was inconsistently performing layout with `getTextWidth`, when the renderer actually uses `getTextAdvanceX`, which can lead to minor inconsistencies in alignment. - Avoid allocating one big `allText` string in `ParsedText::layoutAndExtractLines`. Instead, pass the vector of word strings directly to `SdCardFont::buildAdvanceTable`, where the algorithm just needs to iterate codepoints anyway. --- ### 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**_ --------- Co-authored-by: Justin Mitchell <justin@jmitch.com> # Conflicts: # lib/EpdFont/SdCardFont.cpp
Document the Xteink Unlocker tool requirement for third-party purchased xteink units that ship with USB flashing locked. Include warnings about bricking risks when flashing unsupported firmwares (e.g. Papyrix) on locked devices, as they may permanently lock the device with no recovery path.
Document the Xteink Unlocker tool requirement for third-party purchased xteink units that ship with USB flashing locked. Include warnings about bricking risks when flashing unsupported firmwares (e.g. Papyrix) on locked devices, as they may permanently lock the device with no recovery path. # Conflicts: # README.md
## Summary - Fixes #1928 by having the prewarm and advance table functions resolve fallback styles --- ### AI Usage Did you use AI tools to help write this code? YES - Codex --------- Co-authored-by: Uri Tauber <uritaube@gmail.com> # Conflicts: # lib/EpdFont/SdCardFont.cpp
First stable FlexBLE release post-upstream-merge. FlexBLE now has its own semver (flexble_version) independent of upstream CrossInk's versioning; crossink_version tracks the upstream sync point. Settings → System and the boot log both display "FlexBLE 1.0.0 (CrossInk 1.2.11.1)". This commit folds together the upstream merge resolution, several FlexBLE integration fixes that the merged-in code required, and a set of BLE + heap-management improvements found through extensive on-device testing. Headline FlexBLE-specific work in this release - BT Quick Connect action in the Global Book Settings drawer: enables BLE and reconnects to the bonded remote (or launches the pair UI if none), closes drawer back to the book on success. - After a successful BLE connect from inside a book, both the BT settings activity and the reader menu auto-pop so the user lands straight back in the book — no manual back-tapping. - PackBits-compressed BW backup for the grayscale anti-aliasing pass. Single small bounded allocation instead of 12 × 4 KB chunks; typical reader pages compress 10-30×. Dramatically reduces fragmentation failures when BLE is consuming its ~58 KB. - Auto-retry on chapter-layout abort: if the parser trips the heap floor while BLE is active, FlexBLE silently disables BLE, retries the parse with the freed headroom, and lets auto-reconnect restore the link on the user's next remote button press. - LYRA_FLOW theme preserved through the merge as a first-class option, with its original input grammar (front Prev/Next within carousel, side Up/Down to menu) restored. Heap-budget tuning for BLE-paired sessions - MIN_FREE_HEAP_FOR_TEXT_LAYOUT 48→16 KB, MIN_MAX_ALLOC 24→10 KB - EPUB_INLINE_IMAGE_MIN_FREE 72→56 KB, MIN_MAX_ALLOC 48→32 KB - All thresholds gracefully fall back to per-allocation failures; no OOM crash regression. UX polish - Bluetooth main menu uses Up/Down labels and binds both side U/D and front L/R to navigation, matching Reader Options / Controls Options. - BluetoothSettings Confirm handlers switched from wasPressed to wasReleased so the release doesn't leak through to the underlying reader menu on pop. - Back release suppressed after long-blocking BLE reconnects so a hasty Back tap during the freeze doesn't cascade into a reader exit + BLE auto-disable. - BookSettingsDrawer hint area enlarged so bottom button labels render without clipping. Upstream merge brings (see CHANGELOG for full upstream notes) - LyraCarouselTheme and MinimalTheme - Recent Books grid view + per-book reading progress in carousel - Custom sleep timer picker, in-reader Controls shortcut, bookmark cleanup shortcuts, File Browser long-press actions - Richer EPUB parser (better CSS, hyphenation, image sizing, tables) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
imshentastic
pushed a commit
that referenced
this pull request
May 23, 2026
* Move to smart pointers and split out ParsedText class * Cleanup ParsedText * Fix clearCache functions and clear section cache if page load fails * Bump Page and Section file versions * Combine removeDir implementations in Epub * Adjust screen margins
imshentastic
added a commit
that referenced
this pull request
May 23, 2026
FlexBLE 1.0.0: merge upstream CrossInk v1.2.11.1 + BLE-friendly heap budgeting
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.
Summary
First stable FlexBLE release with its own semver (
flexble_version = 1.0.0), built on a merge of upstream CrossInk v1.2.11.1. Thecrossink_versionfield tracks the upstream sync point and stays meaningful for OTA/issue correlation;flexble_versionis FlexBLE's own scheme. Boot log and Settings → System displayFlexBLE 1.0.0 (CrossInk 1.2.11.1).Headline FlexBLE-specific changes
BLE quality-of-life
BluetoothSettingsConfirm action handlers switched fromwasPressedtowasReleasedso the release doesn't leak through to the underlying reader menu on pop (was causing re-launch loops).Grayscale + memory
Theme preservation through the merge
LyraFlowTheme(5-book carousel from chintanvajariya's fork) preserved as a first-class theme alongside upstream's newLyraCarouselThemeandMinimalTheme.Upstream merge brings (v1.2.10 + v1.2.11 + v1.2.11.1)
LyraCarouselThemeandMinimalTheme(in addition to the preservedLyraFlowTheme)Versioning
flexble_version1.0.0crossink_version1.2.11.1version1.3.0CROSSPOINT_VERSIONmacroScale
drawPerspectiveBitmap,BookStatsActivityconstructor mismatch,LyraFlowThemeoverride signature, Flow input grammar, drawer hint clipping)Test plan
tinyenv (RAM 32.5%, Flash 95.3%)🤖 Generated with Claude Code