Repository navigation
Don't adopt a failed or ended sensor again - #115
Merged
Merged
Conversation
A G7 that fails or ends its session keeps advertising. While eavesdropping, the scan for its replacement connects to any Dexcom sensor in range to identify it, so it found the same sensor again five minutes later, adopted it as a new sensor, read the same failed message and raised Sensor Failed again: a critical alarm every five minutes until the sensor was removed. Each pass also recorded a sensor start and end, and overwrote the previous-sensor record, losing the failure. The previous-sensor record now says why the sensor ended (failed, session ended), and discovery declines that sensor, matched by name and activation time. A sensor forgotten by the user can still be adopted again. The Sensor Failed alert now stays up until a different sensor is adopted, instead of being retracted as soon as it is issued, and its issued marker survives the forget (as in #112). Fixes #111.
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.
Fixes #111. Supersedes #112, which keeps the alert marker but still re-adopts the sensor.
What happened
Seen on a phone eavesdropping on a G7 (DXCMgc, 14 days 17 hours into a 15-day session). The sensor reported state 25 (
sensorFailed), and from then on every five minutes:sensorFailedAlertIssuedForand retracted the alert the moment it was issued.The user acknowledged three critical alarms in ten minutes, and they continue until the sensor is out of range.
Change
G7SensorRecord.EndReasongainsfailedandsessionEnded, and the Previous Sensor page shows them. The failure and session-ended paths forget the sensor with that reason;scanForNewSensor()(the user's Scan for New Sensor) still usesreplaced.sensorFailedAlertIssuedForsurvives the forget, as in Suppress repeated G7 sensor failure alerts during replacement scans #112.Tests
New in
G7LifecycleAlertManagerTests:failedand its failure messageAll 207 G7SensorKit tests pass on the iOS Simulator.