Watchapp skeleton: window stack, view switching, button handling #8

Open
opened 2026-08-31 17:14:36 +02:00 by robert · 0 comments
robert commented 2026-08-31 17:14:36 +02:00 (Migrated from git.butzei.de)

Goal

Set up the app shell that the three views plug into.

Acceptance criteria

  • main.c handles app lifecycle and owns the AppMessage inbox
  • Window stack with three views: ride, navigation, map
  • Up/Down cycle views; Back leaves the app with a confirmation while a ride is running
  • AppMessage opened with app_message_open(app_message_inbox_size_maximum(), app_message_outbox_size_maximum())
  • heap_bytes_free() logged at each view transition
  • Builds and runs on emery, and degrades to a usable layout on basalt (144x168)

Files

  • watchapp/src/c/main.c
  • watchapp/src/c/view_ride.c
  • watchapp/src/c/view_nav.c
  • watchapp/src/c/view_map.c

Notes

Max-size AppMessage buffers cost roughly 16 KB of heap - measure before assuming it fits.

The three-view stack is replaced by a flat page ring — data pages, navigation and map all as pages of
the same carousel. Button handling moved to its own issue; see docs/DESIGN.md section 5.

This issue keeps app lifecycle, the AppMessage inbox, heap_bytes_free() logging at page transitions,
and the basalt degradation check.

## Goal Set up the app shell that the three views plug into. ## Acceptance criteria - [ ] `main.c` handles app lifecycle and owns the AppMessage inbox - [ ] Window stack with three views: ride, navigation, map - [ ] Up/Down cycle views; Back leaves the app with a confirmation while a ride is running - [ ] AppMessage opened with `app_message_open(app_message_inbox_size_maximum(), app_message_outbox_size_maximum())` - [ ] `heap_bytes_free()` logged at each view transition - [ ] Builds and runs on `emery`, and degrades to a usable layout on `basalt` (144x168) ## Files - `watchapp/src/c/main.c` - `watchapp/src/c/view_ride.c` - `watchapp/src/c/view_nav.c` - `watchapp/src/c/view_map.c` ## Notes Max-size AppMessage buffers cost roughly 16 KB of heap - measure before assuming it fits. ## Update — 2026-08-31: view stack becomes a page carousel The three-view stack is replaced by a flat page ring — data pages, navigation and map all as pages of the same carousel. Button handling moved to its own issue; see `docs/DESIGN.md` section 5. This issue keeps app lifecycle, the AppMessage inbox, `heap_bytes_free()` logging at page transitions, and the `basalt` degradation check.
Sign in to join this conversation.
No description provided.