Introduces watch/, a real Pebble watchapp (built via pebble build) that
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.
This commit is contained in:
ml
2026-07-14 17:10:22 +02:00
parent d9b6e2889b
commit 1a654da3e9
44 changed files with 1920 additions and 182 deletions
+19
View File
@@ -0,0 +1,19 @@
#ifndef WATCH_READING_STATE_H
#define WATCH_READING_STATE_H
#include "../../../engine/src/reading.h"
#include "../../../interpreter/src/significance.h"
/* Recomputes today's reading (astro + tarot + interpretation) from
* `birth`, using the watch's current clock: today's UTC date as the
* tarot seed (same convention as dist/run-engine.sh - see CLAUDE.md's
* "Build & run") and the current moment for the transit snapshot. Safe
* to call again later (e.g. the day rolled over while the app stayed
* open) - overwrites the previous result in place. */
void reading_state_recompute(const BirthData *birth);
/* Valid only after at least one reading_state_recompute() call. */
const DailyReading *reading_state_get_reading(void);
const DailyInterpretation *reading_state_get_interpretation(void);
#endif