Commit Graph
1067 Commits
Author SHA1 Message Date
jpirnay db7d5af56b Add test cases 2026-04-06 11:55:25 +02:00
jpirnay ef0d044f9e Only deal with horizontal stacking 2026-04-06 11:49:36 +02:00
jpirnay f78ecd37c9 Adapt upstream PR1582 by daveallie 2026-04-06 11:17:32 +02:00
jpirnay ed8c23ee72 Merge pull request #24 from jpirnay/feat-overlay-everywhere
feat: Make information overlay applicable for custom bitmaps too
2026-04-06 10:56:49 +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 346c7ba808 Merge pull request #23 from jpirnay/feat-bmpviewer
feat: Amend back button handling, add "use as sleep screen" feature
2026-04-06 10:41:15 +02:00
jpirnay b1462b37b7 Make information overlay applicable for custom bitmaps too 2026-04-06 10:40:04 +02:00
jpirnay 4ff9a10de1 Amend back button handling, add "use as sleep screen" feature 2026-04-06 10:34:48 +02:00
jpirnay ecac7ebdc7 Merge pull request #22 from jpirnay/fix-powerdebounce
fix: Second attempt at proper power key debouncing
2026-04-06 10:15:26 +02:00
jpirnay 4f00ed6348 Fast wakeup (not waiting for button release) 2026-04-06 10:07:50 +02:00
jpirnay 633cc04f41 Additional checks 2026-04-06 09:56:27 +02:00
jpirnay 213ebfc016 Second attempt at proper debouncing 2026-04-06 09:48:11 +02:00
jpirnay 6260f40164 Merge pull request #21 from jpirnay/fix-lyra-homescreen
fix: Fix overflowing homescreen
2026-04-05 22:56:47 +02:00
jpirnay efae9c058d Use same file name as KOReader for OPDS downloads (by spfenwick, PR1286) 2026-04-05 22:55:56 +02:00
jpirnay 07f0e49a7d Fix size mismatch preventing thumbnail display 2026-04-05 22:50:22 +02:00
jpirnay 077d134ac8 Adjust menu design to still fit on screen 2026-04-05 22:44:05 +02:00
jpirnay 07b36351aa Some more language fixes 2026-04-05 22:19:43 +02:00
jpirnay 0d47df47d7 Update Slavic languages 2026-04-05 22:12:59 +02:00
jpirnay da771eb9a9 Update Brazilian Portuguese 2026-04-05 22:04:04 +02:00
jpirnay 875c52f55f Update Spanish 2026-04-05 22:02:38 +02:00
jpirnay 3a01fab7e7 Update French 2026-04-05 22:00:25 +02:00
jpirnay 4e8f7af743 Fix German. 2026-04-05 21:57:18 +02:00
jpirnay 8f24e0ac4f Change some strings 2026-04-05 21:47:39 +02:00
jpirnay 650b3ed9ae Merge pull request #20 from jpirnay/feat-reader-back
feat: Short press will go back to origin / long press will go back to home
2026-04-05 21:42:00 +02:00
jpirnay f75bbf5b1e Short press will go back to origin / long press will go back to home 2026-04-05 21:37:28 +02:00
jpirnay c86a5fee4c Deal with bouncing power key at startup 2026-04-05 21:06:58 +02:00
jpirnay c72bd56560 Merge pull request #19 from jpirnay/feat-hyphen-page-break
feat: No hyphenation across page breaks
2026-04-05 11:29:58 +02:00
jpirnay 2d6d14af1f Making screenshot command device dimensions aware 2026-04-05 11:29:23 +02:00
Justin Mitchell 17ed71f23d Use runtime display dimensions instead of constants
Replace hardcoded DISPLAY_WIDTH, DISPLAY_HEIGHT, and DISPLAY_WIDTH_BYTES constants with runtime values from display object to support multiple device models (X3 and X4) with different screen dimensions.
2026-04-05 11:22:00 +02:00
jpirnay 65474d4066 Fix alignment issues 2026-04-05 11:18:19 +02:00
jpirnay 01503f9c84 Fix reflow logic 2026-04-05 11:01:40 +02:00
jpirnay 1509af8729 Avoid hypehnation at page breaks 2026-04-05 10:47:05 +02:00
jpirnay 1398454ad8 Merge PR #1310 into master 2026-04-04 18:35:11 +02:00
jpirnay 3151ebda56 Remove dead benchmark code 2026-04-04 18:23:32 +02:00
jpirnay b32804410c Merge pull request #16 from jpirnay/integrate-upstream
chore: Integrate upstream
2026-04-04 18:10:57 +02:00
jpirnay 45d1fba0db Merge branch 'master' into integrate-upstream 2026-04-04 17:55:49 +02:00
jpirnay a23ac5240b Merge pull request #15 from jpirnay/refactor-qr-code
refactor: Change qr library to properly support utf8 characters
2026-04-04 17:37:54 +02:00
jpirnay b9d4b54c5d Include .c files too 2026-04-04 17:36:47 +02:00
jpirnay e2eb41a345 clang format 2026-04-04 17:32:48 +02:00
Justin Mitchell 44b8839fc8 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.
2026-04-04 10:25:43 -05:00
jpirnay 5ce022b5fc clang format 2026-04-04 16:52:26 +02:00
jpirnay 3c960a4c3e Change qr library to properly support utf8 characters 2026-04-04 16:42:28 +02:00
jpirnay 9baded03ed Reduce parallel connections for stability 2026-04-04 16:11:08 +02:00
jpirnay 29b244b027 Merge pull request #14 from jpirnay/fix-koreader-xpath-index
fix: Koreader Sync: Fix XPath index comparison
2026-04-04 16:07:37 +02:00
jpirnay b9cf57f7f4 Koreader Sync: Fix XPath index comparison 2026-04-04 15:54:55 +02:00
jpirnay 7e2291915f Merge branch 'x3-support'
# Conflicts:
#	lib/GfxRenderer/GfxRenderer.h
#	open-x4-sdk
2026-04-04 10:05:14 +02:00
jpirnay 03ce63f402 Change reference to sdk 2026-04-04 10:00:23 +02:00
jpirnay bfa2c79066 Merge pull request #13 from jpirnay/fix-cppcheck
chore: Address cppcheck complaints
2026-04-04 09:48:26 +02:00
jpirnay 8c52ca24cb yaclf 2026-04-04 09:46:20 +02:00