Settings: set the time from the touchscreen #8

Merged
audrow merged 6 commits from set-time-in-settings into main 2026-11-15 06:52:28 -06:00
Owner

Preview: 3D viewer running this PR's firmware (private Claude artifact). Click the clock's screen panel or Interact, tap the gear, then swipe left (or tap the dots) for the Time tile.

There was no way to set the clock's time on the clock itself. The settings redesign (#4) dropped the old Time page, so only the USB serial time HH:MM command could do it. Screen size wasn't the cause: no size had it.

What changes

  • Settings has pages. Six tiles a page, so each stays tall enough for its title and setting on the 320×240 CoreS3. Swipe sideways, or tap the page dots at the top right of the header, to turn the page. Menu taps act when the finger lifts, so a swipe that starts on a tile turns the page instead of opening it. Back from a page returns to the menu page that holds it, and the gear always opens page 1.
  • Time is a tile on page 2, showing the current time. It opens a Time page with Hour and Minute steppers (holding a stepper repeats), plus Hours (12- or 24-hour, moved here from Day screen).
  • Hour and minute each wrap on their own. Each step resets the seconds to 0, so the clock is set to the minute.
  • The state JSON gains menu_page.
  • AGENTS.md: what every firmware change needs, and how to build and publish the 3D preview. CLAUDE.md imports it so Claude Code loads it.

Screens: *-settings.png now has page dots, *-settings-2.png is new (page 2, Time), *-day_screen.png lost its Hours row, and *-time.png is new.

Tested locally

  • alarm_face_test: tiles per page are on screen, apart, and hit correctly. The dots sit in the header, big enough to tap, clear of Back and the title.
  • firmware_test at 10 sizes:
    • new menu_pages_scroll: swipe left and right, no wrap at the ends, the dots turn the page and wrap, a swipe from a tile turns the page instead of opening it, a short drag opens nothing, a tap still opens, and Back and the gear land on the right page;
    • time_set_by_touch: the Time tile opens Time, the steppers set and wrap the clock, and 12-hour mode shows on the tile and the Hour row;
    • Time is in the every-page and text-fit sweeps, and text fit checks both menu pages.
  • render_screens regenerated. sim/clock.wasm rebuilt, and smoke_test.js passes at 3 sizes.
  • PlatformIO build for the CoreS3 succeeds.
  • In the built 3D viewer, a real pointer drag across the screen turns to page 2, and tapping Time opens it.
  • Not yet tried on the physical CoreS3.

🤖 Generated with Claude Code

Feedback from the maintainer

  • Keep setting the time in the Settings header (not a seventh tile). Replaced by the two items below.

  • Move the 12/24-hour switch from Day screen to the Time page. Hours is now the Time page's third row; Day screen keeps Brightness and Clock face.

  • Preview this PR on the 3D environment. The viewer built from this PR is published as a private artifact (link under Preview); the side panel now names the Time page.

  • Add the preview process as an agent doc. AGENTS.md covers the per-change checklist (screens, wasm, smoke test), building and publishing the preview, and Forgejo PR access.

  • Take the time out of the top corner of Settings. The header time button is gone; page dots sit there instead.

  • Scroll between pages of settings tiles, so the menu isn't limited by how many cards fit. Six tiles a page; swipe sideways or tap the dots. Time is a tile on page 2.

  • Add a CLAUDE.md that imports AGENTS.md, so Claude Code loads it. CLAUDE.md is @AGENTS.md.

