1a654da3e9
build / build (push) Successful in 30s
shows the daily tarot/astrology reading on-device: persistence, reading computation, and UI screens, driven by the existing engine/interpreter code linked in unchanged where possible. Required engine-side changes to make that linking work: - A compact low-precision ephemeris (lowprec_ephemeris.c) replacing the vendored ~127KB Astronomy Engine, which doesn't fit the watch's ~64KB app budget. - Hand-rolled sqrt/atan2/sin/cos replacements for that ephemeris and astro.c's Ascendant calculation - Pebble's statically-linked libm hard-faults on real hardware under this app's -fPIE link for all four. - narrative.c/guidance.c refactored from FILE*/fprintf onto snprintf- based buffers, since Pebble's SDK blocks fprintf at compile time.
60 lines
2.7 KiB
Markdown
60 lines
2.7 KiB
Markdown
# Deck in a Dash - Pebble watch app
|
|
|
|
The actual watchapp: shows the same daily tarot + astrology reading as
|
|
`dist/run-interpreter.sh`, computed entirely on-device (no companion
|
|
app, no server - birth data, language, and notification settings are
|
|
entered via a Pebble config page and persisted on-watch).
|
|
|
|
## Layout
|
|
|
|
```
|
|
watch/
|
|
package.json Pebble app manifest (uuid, targetPlatforms, messageKeys, resources)
|
|
wscript waf build rules - see its own top-of-file comment for
|
|
why this app's C sources are NOT a plain src/c/**/*.c
|
|
glob (most of the actual logic lives in ../engine/src/,
|
|
shared byte-for-byte with the desktop deck-engine/
|
|
interpreter-cli binaries)
|
|
src/c/ Watch-only C: UI, persisted config, on-device reading
|
|
orchestration, daily notification wakeup
|
|
src/pkjs/ pkjs config webview (birth data/language/notification
|
|
settings) - a self-contained `data:` URI form, no
|
|
server
|
|
resources/ Bitmap resources (card art, app icon) - resources/img/
|
|
is generated (gitignored), see below
|
|
scripts/ Build-time codegen: gen_i18n_tables.py (translation
|
|
tables from ../engine/i18n/*.lang) and
|
|
gen_card_images.py (downsized card art from
|
|
../res/img/*.jpeg) - both run automatically by
|
|
wscript on every `pebble build` (see its own comment
|
|
for why that stays cheap on repeat builds)
|
|
```
|
|
|
|
## Building
|
|
|
|
Requires the Pebble SDK/tool (`pebble` CLI) and Pillow (`pip install
|
|
Pillow`, used only by gen_card_images.py) - neither is part of this
|
|
repo's own `make`/`make test` toolchain, which only builds the desktop
|
|
`deck-engine`/`interpreter-cli` binaries. From this directory:
|
|
|
|
```bash
|
|
pebble build # -> build/watch.pbw
|
|
```
|
|
|
|
The root Makefile's `make watchapp` target wraps this and copies the
|
|
resulting `.pbw` into `dist/`, versioned the same way as `make package` -
|
|
see the root CLAUDE.md's "Packaging" section.
|
|
|
|
## Platform support
|
|
|
|
`targetPlatforms` deliberately excludes **aplite** (original Pebble /
|
|
Pebble Steel). A Pebble app's entire code+data+bss footprint shares one
|
|
64KB region on basalt-class platforms, but only 24KB on aplite - and
|
|
even this project's minimal skeleton (blank window + one
|
|
`reading_generate()` call, no UI/config/persistence/notification code
|
|
yet) already uses 19KB of it, leaving only ~5.5KB of headroom. That's
|
|
not enough room for the multi-screen UI, on-watch config persistence,
|
|
and wakeup-based daily notification this app still needs to add -
|
|
basalt and newer (chalk/diorite/emery/flint/gabbro) all have comfortable
|
|
46-112KB of free heap for the same skeleton.
|