Auto-pause: one definition of stopped, in Phase 2 #69

Open
opened 2026-09-01 17:35:47 +02:00 by robert · 0 comments
robert commented 2026-09-01 17:35:47 +02:00 (Migrated from git.butzei.de)

Goal

Define "stopped" once, in the phase that first needs it.

FR-M8 (auto-pause) sat in Phase 5 as "behaviour not yet specified", while #17 in Phase 2 already needed stop detection for moving time and the moving average. Two phases apart, that becomes two different definitions of stopped - and rides where the average speed and the ride timer disagree about how long you were moving.

Acceptance criteria

  • One StopDetector, consumed by moving-time accumulation, the moving average, the GPX recording and auto-pause
  • Speed threshold specified and documented, consistent with the 0.8 m/s display clamp in #17 - state explicitly whether they are the same number and why
  • Dwell before a stop takes effect, so a traffic light is a stop and a slow corner is not
  • Resume condition specified, with hysteresis, so it does not flap at walking pace
  • Behaviour with a wheel sensor rather than GPS: the wheel sensor knows you have stopped immediately and should be preferred when live
  • Auto-pause on / off, honouring the setting in #44; when off, the same detector still drives moving time
  • Pause state reflected to the watch as RIDE_STATE, and a manual pause always beats an automatic resume
  • Unit tests from a replayed GPX with real traffic-light stops (#23), asserting moving time against a hand-checked expectation

Files

  • companion/.../ride/StopDetector.kt
  • companion/.../location/SpeedPipeline.kt

Notes

See D35. #44 keeps only the setting that turns auto-pause on and off; the behaviour lives here.

## Goal Define "stopped" once, in the phase that first needs it. FR-M8 (auto-pause) sat in Phase 5 as "behaviour not yet specified", while #17 in Phase 2 already needed stop detection for moving time and the moving average. Two phases apart, that becomes two different definitions of stopped - and rides where the average speed and the ride timer disagree about how long you were moving. ## Acceptance criteria - [ ] One `StopDetector`, consumed by moving-time accumulation, the moving average, the GPX recording and auto-pause - [ ] Speed threshold specified and documented, consistent with the 0.8 m/s display clamp in #17 - state explicitly whether they are the same number and why - [ ] Dwell before a stop takes effect, so a traffic light is a stop and a slow corner is not - [ ] Resume condition specified, with hysteresis, so it does not flap at walking pace - [ ] Behaviour with a wheel sensor rather than GPS: the wheel sensor knows you have stopped immediately and should be preferred when live - [ ] Auto-pause on / off, honouring the setting in #44; when off, the same detector still drives moving time - [ ] Pause state reflected to the watch as `RIDE_STATE`, and a manual pause always beats an automatic resume - [ ] Unit tests from a replayed GPX with real traffic-light stops (#23), asserting moving time against a hand-checked expectation ## Files - `companion/.../ride/StopDetector.kt` - `companion/.../location/SpeedPipeline.kt` ## Notes See D35. #44 keeps only the setting that turns auto-pause on and off; the behaviour lives here.
Sign in to join this conversation.
No description provided.