Repository navigation
Record Libre 3 sensor states and ends as CGM events - #19
Merged
Merged
Conversation
The sensor's patch status, about once a minute, says when something is wrong. When that changes, send Loop a sensorIssue with the sensor's own name for it (its error code, or the attention it implies) and the raw errorData and patchState. It is fatal only when LibreLoop shows the sensor as failed, so a normal end of wear isn't recorded as a failure. When the sensor needs replacing, its sensorEnd is sent then, once, rather than only when the user discards it. The last state sent is kept in the manager's persisted state, so a relaunch doesn't repeat it, and is cleared by a new pairing. The device identifier is now the sensor serial alone. Appending the receiver ID gave the same sensor different identifiers.
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.
Records Libre 3 sensor states as CGM events, like G7 (LoopKit/G7SensorKit#90) and G5/G6 (LoopKit/CGMBLEKit#224), using the
sensorIssuetype from LoopKit/LoopKit#637.sensorIssueis recorded with the sensor's own name for it inerror.code: the error code (transmissionError,terminated, ...) or, without one, the attention it implies (checkSensor, ...).metadatakeeps the rawerrorDataandpatchState.isFatalis set only when LibreLoop shows the sensor as failed, so a normal end of wear isn't a failure.serial:receiverIDgave one sensor several identifiers. A session that is running when this ships ends under a different identifier than it started with.Tests:
LibreLoopSensorStateEventTests(3).