**Preview:** [3D viewer running this PR's firmware](https://claude.ai/artifact/AYauJjoi5EtbmbX1ykgk4d) (private Claude artifact). Click the clock's screen panel or Interact, tap the gear, then swipe left (or tap the dots) for the Time tile. There was no way to set the clock's time on the clock itself. The settings redesign (#4) dropped the old Time page, so only the USB serial `time HH:MM` command could do it. Screen size wasn't the cause: no size had it. **What changes** - **Settings has pages.** Six tiles a page, so each stays tall enough for its title and setting on the 320×240 CoreS3. Swipe sideways, or tap the page dots at the top right of the header, to turn the page. Menu taps act when the finger lifts, so a swipe that starts on a tile turns the page instead of opening it. Back from a page returns to the menu page that holds it, and the gear always opens page 1. - **Time is a tile** on page 2, showing the current time. It opens a **Time** page with **Hour** and **Minute** steppers (holding a stepper repeats), plus **Hours** (12- or 24-hour, moved here from Day screen). - Hour and minute each wrap on their own. Each step resets the seconds to 0, so the clock is set to the minute. - The state JSON gains `menu_page`. - `AGENTS.md`: what every firmware change needs, and how to build and publish the 3D preview. `CLAUDE.md` imports it so Claude Code loads it. **Screens:** `*-settings.png` now has page dots, `*-settings-2.png` is new (page 2, Time), `*-day_screen.png` lost its Hours row, and `*-time.png` is new. **Tested locally** - `alarm_face_test`: tiles per page are on screen, apart, and hit correctly. The dots sit in the header, big enough to tap, clear of Back and the title. - `firmware_test` at 10 sizes: - new `menu_pages_scroll`: swipe left and right, no wrap at the ends, the dots turn the page and wrap, a swipe from a tile turns the page instead of opening it, a short drag opens nothing, a tap still opens, and Back and the gear land on the right page; - `time_set_by_touch`: the Time tile opens Time, the steppers set and wrap the clock, and 12-hour mode shows on the tile and the Hour row; - Time is in the every-page and text-fit sweeps, and text fit checks both menu pages. - `render_screens` regenerated. `sim/clock.wasm` rebuilt, and `smoke_test.js` passes at 3 sizes. - PlatformIO build for the CoreS3 succeeds. - In the built 3D viewer, a real pointer drag across the screen turns to page 2, and tapping Time opens it. - Not yet tried on the physical CoreS3. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Feedback from the maintainer - [x] ~~Keep setting the time in the Settings header (not a seventh tile).~~ Replaced by the two items below. - [x] Move the 12/24-hour switch from Day screen to the Time page. Hours is now the Time page's third row; Day screen keeps Brightness and Clock face. - [x] Preview this PR on the 3D environment. The viewer built from this PR is published as a private artifact (link under Preview); the side panel now names the Time page. - [x] Add the preview process as an agent doc. `AGENTS.md` covers the per-change checklist (screens, wasm, smoke test), building and publishing the preview, and Forgejo PR access. - [x] Take the time out of the top corner of Settings. The header time button is gone; page dots sit there instead. - [x] Scroll between pages of settings tiles, so the menu isn't limited by how many cards fit. Six tiles a page; swipe sideways or tap the dots. Time is a tile on page 2. - [x] Add a CLAUDE.md that imports AGENTS.md, so Claude Code loads it. `CLAUDE.md` is `@AGENTS.md`.
Settings: set the clock's time from the touchscreen
All checks were successful
host / test (push) Successful in 13s
host / simulator (push) Successful in 37s
host / test (pull_request) Successful in 12s
host / simulator (pull_request) Successful in 1m11s
host / firmware (push) Successful in 5m55s
host / firmware (pull_request) Successful in 5m25s
642f8757d0
The settings redesign (#4) left no way to set the time on the clock
itself; only the serial 'time HH:MM' command could. The Settings header
now shows the current time at its right, and a tap opens a Time page
with Hour and Minute steppers. Each wraps on its own and restarts the
seconds from 0. It's in the header rather than a seventh tile because a
fourth row of tiles would leave the CoreS3's 320x240 tiles too short for
their subtitles. In 12-hour time the header leaves off AM/PM, like a
phone's status bar; the Hour row shows it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Settings: move 12- or 24-hour from Day screen to the Time page
All checks were successful
host / test (push) Successful in 11s
host / test (pull_request) Successful in 13s
host / simulator (push) Successful in 1m10s
host / simulator (pull_request) Successful in 51s
host / firmware (push) Successful in 5m8s
host / firmware (pull_request) Successful in 4m39s
d2b9587da3
It sets how the whole clock reads, day and night, so it belongs with the
time rather than with the day look.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
AGENTS.md: how to preview a PR on the 3D viewer, and the firmware-change checklist
All checks were successful
host / test (push) Successful in 10s
host / test (pull_request) Successful in 12s
host / simulator (push) Successful in 43s
host / simulator (pull_request) Successful in 49s
host / firmware (pull_request) Successful in 4m59s
host / firmware (push) Successful in 5m24s
552cac5d32
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Settings: page the menu instead of the time in its header
All checks were successful
host / test (push) Successful in 11s
host / test (pull_request) Successful in 14s
host / simulator (pull_request) Successful in 35s
host / simulator (push) Successful in 1m6s
host / firmware (pull_request) Successful in 6m57s
host / firmware (push) Successful in 7m25s
1948515347
The time button in the Settings header goes. Time becomes a seventh tile,
and the menu holds six tiles a page so each stays tall enough for its
title and setting on the CoreS3. Swipe sideways, or tap the page dots
where the time was, to turn the page. Menu taps now act when the finger
lifts, so a swipe that starts on a tile turns the page instead of opening
it. Back from a page returns to the menu page that holds it; the gear
always opens the first. The state JSON gains menu_page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
CLAUDE.md: load AGENTS.md
All checks were successful
host / test (push) Successful in 14s
host / simulator (push) Successful in 53s
host / test (pull_request) Successful in 11s
host / simulator (pull_request) Successful in 1m2s
host / firmware (push) Successful in 6m57s
host / firmware (pull_request) Successful in 6m25s
cdec31c91b
Claude Code reads CLAUDE.md, not AGENTS.md; this imports it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audrow merged commit 8de59d7359 into main 2026-11-15 06:52:28 -06:00
Sign in to join this conversation.
No description provided.