-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have the Loop Insulin Delivered start at 0 U despite variable priming amounts reported from Pod #563
Conversation
When I was testing this, immediately after pairing I do see that the initial reading on the settings pages is 0.2U, so there does seem to be an issue that needs fixing here. But it's not off by 0.5, which this change implements. When I run this code, I end up with -0.3 U showing on my Pod Settings page, immediately after pairing. Are we having inconsistent values for the post-pairing |
From a detailed examination of this Loop Report and others, the pod status after the 2.6U prime bolus has completed doesn’t report having delivered 2.6U. I’ve seen values ranging from 2.15U to 2.3U looking at about a dozen samples. Then in the cases I examined in detail, there was always was to another 0.5U more delivered as expected for the cannula insert. In the example Loop Report, 2.3U were reported as delivered after the prime bolus and 2.8U after the cannula insert instead of the expected 2.6U+0.5U=3.1U and this difference was the -0.3U reported when the 0.5U cannula insertion bolus amount is subtracted. To have the reported insulin delivered value reported to the user to be 0 right after a new Pod is paired, it seems that we need to have an additional persistent Podstate optional variable for reported insulin delivered after the pod setup process has completed and then subtract this value from the reported insulin delivered value when updateFromStatusResponse() uses PodInsulinMeasurements(). I have already done a prototype of this using a setupInsulinDelivered: Double? PodState variable and it seems to work well, but there were a few corner cases to properly handle a few situations. When this optional variables isn’t set in PodInsulinMeasurements (either when a Pod is first being setup and hasn’t completed its setup it yet or when a new version of Loop is installed with this feature that didn’t get to initialize this optional variable at startup time), then self.delivered would be set to |
Sounds like we should track a |
When we have an actual prime command (as per #566), I would think that counting any manual priming amounts towards a |
…tup amount counted by Pod as being actually delivered so that the user reported Insulin Delivered starts at 0 U.
I decided to implement a new |
Thanks Joe! |
No description provided.