Repository navigation
Conversation
Loop keeps uploading its last reservoir reading for 15 minutes after a pod change, under the new pod's ID. LoopFollow now ignores volumes for a new Omnipod until it has uploaded a record without one or 15 minutes have passed, and dates readings by the record's pump clock.
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.
Loop uploads its last reservoir reading until it is 15 minutes old, whichever pod it came from, so the first records after a pod change carry the old pod's final volume under the new pod's ID. Since #746 carries a reading for 30 minutes, LoopFollow showed the old pod's volume for around 45 minutes after a change, and the low reservoir alarm could act on it.
For an Omnipod, volumes after a pump ID change are now ignored and the row shows 50+U until the new pod has uploaded a record without a volume or 15 minutes have passed. A new pod reports no volume until it is below 50U, so nothing real is lost. Records where Loop reports the Omnipod as Unknown, between deactivation and pairing, also read as 50+U, and the stored pump is kept through them so the next pod still reads as a change. Medtrum, which Loop always reports as Unknown, still shows its volume. Reading times are the record's pump clock.
Replayed against a month of Nightscout data from one Loop user with DASH, all five pod changes with carried over volumes now show 50+U.