apps.json: one protreck row, ver=1.2, requires=sdk_ext (no seed: false)
protreck.lua:
- get_heading(): compute from raw compass x/y via atan(c.y,-c.x); remove
c.hdg (no such field) and GPS course fallback (M9-only)
- tap detection: record press={x,y} on "down", act on "up" only when
distance <= 12 px — swipes no longer trigger waypoint/chrono/timer/alarm
- alarm clock: use sys.datetime() (local time) instead of now_unix()+decompose()
- wada.timer.after: schedule_alarm() fires alarms while screen sleeps, rescheduled daily
- key events: left/right = tab nav, up/down mirror swipe actions
- canvas capped at 480×480 (Tanmatsu compatibility)
harness.lua:
- timer.after mock added
- protreck_tdeck fixture: h=240→196 (T-Deck actual resolution)
- protreck_chrono / protreck_timer / protreck_compass: send down+up tap pairs
- protreck_compass: compass mock returns raw {x,y,z} (not {hdg})
- protreck_deniv: alt_seq reordered so step 9 (first on_tick sample) is the
max value, matching the GPS call order through draw_status_bar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New version in deploy/apps/protreck/1.2/ (1.0 directory untouched).
- 5 tabs: ASTRO · CMPAS · CHRONO · TIMER · ALTI (was 4)
- Permanent status bar: local time (UTC offset from GPS longitude),
GPS sats, battery % — shown on all tabs
- ASTRO: 3 alarms A1/A2/A3; short tap = cycle slot, long press ≥500ms
= toggle on/off; swipe up/down ±15 min on selected alarm;
civil twilight via generalised sun_utc_dep() formula
- CMPAS (new tab): compass rose with cv:line rotating marks;
sys.compass() or GPS course fallback; tap = save/clear waypoint;
bearing + distance shown on rose
- ALTI: cumulative déniv+/− (0.5m noise threshold), climb rate m/h;
GPS sampling active on all tabs
- Harness: 10 scenarios ALL OK, worst tick ~13k / budget 100k
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sun/Moon rise+set from GPS lat/lon + date (Spencer 1971), moon phase 0-29.
Chronometer with lap times, countdown timer with alarm beep and preset
cycling, altimeter with GPS alt_m, min/max persistence and trend graph.
Swipe left/right to switch tabs. 4 tabs fit any screen size.
test(harness): add 7 ProTreck scenarios (tdeck, v4, no_gps, chrono,
timer, alti, cost). ALL OK 7/7.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>