Skip to content

Add Trip Computer app - #73

Merged
freethinkel merged 8 commits into
fmctools:mainfrom
zeezooX:add-trip-computer
Dec 1, 2026
Merged

freethinkel merged 8 commits into
fmctools:mainfrom
zeezooX:add-trip-computer

Conversation

@zeezooX

@zeezooX zeezooX commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

A GPS speedometer and trip computer on the watch's own GPS (App Loader of 2026-11-19), canvas UI on cmf-wp2-ui, with a page next to the face and a widget card.

  • Speed screen (speed, GPS status, trip distance, moving time, avg, max), details (altitude, ascent, elapsed) with units km/mi and a confirmed reset. Crown or tap to switch.
  • Integer-only maths: WGS84-scaled equirectangular distance with a cos table, speed over a 5-fix window, rejection of no-fix / <4 sats / >300 km/h jumps, gap restarts after 5 s or PAUSE, stationary drift
    filter, ascent hysteresis.
  • Storage holds totals and the unit only (versioned 28-byte blob), saved every minute while moving and on pause, exit, reset and unit change. The widget is written at start, at most once a minute, and on pause and exit.
  • A synthetic ride for the simulator only (cfg wp2_sim).

zeezooX and others added 8 commits December 1, 2026 01:06
A GPS speedometer and trip computer on the watch's own GPS (App Loader
of 2026-11-19), canvas UI on cmf-wp2-ui, with a page next to the face
and a widget card.

- Speed screen (speed, GPS status, trip distance, moving time, avg,
  max), details (altitude, ascent, elapsed) with units km/mi and a
  confirmed reset. Crown or tap to switch.
- Integer-only maths: WGS84-scaled equirectangular distance with a cos
  table, speed over a 5-fix window, rejection of no-fix / <4 sats /
  >300 km/h jumps, gap restarts after 5 s or PAUSE, stationary drift
  filter, ascent hysteresis.
- Storage holds totals and the unit only (versioned 28-byte blob), saved
  every minute while moving and on pause, exit, reset and unit change.
  The widget is written at start, at most once a minute, and on pause
  and exit.
- A synthetic ride for the simulator only (cfg wp2_sim).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the browser emulator (patched 1.0.0.73-wp2.14, App Loader 2026-11-30)
the stock card wrapped "Moving 0:00 avg 80" and cut it with "...", so the
"Max" line never showed: the card fits about 17 characters per line, and
the tests only checked the 23/39-byte limits. The value is now
"0:42 avg 18\nmax 54 km/h" (at most 14 characters a line), and a test holds
every line of the card to 15. Seen fitting in the emulator afterwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ter font)

cmf-watch-sdk 2018e1a..b1128d6:
- cmf-wp2-ui font: Inter Medium 20 px for canvas apps, baked into the app
  (~10 KiB, any loader, in the simulator), plus text::dots dot-matrix text,
  draw::scroll_bar (the stock lists' round scroll bar), ask and logo
- app files on NAND (file_read/write/delete) and the speaker (audio_*):
  loader of 2026-11-21; the mic (mic_*) and the stock emoji: loader 6
- the loader-7 status bar: the time and GPS bars centred at y = 4 over every
  app
- the Watch 3 Pro loader port (in progress), stub 11 (128 KiB loader budget),
  release tooling

AGENTS.md and the watch-app skill: the new calls and the loaders they need,
canvas apps draw text in cmf_wp2_ui::font, titles stay clear of the status
bar.

All 27 apps build and pass on b1128d6 (host tests, scripts/store build and
check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All text (status lines, captions, values, titles, pill captions) now uses
cmf_wp2_ui::font (Inter 20 px) instead of the 16 px cell font, laid out by
measured width. The speed is drawn in dot-matrix figures (11 px pitch, 8 px
dots) with dots_opaque, so a new speed paints over the old one without a
clear. Behaviour, storage, widget text and the page layout are unchanged.

Tests: no cell-font text on any screen, the status bar zone stays clear,
widest values fit, and partial redraws match full ones in both directions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The point took a full 8-column cell, so "29.9" read as "29 . 9". It is now
two dots on the font's rows 5 and 6 in a 3-column cell, painted opaque like
the figures. The speed is centred in whole columns so the dots stay on one
grid whatever the text, and new figures still replace old ones exactly
(the partial-redraw test). Store shots retaken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeezooX

zeezooX commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

All text is now in Inter and the speed is in dot-matrix figures, like the watch's charging-screen clock.

@freethinkel
freethinkel merged commit bfac977 into fmctools:main Dec 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants