Conversation
| } | ||
| } | ||
|
|
||
| var effectDelay: TimeInterval { |
There was a problem hiding this comment.
@dm61 ideally, this should be user configurable (due to YDMV) IMHO. In many cases 15 or even 20 minutes might be more adequate (without the user needing to make a code change).
There was a problem hiding this comment.
Thanks for the comment. The main purpose of this PR is to address a slight inconsistency in dosing versus prediction algorithms, as discussed in #1238. UI-related decisions and design are separate issues, beyond the scope of this particular PR.
|
Thanks @dm61. Looks great! |
|
Can I please clarify that this means that the algorhythm will now assume that the insulin doesn't begin it's function until 10 min after it's been programmed? Where previously the algorhythm assumed immediate action? And that now this is has been merged to the dev branch? |
|
The main algorithm has always assumed a 10 minute delay, and you would see this in the forecast, IOB charts, etc. The fix here is how dosing is calculated. Loop iterates to see what size dose will correct any highs without bringing you below range. That calculation wasn't using the 10 minute delay, so doses could be smaller, depending on the timing of carbs and your current bg. |
|
Oh interesting. Ok. Thank you for the clarification. |
Adds delay to the insulin model presets, reverts hard coded delay and subtraction of delay in DoseMath. This is a companion PR to LoopKit PR LoopKit/LoopKit#315. Upon review, and any further updates, the two PR's should be merged concurrently. This Loop PR and the LoopKit PR 315 serve the same main purpose of fixing the dose math as #1238, which should be closed once these two PR's are merged.