Replace the watch app's menu UI with a single scrollable report page, add the config page
build / build (push) Successful in 18s
build / build (push) Successful in 18s
Report screen (ui_report_window.c, new): replaces the MenuLayer +
per-item drill-down windows (ui_menu_window.c/h, ui_card_window.c/h,
removed) with one continuously scrollable page mirroring the
interpreter's own text/HTML report - day significance, each transit's
narrative, the full Celtic Cross spread, and guidance last. Bigger/
bolder fonts throughout. Card images are a fixed 72px wide: a full-
display-width version was tried first but reliably crashes the real
PNG decoder ("PNG memory allocation failed") on actual hardware,
independent of the app's own heap or lazy-loading - 72px is the
hardware-verified ceiling.
Config page (pkjs/index.js): a self-contained `data:` URI settings form
for birth data/language/notification, submitting via AppMessage to the
existing app_message.c receiver. package.json needed
"capabilities": ["configurable"] for the Pebble mobile app to expose a
Settings entry for the sideloaded app at all - app_message.c's own
receiving logic was already correct. Added config_log() (config.c) to
confirm on-device, via APP_LOG, exactly which values a shown reading is
based on - both right after a config submission and at every app
launch.
This commit is contained in:
@@ -3,21 +3,20 @@
|
||||
|
||||
The 22 Major Arcana JPEGs in res/img/ are ~1MB/~1086x1810px each -
|
||||
suitable for the desktop HTML reading (an <img> tag pointed at the file
|
||||
as-is) but far too large for a Pebble app's own resource budget (256KB
|
||||
total on basalt-class platforms, shared with every other resource this
|
||||
app ships). This script resizes each to CARD_WIDTH px wide (preserving
|
||||
aspect ratio) and writes a PNG per card, named after tarot_data.c's own
|
||||
k_card_slug table so watch/package.json's "resources.media" entries
|
||||
(IMG_CARD_<SLUG UPPERCASE>, file img/<slug>.png) line up without a
|
||||
separate mapping table anywhere.
|
||||
as-is) but far too large for a Pebble app's own resource budget. This
|
||||
script resizes each to CARD_WIDTH px wide (preserving aspect ratio) and
|
||||
writes a PNG per card, named after tarot_data.c's own k_card_slug table
|
||||
so watch/package.json's "resources.media" entries (IMG_CARD_<SLUG
|
||||
UPPERCASE>, file img/<slug>.png) line up without a separate mapping
|
||||
table anywhere.
|
||||
|
||||
CARD_WIDTH=72 (-> 72x120) was picked empirically: a real `pebble build`
|
||||
of two sample cards at this size measured ~5KB/card on color platforms
|
||||
(basalt/chalk/emery/gabbro) and ~2.9KB/card on the black-and-white
|
||||
diorite/flint - so all 22 cards together cost roughly 111KB/64KB
|
||||
respectively, comfortably inside the 256KB resource budget with room
|
||||
left for other future resources (fonts, icons), while still rendering
|
||||
at close to a full basalt-class screen's height (120px of 168px).
|
||||
CARD_WIDTH=72 (-> 72x120) is a hardware-verified ceiling, not a design
|
||||
choice: full-display-width images (144-260px depending on platform) were
|
||||
tried first and reliably crash real hardware with "PNG memory allocation
|
||||
failed" - a runtime PNG-decoder memory constraint independent of the
|
||||
app's own heap budget (lazy-loading only one image at a time didn't help
|
||||
either). 72px is the size the original per-card screens used
|
||||
successfully all session before that experiment.
|
||||
|
||||
Generated output, like i18n_tables.auto.c - not committed (see
|
||||
.gitignore), regenerate by running this script directly or via the root
|
||||
|
||||
Reference in New Issue
Block a user