| title | Simulator |
|---|---|
| nav_order | 15 |
YACP uses the CrossPoint simulator for repeatable UI checks and screenshots. It compiles the firmware as a native host program and renders the e-ink framebuffer in SDL2.
The simulator does not reproduce power consumption, ESP32 timing, SD-card single-reader limits, or physical e-ink waveforms. Those checks still require hardware.
The current YACP configuration is used on Linux or WSL. Native Windows is not configured.
For Ubuntu or WSL:
sudo apt install libsdl2-dev libssl-devInstall PlatformIO Core, then build one of the host environments:
pio run -e simulator
pio run -e simulator_x3simulator_x3 enables the X3 panel size and RTC behavior used by Reading Rhythm.
The simulator maps ./fs_ to the device SD-card root. For example:
./fs_/books/
./fs_/.crosspoint/
The directory is ignored by Git.
Generate deterministic data without using personal reading history:
python3 scripts/generate_reading_stats_demo.py --forceThe generator writes only:
fs_/.crosspoint/global_stats.bin
fs_/.crosspoint/daily_reading.bin
fs_/.crosspoint/finished_books.bin
It refuses to replace those files unless --force is present.
To open the deterministic completion achievement directly:
CROSSINK_SIMULATOR_STATS_DEMO=achievement pio run -e simulator_x3 -t run_simulatorThe same demo opens Books Finished directly for a deterministic automated capture with year-bearing start and finish dates that does not depend on the simulator's saved button mapping:
CROSSINK_SIMULATOR_STATS_DEMO=finished-books \
CROSSPOINT_SIM_INPUT_SCRIPT='5000:QUIT' \
CROSSPOINT_SIM_SCREENSHOTS='1200:./qa-artifacts/finished-books-en.bmp' \
.pio/build/simulator_x3/programThe demo uses French for interactive review. Automated captures still use English
when CROSSPOINT_SIM_SCREENSHOTS is present, as required below.
The autonomy screen has deterministic in-memory demo data. It does not create or
replace state.json:
CROSSINK_SIM_POWER_DEMO=1 pio run -e simulator_x3 -t run_simulatorOpen Autonomy from the Home menu. The demo shows a 10-day battery cycle, 29 hours and 47 minutes of active use, 35 percent remaining, and the coarse samples that the production firmware would retain at sleep transitions.
pio run -e simulator_x3 -t run_simulatorKeyboard controls:
| Key | Action |
|---|---|
| Up / Down | Side buttons |
| Left / Right | Front buttons |
| Return | Confirm |
| Escape | Back |
| P | Power |
| S | Simulated sleep |
The simulator accepts timed inputs and BMP capture paths:
mkdir -p qa-artifacts
CROSSPOINT_SIM_INPUT_SCRIPT='2500:DOWN;3000:DOWN;3500:ENTER;4700:RIGHT;6500:QUIT' \
CROSSPOINT_SIM_SCREENSHOTS='5600:./qa-artifacts/reading-rhythm.bmp' \
.pio/build/simulator_x3/programWhen CROSSPOINT_SIM_SCREENSHOTS or
CROSSPOINT_SIM_SCREENSHOTS_AFTER_WAKE is set, YACP renders the UI in English
regardless of the language saved in fs_. This keeps all automated screenshots
intended for GitHub consistent without changing the saved simulator preference.
All screenshots published on GitHub, including manually triggered captures, must
show the English UI.
For example, this command captures the completion achievement after generating the Reading Stats demo data:
CROSSINK_SIMULATOR_STATS_DEMO=achievement \
CROSSPOINT_SIM_INPUT_SCRIPT='3000:QUIT' \
CROSSPOINT_SIM_SCREENSHOTS='1800:./qa-artifacts/reading-achievement-en.bmp' \
.pio/build/simulator_x3/programThe committed Reading Rhythm image was produced from this path and converted to PNG. The original PNG and GIF captures remain 1-bit representations of the e-ink framebuffer. Resize-friendly copies for GitHub and other media are generated with flat grayscale fills instead of ordered-dither dots:
python scripts/build_media_previews.pyThis post-processing affects only docs/images/yacp/media/; it does not change
the firmware renderer or the source captures.
First open of an EPUB builds data under fs_/.crosspoint/. Clear only the relevant simulator cache when validating parser, layout, image, or cache-format changes.