mirror of
https://github.com/crosspoint-reader/crosspoint-reader.git
synced 2026-04-29 10:26:52 -07:00
fix/image-container-width
632 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
77a964e83a | Style fixes | ||
|
|
e20f4550ce | Render image inside existing block style margins | ||
|
|
9b3885135f |
feat: Initial support for the x3 (#875)
## Summary Adds Xteink X3 hardware support to CrossPoint Reader. The X3 uses the same SSD1677 e-ink controller as the X4 but with a different panel (792x528 vs 800x480), different button layout, and an I2C fuel gauge (BQ27220) instead of ADC-based battery reading. All X3-specific behavior is gated by runtime device detection β X4 behavior is unchanged. Depends on community-sdk X3 support: open-x4-epaper/community-sdk#19 (merged). ## Changes ### HAL Layer **HalGPIO** (`lib/hal/HalGPIO.cpp/.h`) - I2C-based device fingerprinting at boot: probes for BQ27220 fuel gauge, DS3231 RTC, and QMI8658 IMU to distinguish X3 from X4 - Detection result cached in NVS for fast subsequent boots - Exposes `deviceIsX3()` / `deviceIsX4()` helpers used throughout the codebase - X3 button mapping (7 GPIOs vs X4's layout) - USB connection detection and wake classification for X3 **HalDisplay** (`lib/hal/HalDisplay.cpp/.h`) - Calls `einkDisplay.setDisplayX3()` before init when X3 is detected - Requests display resync after power button / flash wake events - Runtime display dimension accessors (`getDisplayWidth()`, `getDisplayHeight()`, `getBufferSize()`) - Exposed as global `display` instance for use by image converters **HalPowerManager** (`lib/hal/HalPowerManager.cpp/.h`) - X3 battery reading via I2C fuel gauge (BQ27220 at 0x55, SOC register) - X3 power button uses GPIO hold for deep sleep ### Display & Rendering **GfxRenderer** (`lib/GfxRenderer/GfxRenderer.cpp/.h`) - Buffer size and display dimensions are now runtime values (not compile-time constants) to support both panel sizes - X3 anti-aliasing tuning: only the darker grayscale level is applied to avoid washed-out text on the X3 panel. X4 retains both levels via `deviceIsX4()` gate **Image Converters** (`lib/JpegToBmpConverter`, `lib/PngToBmpConverter`) - Cover image prescale target uses runtime display dimensions from HAL instead of hardcoded 800x480 ### UI Themes **BaseTheme / LyraTheme** (`src/components/themes/`) - X3 button position mapping for the different physical layout - Adjusted UI element positioning for 792x528 viewport ### Boot & Init **main.cpp** - X3 hardware detection logging - Adjusted init sequence for X3 (no `HalSystem::begin()` dependency on X3 path) **HomeActivity** - Uses runtime `renderer.getBufferSize()` instead of static `GfxRenderer::getBufferSize()` FYI I did not add support for the gyro page turner. That can be it's own PR. |
||
|
|
e6c6e72a24 |
chore(release): 1.2.0 Release Candidate (#1483)
## Summary It's been a little while since the last release, but the community has been incredibly busy. With 155 changes from 48 contributors (30 of which were new!), there was a lot to cover. Here are some of the highlights: **π€ Kerning, Ligatures, and Font Improvements** Text rendering gets a significant upgrade with proper kerning and ligature support, fixed-point fractional x-advance for more accurate character placement, and font compression improvements that reduce flash usage. **π Footnotes** Footnote anchor navigation lets you select a footnote reference and jump to the footnote text, then jump back. Slim footnotes support is also available for books that use inline footnotes. **π EPUB Optimizer** A new integrated EPUB optimizer can clean up and reprocess books for better compatibility with the reader, directly from the device. **π Battery Charging Indicator** You can now see when your device is actively charging, with a visual indicator on the battery icon. **πΎ Crash Diagnostics** When something goes wrong, the firmware now dumps a crash report to the SD card β even without USB plugged in. This makes it much easier to report and diagnose issues. **π New Languages** The community continues to expand language support. New in this release: Turkish, Danish, Finnish, Polish, Dutch, Belarusian, Italian, Ukrainian, Romanian, Catalan, Vietnamese, and Kazakh β along with significant improvements to existing translations. **π File Management** Multi-select file deletion, BMP image viewer in the file browser, hidden directory browsing, and long-click file deletion from the file browser. **β‘ Performance** Under the hood, text layout switched from `std::list` to `std::vector`, HTML entity lookups are now O(log(n)), font rendering is faster, image decode is 5-20% faster with per-pixel overhead eliminated, and multiple string allocation hot paths were eliminated. Pre-indexing of the next chapter also reduces page-turn latency at chapter boundaries. --- Along with all of the above, there are many other additions including **WebDAV support**, **auto page turn**, **QR code for current page**, **split status bar settings**, **screenshot capture**, **JSON-based settings migration**, **light/dark theme groundwork**, and a long list of stability fixes and translation improvements. ## What's Changed ### Features * feat: Support for kerning and ligatures by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/873 * feat: footnote anchor navigation by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1245 * feat: slim footnotes support by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1031 * feat: integrated epub optimizer by @zgredex and @pablohc in https://github.com/crosspoint-reader/crosspoint-reader/pull/1224 * feat: battery charging indicator (mirroring PR #537) by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1427 * feat: dump crash report to sdcard by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1145 * feat: Implement silent pre-indexing for the next chapter in EpubReaderActivity by @LSTAR1900 in https://github.com/crosspoint-reader/crosspoint-reader/pull/979 * feat: upgrade platform and support webdav by @dexif in https://github.com/crosspoint-reader/crosspoint-reader/pull/1047 * feat: Auto Page Turn for Epub Reader by @GenesiaW in https://github.com/crosspoint-reader/crosspoint-reader/pull/1219 * feat: enhance file deletion functionality with multi-select by @Jessica765 in https://github.com/crosspoint-reader/crosspoint-reader/pull/682 * feat: Long Click for File Deletion through File Browser by @Levrk in https://github.com/crosspoint-reader/crosspoint-reader/pull/909 * feat: Take screenshots by @el in https://github.com/crosspoint-reader/crosspoint-reader/pull/759 * feat: Current page as QR by @el in https://github.com/crosspoint-reader/crosspoint-reader/pull/1099 * feat: Download links for web server by @el in https://github.com/crosspoint-reader/crosspoint-reader/pull/1039 * feat: Added BmpViewer activity for viewing .bmp images in file browser by @Levrk in https://github.com/crosspoint-reader/crosspoint-reader/pull/887 * feat: User setting for image display by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1291 * feat: Show hidden directories in browser by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1288 * feat: Prefer ".sleep" over "sleep" for custom image directory by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/948 * feat: Allow a local configuration file for custom compiles by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/879 * feat: Migrate binary settings to json by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/920 * feat: split status bar setting by @whyte-j in https://github.com/crosspoint-reader/crosspoint-reader/pull/733 * feat: wrapped text in GfxRender, implemented in themes so far by @iandchasse in https://github.com/crosspoint-reader/crosspoint-reader/pull/1141 * feat: Themed language screen by @CaptainFrito in https://github.com/crosspoint-reader/crosspoint-reader/pull/1020 * feat: set WiFi hostname to CrossPoint-Reader-XXXXXXXXXXXX by @dexif in https://github.com/crosspoint-reader/crosspoint-reader/pull/1107 * feat: Add maxAlloc to memory information by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1152 * feat: replace picojpeg with JPEGDEC for JPEG image decoding by @martinbrook in https://github.com/crosspoint-reader/crosspoint-reader/pull/1136 * feat: Add git branch to version information on settings screen by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1225 * feat: sort languages in selection menu by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1071 * feat: Latin Extended-B European glyphs by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1157 * feat: Latin Extended-B European glyphs by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1167 * feat: Vietnamese glyphs support by @danoooob in https://github.com/crosspoint-reader/crosspoint-reader/pull/1147 * feat: add Turkish translation by @barbarhan in https://github.com/crosspoint-reader/crosspoint-reader/pull/1192 * feat: add full Danish translation by @hajisan in https://github.com/crosspoint-reader/crosspoint-reader/pull/1146 * feat: Add Finnish translations by @plahteenlahti in https://github.com/crosspoint-reader/crosspoint-reader/pull/1133 * feat: Add Polish Language by @th0m4sek in https://github.com/crosspoint-reader/crosspoint-reader/pull/1155 * feat: add Dutch translation by @basvdploeg in https://github.com/crosspoint-reader/crosspoint-reader/pull/1204 * feat: add Belarusian translation by @dexif in https://github.com/crosspoint-reader/crosspoint-reader/pull/1120 * feat: Add full Italian translations by @andreaturchet in https://github.com/crosspoint-reader/crosspoint-reader/pull/1144 * feat: add Ukrainian translation by @mirus-ua in https://github.com/crosspoint-reader/crosspoint-reader/pull/1065 * feat: Add Kazakh (kk) language support by @fsocietyipa in https://github.com/crosspoint-reader/crosspoint-reader/pull/1377 * feat: added Romanian strings by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/987 * feat: add Catalan strings by @angeldenom in https://github.com/crosspoint-reader/crosspoint-reader/pull/1049 * feat: Make directories stand out more in local file browser: "[dir]" instead of "dir" by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1339 * feat: Add Polish strings for commits #1219,#1169,#1031 +tweaks by @th0m4sek in https://github.com/crosspoint-reader/crosspoint-reader/pull/1227 * feat: Polish translation tweaks by @th0m4sek in https://github.com/crosspoint-reader/crosspoint-reader/pull/1193 ### Fixes * fix: Fix img layout issue / support CSS display:none for elements and images by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1443 * fix: Overlapping battery percentage on image pages with anti-aliasing by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1452 * fix: Fix prewarm perf when a page contains many styles by @adriancaruana in https://github.com/crosspoint-reader/crosspoint-reader/pull/1451 * fix: use sleep routine from the original firmware by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1298 * fix: Prevent line breaks on common English contractions by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1405 * fix: Build with -fno-exceptions by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1412 * fix: Reduce flash usage by cleaning up I18n translations by @steka in https://github.com/crosspoint-reader/crosspoint-reader/pull/1401 * fix: jpeg resource cleanup by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1320 * fix: back button in settings returns to tab bar first by @Cache8063 in https://github.com/crosspoint-reader/crosspoint-reader/pull/1354 * fix: Init lastSleepImage (edge case) by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1360 * fix: Add special handling for apostrophe hyphenation by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1318 * fix: Fix inter-word spacing rounding error in text layout by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1311 * fix: load access fault crash by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1370 * fix: Fix bootloop logging crash by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1357 * fix: dump crash log without usb plugged, bump release log to INFO by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1332 * fix: avoid zip filename overflow by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1321 * fix: Hanging indent (negative text-indent) and em-unit sizing by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1229 * fix: Use fixed-point fractional x-advance and kerning for better text layout by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1168 * fix: use HTTPClient::writeToStream for downloading files from OPDS by @osteotek in https://github.com/crosspoint-reader/crosspoint-reader/pull/1207 * fix: make file system operations thread-safe (HalFile) by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1212 * fix: properly implement requestUpdateAndWait() by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1218 * fix: prevent infinite render loop in Calibre Wireless after file transfer by @pablohc in https://github.com/crosspoint-reader/crosspoint-reader/pull/1070 * fix: WiFi lifecycle and hyphenation heap defragmentation for KOReader sync by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1151 * fix: Fix coverRendered flag by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1154 * fix: Handle non-ASCII characters in sanitizeFilename by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1132 * fix: Update activity was missing "Back" button label by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1128 * fix: force auto-hinting for Bookerly to fix inconsistent stem widths by @adriancaruana in https://github.com/crosspoint-reader/crosspoint-reader/pull/1098 * fix: image centering bleed by @martinbrook in https://github.com/crosspoint-reader/crosspoint-reader/pull/1096 * fix: double free WebDAVHandler by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1093 * fix: Consider extra quotation styles when hyphenating quoted words by @cbix in https://github.com/crosspoint-reader/crosspoint-reader/pull/1077 * fix: acquire power lock before sleeping by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1125 * fix: Unify inconsistent Wi-Fi/WiFi in Czech translation by @pepastach in https://github.com/crosspoint-reader/crosspoint-reader/pull/1138 * fix: sdfat warning about redefinition of macro by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1135 * fix: Close leaked file descriptors in SleepActivity and web server by @brbla in https://github.com/crosspoint-reader/crosspoint-reader/pull/869 * fix: Enable DESTRUCTOR_CLOSES_FILE flag by @daveallie in https://github.com/crosspoint-reader/crosspoint-reader/pull/1075 * fix: Change "UI Font Size" to "Reader Font Size" by @divinitycove in https://github.com/crosspoint-reader/crosspoint-reader/pull/1171 * fix: Hide unusable button hints when viewing empty directory by @Levrk in https://github.com/crosspoint-reader/crosspoint-reader/pull/1253 * fix: broken translations in status bar settings by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1188 * fix: clarity issue with ambiguous string `SET` by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1169 * fix: Crash (Load access fault) when indexing chapters containing characters unsupported by bold/italic font variants by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/997 * fix: Increase PNGdec buffer size to support wide images by @osteotek in https://github.com/crosspoint-reader/crosspoint-reader/pull/995 * fix: Use HalPowerManager for battery percentage by @vjapolitzer in https://github.com/crosspoint-reader/crosspoint-reader/pull/1005 * fix: Fix dangling pointer by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1010 * fix: re-implementing Cover Outlines for the new Lyra Themes by @Levrk in https://github.com/crosspoint-reader/crosspoint-reader/pull/1017 * fix: use double FAST_REFRESH to prevent washout on large grey images by @martinbrook in https://github.com/crosspoint-reader/crosspoint-reader/pull/957 * fix: Fixed Image Sizing When No Width is Set by @DestinySpeaker in https://github.com/crosspoint-reader/crosspoint-reader/pull/1002 * fix: Strip unused CSS rules by @daveallie in https://github.com/crosspoint-reader/crosspoint-reader/pull/1014 * fix: continue reading card classic theme by @pablohc in https://github.com/crosspoint-reader/crosspoint-reader/pull/990 * fix: Destroy CSS Cache file when invalid by @daveallie in https://github.com/crosspoint-reader/crosspoint-reader/pull/1018 * fix: Shorten "Forget Wifi" button labels to fit on button by @lukestein in https://github.com/crosspoint-reader/crosspoint-reader/pull/1045 * fix: improve Spanish translations by @pablohc in https://github.com/crosspoint-reader/crosspoint-reader/pull/1054 * fix: Fixed book title in home screen by @DestinySpeaker in https://github.com/crosspoint-reader/crosspoint-reader/pull/1013 * fix: Fix hyphenation and rendering of decomposed characters by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1037 * fix: Improve and add Spanish translations by @DaniPhii in https://github.com/crosspoint-reader/crosspoint-reader/pull/1338 * fix: improve and add Spanish translations by @DaniPhii in https://github.com/crosspoint-reader/crosspoint-reader/pull/1254 * fix: improve and add Swedish translations by @steka in https://github.com/crosspoint-reader/crosspoint-reader/pull/1317 * fix: Extend missing / amend existing German translations by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1226 * fix: update french.yaml file to have a better French translation of the CFW by @Spigaw in https://github.com/crosspoint-reader/crosspoint-reader/pull/1130 * fix: added romanian translation to new strings by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1105 * fix: add missing romanian strings by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1187 * fix: add new Ukrainian translation line for STR_SCREENSHOT_BUTTON by @mirus-ua in https://github.com/crosspoint-reader/crosspoint-reader/pull/1149 * fix: Dutch translation prefix correction by @basvdploeg in https://github.com/crosspoint-reader/crosspoint-reader/pull/1223 * fix: Small typo in i18n.md regarding C++ identifiers by @victordomingos in https://github.com/crosspoint-reader/crosspoint-reader/pull/1210 * fix: typo in USER_GUIDE.md by @arnaugamez in https://github.com/crosspoint-reader/crosspoint-reader/pull/1036 * fix: add missing keyboard metrics to Lyra3CoversTheme by @dexif in https://github.com/crosspoint-reader/crosspoint-reader/pull/1101 ### Internal * perf: font-compression improvements by @adriancaruana in https://github.com/crosspoint-reader/crosspoint-reader/pull/1056 * perf: Improve font drawing performance by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/978 * perf: Replace std::list with std::vector in text layout by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1038 * perf: Optimize HTML entities lookup to O(log(n)) by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1194 * perf: UITheme::getMetrics const and const-ref usage by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1094 * perf: Avoid creating strings for file extension checks by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1303 * perf: Eliminate per-pixel overheads in image rendering by @martinbrook in https://github.com/crosspoint-reader/crosspoint-reader/pull/1293 * perf: Update github actions for optimal performance with pioarduino by @Jason2866 in https://github.com/crosspoint-reader/crosspoint-reader/pull/1080 * style: Phase 1 - Simple light dark themes by @cdmoro in https://github.com/crosspoint-reader/crosspoint-reader/pull/1006 * refactor: implement ActivityManager by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1016 * refactor: Simplify REPLACEMENT_GLYPH fallback by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1119 * refactor: Simplify new setting introduction by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1086 * refactor: Use std binary search algorithms for font lookups by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1202 * refactor: rename MyLibrary to FileBrowser by @osteotek in https://github.com/crosspoint-reader/crosspoint-reader/pull/1260 * refactor: Avoid rebuilding cache path strings by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1300 * refactor: reader utils by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1329 * chore: Remove miniz and modularise inflation logic by @daveallie in https://github.com/crosspoint-reader/crosspoint-reader/pull/1073 * chore: Resolve several build warnings by @daveallie in https://github.com/crosspoint-reader/crosspoint-reader/pull/1076 * chore: Removed generated language headers by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1156 * chore: Added generated lang headers to .gitignore by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1158 * chore: remove redundant xTaskCreate by @ngxson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1264 * chore: Removed unused PlatformIO include directory placeholder by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1417 * chore: micro-optimisation: early exit on fillUncompressedSizes by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1322 * chore: change label while on settings tab actions by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1325 * chore: add firmware size history script by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1235 * chore: Add powershell script for clang-formatting by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/1472 * chore: Removed unused ConfirmationActivity member by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1234 * chore: Update russian.yaml by @madebyKir in https://github.com/crosspoint-reader/crosspoint-reader/pull/1198 * chore: new Ukrainian translation lines by @mirus-ua in https://github.com/crosspoint-reader/crosspoint-reader/pull/1199 * chore: new Ukrainian localization strings by @mirus-ua in https://github.com/crosspoint-reader/crosspoint-reader/pull/1270 * chore: Polish localization for STR_DELETE by @JonaszPotoniec in https://github.com/crosspoint-reader/crosspoint-reader/pull/1323 * chore: Image settings Polish localization by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1299 * chore: add missing Catalan strings by @angeldenom in https://github.com/crosspoint-reader/crosspoint-reader/pull/1302 * chore: add missing translations for Romanian by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1265 * chore: Add Portuguese (Portugal) translator to the list by @victordomingos in https://github.com/crosspoint-reader/crosspoint-reader/pull/1211 * chore: Reduce flash usage by cleaning up I18n translations by @steka in https://github.com/crosspoint-reader/crosspoint-reader/pull/1401 * docs: Add lightweight contributor onboarding documentation by @bilalix in https://github.com/crosspoint-reader/crosspoint-reader/pull/894 * docs: ActivityManager migration guide by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1222 * docs: USER_GUIDE.md update for 1.1.0 by @divinitycove in https://github.com/crosspoint-reader/crosspoint-reader/pull/1108 * docs: add quick KOReader sync setup guide by @wjhrdy in https://github.com/crosspoint-reader/crosspoint-reader/pull/1181 * docs: image support marked as completed by @ariel-lindemann in https://github.com/crosspoint-reader/crosspoint-reader/pull/1008 * feat: aiagent context definition by @jpirnay in https://github.com/crosspoint-reader/crosspoint-reader/pull/922 * chore: Update SKILL.md to reflect generated i18n files are gitignored by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1423 * fix: ActivityManager tweaks by @znelson in https://github.com/crosspoint-reader/crosspoint-reader/pull/1220 * fix: Correct relative file paths in SKILL.md documentation by @pablohc in https://github.com/crosspoint-reader/crosspoint-reader/pull/1304 * fix: add Technically Unsupported section to SCOPE.md by @Uri-Tauber in https://github.com/crosspoint-reader/crosspoint-reader/pull/1295 ## New Contributors * @DestinySpeaker made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1002 * @arnaugamez made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1036 * @angeldenom made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1049 * @cdmoro made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1006 * @bilalix made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/894 * @Jessica765 made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/682 * @brbla made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/869 * @dexif made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1047 * @mirus-ua made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1065 * @cbix made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1077 * @divinitycove made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1108 * @pepastach made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1138 * @Jason2866 made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1080 * @andreaturchet made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1144 * @Spigaw made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1130 * @iandchasse made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1141 * @th0m4sek made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1155 * @plahteenlahti made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1133 * @hajisan made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1146 * @madebyKir made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1198 * @victordomingos made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1210 * @basvdploeg made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1204 * @wjhrdy made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1181 * @DaniPhii made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1254 * @steka made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1317 * @barbarhan made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1192 * @JonaszPotoniec made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1323 * @Cache8063 made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1354 * @fsocietyipa made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1377 * @LSTAR1900 made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/979 * @zgredex made their first contribution in https://github.com/crosspoint-reader/crosspoint-reader/pull/1224 **Full Changelog**: https://github.com/crosspoint-reader/crosspoint-reader/compare/1.1.1...release/1.2.0 --------- Co-authored-by: jpirnay <jens@pirnay.com> Co-authored-by: Dani Poveda <daniphii@outlook.com> Co-authored-by: Baris Albayrak <80099286+barbarhan@users.noreply.github.com> Co-authored-by: BarΔ±Ε Albayrak <barisa@pop-os.lan> Co-authored-by: Stefan Blixten Karlsson <sbkarlsson@gmail.com> Co-authored-by: Γngel <153315454+angeldenom@users.noreply.github.com> Co-authored-by: Jonasz Potoniec <jonasz@potoniec.eu> Co-authored-by: ΠΠ³ΠΎΡ ΠΠ°ΡΡΡΠ½ΠΎΠ² <martynovegorOF@yandex.ru> Co-authored-by: Mirus <mirusim@gmail.com> Co-authored-by: Spigaw <73850535+Spigaw@users.noreply.github.com> Co-authored-by: ariel-lindemann <41641978+ariel-lindemann@users.noreply.github.com> Co-authored-by: Nima Salami <54304457+hajisan@users.noreply.github.com> Co-authored-by: Arthur Tazhitdinov <lisnake@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Bas van der Ploeg <bas@basvanderploeg.nl> Co-authored-by: martin brook <martin.brook100@googlemail.com>1.2.0 |
||
|
|
1d219ae27e |
feat: Add Hungarian language file (hungarian.yaml) (#1545)
Full Hungarian localization for the firmware with all UI elements and system messages translated. ## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) * **What changes are included?** Added hungarian.yaml language file Translated all UI elements and system messages into Hungarian ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). I am a native Hungarian speaker. The initial translation was assisted by AI, but I reviewed and corrected all translation errors to ensure a natural and accurate Hungarian localization. ### 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**_ |
||
|
|
c4f11015f1 |
feat: Add Lithuanian transilation (#1526)
## Summary * Add Lithuanian transilation ### 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? YES --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> |
||
|
|
abd2266048 |
chore: complete Belarusian translation (#1548)
Add 30 missing translation keys to belarusian.yaml for #1483 |
||
|
|
1df543d48d |
perf: Eliminate per-pixel overheads in image rendering (#1293)
## Summary Replace per-pixel getRenderMode() + rotateCoordinates() + bounds checks with a DirectPixelWriter struct that pre-computes orientation and render mode state once per row. Use bitwise ops instead of division/modulo for cache pixel packing. Skip PNG cache allocation when buffer exceeds 48KB (framebuffer size) since PNG decode is fast enough that caching provides minimal benefit, and the large buffer competes with the 44KB PNG decoder for heap. ## Additional Context Measured improvements on ESP32-C3 @ 160MHz: - JPEG decode: 5-7% faster (1:1 scale) - PNG decode: 15-20% faster (1:1 scale) - Cache renders: 3-6% faster across both formats - Eliminates "Failed to allocate cache buffer" errors for large PNGs --- ### 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 >**_ |
||
|
|
63961625a2 |
chore: update Dutch translations (#1503)
## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) Added new Dutch translations * **What changes are included?** New Dutch translations ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). --- ### 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**_ |
||
|
|
34484300e4 | chore: update RO translation for release v1.2.0 (#1504) | ||
|
|
831144e737 |
chore: Add missing French translations for UI controls and settings (#1493)
Added missing strings for the French translation. ## Summary Adding the missing French translated strings before the next PR. No modification done to the preexisting strings, only added new ones. ## Additional Context N/A --- ### 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. No AI usage. |
||
|
|
42c33528f9 |
feat: Add Ukrainian translations for image-related strings (#1491)
## Summary Prep for RC 1.2.0 https://github.com/crosspoint-reader/crosspoint-reader/pull/1483 |
||
|
|
6969950cd7 |
feat: update Russian translation (#1489)
## Summary
Adds new Russian strings for recently merged features, yay! π
---
### AI Usage
Did you use AI tools to help write this code? _**NO**_
|
||
|
|
bc6f6daeb5 |
chore: Update German translation strings (#1495)
## Summary * **What is the goal of this PR?** Updating German language file * **What changes are included?** ## Additional Context - None --- ### 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 >**_ |
||
|
|
8352e1f08f |
chore: Polish localization for STR_SHOW_HIDDEN_FILES (#1490)
## Summary Polish localization for `STR_SHOW_HIDDEN_FILES` --- ### 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**_ |
||
|
|
dfc38cca4c |
chore: Catalan localization for STR_SHOW_HIDDEN_FILES (#1494)
## Summary * **What is the goal of this PR?** (e.g., Implements the new feature for file uploading.) Adds the missing Catalan translation for STR_SHOW_HIDDEN_FILES in lib/I18n/translations/catalan.yaml. * **What changes are included?** Only modified catalan.yaml file ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). --- ### 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 |
||
|
|
3856348ee6 |
fix: swedish translation (#1476)
## Summary * **What is the goal of this PR?** fix swedish translation * **What changes are included?** lib\I18n\translations\swedish.yaml ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). --- ### 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**_ |
||
|
|
0e228324e6 |
chore: Turkish localization for STR_SHOW_HIDDEN_FILES (#1487)
Adds the missing Turkish translation for STR_SHOW_HIDDEN_FILES in lib/I18n/translations/turkish.yaml. - Added: STR_SHOW_HIDDEN_FILES: "Gizli DosyalarΔ± GΓΆster" - Scope: Turkish only (single-key micro-fix) This follows up the missing-translations callout in #1483. Co-authored-by: BarΔ±Ε Albayrak <barisa@pop-os.lan> |
||
|
|
8e091609f7 |
chore: Spanish localization for STR_SHOW_HIDDEN_FILES (#1486)
## Summary * Adding Spanish translation for string `STR_SHOW_HIDDEN_FILES` --- ### 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**_ |
||
|
|
710055f02c |
feat: Make directories stand out more in local file browser: "[dir]" instead of "dir" (#1339)
## Summary * **What is the goal of this PR?** It's difficult to distinguish directory names from normal file entries, so they are displayed now as "[dir]" instead of "dir" for classic theme * **What changes are included?** ## Additional Context * Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks, specific areas to focus on). --- ### 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**_ |
||
|
|
0245972132 |
chore: Add powershell script for clang-formatting (#1472)
## Summary
* **What is the goal of this PR?** Add a windows equivalent for the
linux clang-format-fix script
* **What changes are included?**
## Additional Context
```
.SYNOPSIS
Runs clang-format -i on project *.cpp and *.h files.
.DESCRIPTION
Formats all C/C++ source and header files in the repository, excluding
generated, vendored, and build directories (open-x4-sdk, builtinFonts,
hyphenation tries, uzlib, .pio, *.generated.h).
The clang-format binary path is resolved once and cached in
.local/clang-format-fix.local. On first run it checks a default path,
then PATH, then common install locations. Edit the .local file to
override manually.
.PARAMETER g
Format only git-modified files (git diff --name-only HEAD) instead of
the full tree.
.PARAMETER h
Show this help text.
```
---
### 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? _**< YES >**_
|
||
|
|
0cbfaa007d |
fix: Overlapping battery percentage on image pages with anti-aliasing (#1452)
## Summary **What is the goal of this PR?** When viewing a page with images and anti-aliasing enabled, the `imagePageWithAA` path renders the page twice with fast refreshes (blank image area, then restore). Both passes called `renderStatusBar()`, which reads the battery percentage live. If the value changed between the two renders (e.g. 88% -> 87%), the digits would overlap on screen. Fix: Removed the redundant `renderStatusBar()` from the second BW render. The status bar is already drawn and displayed in the first pass, and only the image area needs restoration. --- ### 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**_ |
||
|
|
ceb6acc8d7 |
fix: Fix img layout issue / support CSS display:none for elements and images (#1443)
## Summary - Add CSS `display: none` support to the EPUB rendering pipeline (fixes #1431) - Parse `display` property in stylesheets and inline styles, with full cascade resolution (element, class, element.class, inline) - Skip hidden elements and all their descendants in `ChapterHtmlSlimParser` - Separate display:none check for `<img>` tags (image code path is independent of the general element handler) - Flush pending text blocks before placing images to fix layout ordering (text preceding an image now correctly renders above it) - Bump CSS cache version to 4 to invalidate stale caches - Add test EPUB (`test_display_none.epub`) covering class selectors, element selectors, combined selectors, inline styles, nested hidden content, hidden images, style priority/override, and realistic use cases |
||
|
|
7d56810ee6 |
feat: integrated epub optimizer (#1224)
## Problem Many e-ink readers have limited image decoder support natively. EPUBs with images in other formats than **baseline JPEG** frequently cause: - **Broken images**: pages render as blank, corrupted noise, or never load - **Slow rendering**: unoptimized images cause severe delays on e-ink hardware, up to 7 seconds per page turn, with cover images taking up to 59 seconds to render - **Broken covers**: the book thumbnail never generates Fixing this today requires external tools before uploading. --- ## What this PR does Adds an **optional, on-demand EPUB optimizer** to the file upload flow. When enabled, it converts all images to baseline JPEG directly in the browser β no server, no internet, no external tools needed. **Conversion is opt-in. The standard upload flow is unchanged.** --- ## Real-world impact The optimizer was applied in batch to **61 EPUBs**: - 60 standard EPUBs: 198 MB β 55 MB (**β72.2%**, 143 MB saved) - Text-dominant books: 8β46% smaller (covers and inline images converted) - Image-heavy / illustrated books: 65β93% smaller - 1 Large manga volume (594 MB): 594 MB β 72 MB (**β87.8%**, 522 MB saved) - EPUB structural integrity fully maintained β zero new validation issues introduced across all 61 books *Size and integrity analysis: [epub-comparator](https://github.com/pablohc/epub-comparator)* From that set, **17 books were selected** as a representative sample covering different content types: image-heavy novels, pure manga, light novels with broken images, and text-dominant books. Each was benchmarked on two devices running in parallel, one on `master` and one on `PR#1224` β measuring render time across ~30 pages per book on average. ### Rendering bugs fixed | Book | Problem (original) | After optimization | |------|--------------------|--------------------| | Fairy Tale β Stephen King | Cover took **59.7 s** to render | 2.1 s (β96%) | | Cycle of the Werewolf β Stephen King | Cover took **23.3 s** to render | 1.7 s (β93%) | | Tomie: Complete Deluxe Ed. β Junji Ito | Cover took **18.3 s** to render | 2.0 s (β89%) | | Joel Dicker β El tigre (Ed. Ilustrada) | Cover took **14.5 s** to render | 1.4 s (β90%) | | Jackson, Holly β Asesinato para principiantes | Cover failed completely (blank) | 2.0 s β | | Sentenced to Be a Hero β Yen Press | Cover failed, **8 images failed to load** | All fixed β | | Flynn, Gillian β Perdida | Cover failed completely (blank) | 1.6 s β | | Chandler, Raymond β Asesino en la lluvia | Cover failed completely (blank) | 2.0 s β | ### Page render times β image-heavy EPUBs (avg per page) | Book | Pages | Avg original | Avg optimized | Improvement | File size | |------|-------|-------------|---------------|-------------|-----------| | Fairy Tale β Stephen King | 30 | 3,028 ms | 1,066 ms | **β64.8%** | 32.4 MB β 9.1 MB (β72%) | | Cycle of the Werewolf β Stephen King | 33 | 3,026 ms | 1,558 ms | **β48.5%** | 35.1 MB β 2.9 MB (β92%) | | Joel Dicker β El tigre (Ed. Ilustrada) | 16 | 1,846 ms | 1,051 ms | **β43.1%** | 5.3 MB β 0.4 MB (β93%) | | Tomie: Complete Deluxe Ed. β Junji Ito | 30 | 4,817 ms | 2,802 ms | **β41.8%** | 593.8 MB β 72.2 MB (β87.8%) | | Sentenced to Be a Hero β Yen Press | 30 | 1,719 ms | 1,388 ms | **β19.2%** | 15.2 MB β 1.6 MB (β90%) | ### Text-heavy EPUBs β no regression | Book | Pages | Avg original | Avg optimized | Delta | |------|-------|-------------|---------------|-------| | Christie β Asesinato en el Orient Express | 30 | 1,672 ms | 1,646 ms | β1.6% | | Flynn β Perdida | 30 | 1,327 ms | 1,291 ms | β2.7% | | Dicker β La verdad sobre el caso Harry Quebert | 30 | 1,132 ms | 1,084 ms | β4.2% | | Hammett β El halcΓ³n maltΓ©s | 30 | 1,009 ms | 966 ms | β4.3% | | Chandler β Asesino en la lluvia | 30 | 989 ms | 1,007 ms | +1.8% | *Differences within Β±5% β consistent with device measurement noise.* *Render time benchmark: [epub-optimization-benchmark](https://github.com/pablohc/epub-optimization-benchmark)* --- ## How to use it **Single file:** 1. Click **Upload** (top of the page) β a modal opens. Use **Choose files** to select one EPUB from your device. 2. Check **Optimize**. - *(Optional)* Expand **Advanced Mode** β adjust quality, rotation, or overlap; set individual images to H-Split / V-Split / Rotate. 3. Click **Optimize & Upload**. **Batch (2+ files):** 1. Click **Upload** (top of the page) β a modal opens. Use **Choose files** to select multiple EPUBs from your device. 2. Check **Optimize**. - *(Optional)* Expand **Advanced Mode** β adjust quality. 3. Click **Upload** β all files are converted and uploaded sequentially. Upload a batch of files, without optimization: <img width="810" height="671" alt="image" src="https://github.com/user-attachments/assets/d892ae13-0b87-4ea4-b6b8-340d56efc763" /> Batch file upload, with standard optimization: <img width="809" height="707" alt="image" src="https://github.com/user-attachments/assets/d32dbc88-1208-4555-bfcf-330ab91d2174" /> Optimization Phase (1/2): <img width="807" height="1055" alt="image" src="https://github.com/user-attachments/assets/fd4cd5f9-e56e-4ca1-9777-6926b9baf2bb" /> Upload Phase (2/2): <img width="805" height="1065" alt="image" src="https://github.com/user-attachments/assets/483294f0-02f0-4569-ae11-c10b3581d747" /> Batch upload successfully confirmed: <img width="812" height="1043" alt="image" src="https://github.com/user-attachments/assets/80c135bf-05c3-4c80-8755-2a04c68235bc" /> --- ## Options **Always active when the converter is enabled:** - Converts PNG, WebP, BMP, GIF β baseline JPEG - Smart downscaling to 480Γ800 px max (preserves aspect ratio) - True grayscale for e-ink (BT.709 luminance, always on) - SVG cover fix + OPF/NCX compliance repairs **Advanced Mode (opt-in) β single file:** - JPEG quality presets: 30% / 45% / 60% / 75% / **85%** (default) / 95% - Rotation direction for split images: CW (default) / CCW - Min overlap when splitting: 5% (default) / 10% / 15% - Auto-download conversion log toggle (detailed stats per image) - Per-image picker: set Normal / H-Split / V-Split / Rotate per image individually, with "Apply to all" for bulk assignment **Advanced Mode (opt-in) β batch (2+ files):** - JPEG quality presets: 30% / 45% / 60% / 75% / **85%** (default) / 95% - Auto-download conversion log toggle (aggregated stats for all files) --- ## β οΈ Known limitations **KoReader hash-based sync will break** for converted files. The file content changes, so the hash no longer matches the original. Filename-based sync is unaffected. If you rely on KoReader hash sync, use the Calibre plugin or the web tool instead. --- ## Build size impact | Metric | master ( |
||
|
|
526c8a5e7a |
fix: use sleep routine from the original firmware (#1298)
## Summary Fixes #1263 I spent half of my day(-off) reverse engineering the stock english firmware V3.1.1, it's more or less like solving a sudoku with some known pieces (like debug strings, known static addresses, known compiled function, etc) and then the task is to guess the rest. Long story short, this is the sleep routine that they use: <img width="674" height="604" alt="image" src="https://github.com/user-attachments/assets/6d53ce44-7bae-40c7-b4fb-24f898dbcc05" /> From the code above: - They pull down GPIO13 (value = 0xd) before sleep - They verify that power button is released by doing a delay loop of 50ms, similar to what we're doing - `esp_sleep_config_gpio_isolate` is called but I'm not 100% sure why - Pull up power button, note that it's likely redundant because power button should already pulled up by `InputManager` - `param1` and `param2` means enabling front/side buttons for wake up, but it doesn't used in the code in reality. But I think it's physically impossible, see the explanation below - `param3` means "wake up from power button" - `esp_sleep_start` is used; there is a logic to handle if it fails to sleep, then retry recursively (no idea why!) My observation is that they use GPIO13 so that it will be on HIGH state when the chip is powered on, without any user space code to keep it on that state. And once going to deep sleep, it goes into FLOATING by default. That may explain why it need to be in LOW state before going to sleep. (Nice trick btw) Looking again at the circuit diagram provided [here](https://github.com/sunwoods/Xteink-X4/blob/main/readme-img/sch.jpg) (note: it's not official): <img width="705" height="384" alt="image" src="https://github.com/user-attachments/assets/b98d59fd-47ca-4d3d-a24a-94bf999e957b" /> It kinda make sense as the GPIO13 and VBUS (USB VCC) have the same role, they are part of a simple "battery protection" cirtuit Now, we may wonder, how the device wake up when there is no battery at all? <img width="440" height="323" alt="image" src="https://github.com/user-attachments/assets/2981c411-239b-49a7-b9f7-9a75b6c1b6d3" /> It seems like power button is not just a simple switch between GPIO3 and ground, but it also linked the POWER_CTRL, which leads to nowhere on the diagram, but I suppose it connects the battery back for a short amount of time, just enough for the MCU to wake up, and GPIO13 goes HIGH again. It may also explain why power button becomes non-responsive for ~1 second after power on, as it's being pulled up by the current from battery (remind: high = not pressed, low = pressed) To test the theory above, I simply **comment out** the `esp_deep_sleep_enable_gpio_wakeup`: - On battery, power button works as nothing happen - On USB, it doesn't wake up, I need to press RST --- Important things about my analysis: 1. I had to name every function on the code above **manually**, but I'm 99% confident about it. The only function that I'm not sure is `esp_wifi_bt_power_domain_off` ; Edit: it was indeed mislabeled, see https://github.com/crosspoint-reader/crosspoint-reader/pull/1298#discussion_r2879670852 2. Some logic inside the stock firmware looks very strange, there is almost no mention to "arduino" in the hardware, suggesting that they may just call esp-idf functions directly, bypassing the arduino abstraction. --- ### 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: Zach Nelson <zach@zdnelson.com> |