fw/services/hrm: stop unserved subscribers pinning the sensor on - #1899
Open
jplexer wants to merge 1 commit into
Open
Conversation
The manager only considers a subscriber served once it receives a Good-or-better (or OffWrist) BPM sample. A subscriber the sensor cannot serve - poor contact, or the fresh state right after boot where every subscriber is treated as immediately due - would hold the sensor powered indefinitely. Telemetry from MOB-11575 shows a Pebble Time 2 running the sensor for 42 minutes straight after an OTA reboot, then burning ~4-7 min/hour for two days against a 30-minute measurement interval. Track how long the sensor has been continuously on. Once it exceeds a full serve window (120 s) without producing a valid reading for a subscriber, stamp that subscriber as served so it defers to its next interval instead. Short-interval (live HR) subscribers become due again immediately, so workouts and BLE HR sharing are unaffected; only long-interval duty-cycled subscribers stop pinning the sensor. The gate counts continuous on-time only, so subscribers that went overdue while the sensor was forced off (charging, run level) still get served first. Fixes MOB-11575 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Joshua Jun <lets@throw.rocks>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The manager only considers a subscriber served once it receives a Good-or-better (or OffWrist) BPM sample. A subscriber the sensor cannot serve - poor contact, or the fresh state right after boot where every subscriber is treated as immediately due - would hold the sensor powered indefinitely. Telemetry from MOB-11575 shows a Pebble Time 2 running the sensor for 42 minutes straight after an OTA reboot, then burning ~4-7 min/hour for two days against a 30-minute measurement interval.
Track how long the sensor has been continuously on. Once it exceeds a full serve window (120 s) without producing a valid reading for a subscriber, stamp that subscriber as served so it defers to its next interval instead. Short-interval (live HR) subscribers become due again immediately, so workouts and BLE HR sharing are unaffected; only long-interval duty-cycled subscribers stop pinning the sensor. The gate counts continuous on-time only, so subscribers that went overdue while the sensor was forced off (charging, run level) still get served first.
Fixes MOB-11575