Auto-pause: one definition of stopped, in Phase 2 #69
Labels
No labels
area:companion
area:docs
area:shared
area:tooling
area:watchapp
blocker
kind:chore
kind:feature
kind:spike
kind:test
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
#17 Speed pipeline: smoothing, stop clamping, distance, moving average
robert/PedalPebble
#14 Android project skeleton and Gradle setup
robert/PedalPebble
Reference
robert/PedalPebble#69
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
StopDetector, consumed by moving-time accumulation, the moving average, the GPX recording and auto-pauseRIDE_STATE, and a manual pause always beats an automatic resumeFiles
companion/.../ride/StopDetector.ktcompanion/.../location/SpeedPipeline.ktNotes
See D35. #44 keeps only the setting that turns auto-pause on and off; the behaviour lives here.
Closed by PR #100 (merged): one StopDetector (companion/core, D35) consumed by moving-time/moving-average/GPX-recording/auto-pause alike. 0.8 m/s stop threshold \u2014 deliberately the same number as #17's display clamp, since two thresholds for "stopped" is exactly the bug D35 exists to prevent. 3s dwell before a stop registers, 1.5 m/s held 1s to resume (hysteresis above walking pace). Wheel sensor (#18) gets no special-cased threshold, just feeds the same detector a cleaner signal, preferred over GPS for 5s after its last report; GPS samples are dropped outright while the wheel is live, not merely deprioritized. Manual-pause-wins reconciles with state.c's existing D43 mechanism rather than duplicating it \u2014 this PR is phone-side detection only.\n\n18 new host tests (synthetic stop-and-go scenario standing in for #23's not-yet-built GPX replay harness, since #23 doesn't exist yet) all green via a real
./gradlew :companion:core:test. D35 updated additively (a dated paragraph, not a rewrite) with the concrete numbers per D48.