Skip to content

Commit ca9776c

Browse files
authored
Use full ICE history for displaying estimated carbohydrate effects (#2163)
The 'predicted' dataset on the 'glucose change' graph was calculated using insulin counteraction effects that had been truncated to the width of the chart. This meant that carb entries early in the timeline may not have dynamic carb absorption applied as the implied ICE was zero for the first part of the carb entry's history.
1 parent 0a3a165 commit ca9776c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Loop/View Controllers/CarbAbsorptionViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ final class CarbAbsorptionViewController: LoopChartsTableViewController, Identif
173173
}
174174

175175
reloadGroup.enter()
176-
self.deviceManager.carbStore.getGlucoseEffects(start: chartStartDate, end: nil, effectVelocities: insulinCounteractionEffects!) { (result) in
176+
self.deviceManager.carbStore.getGlucoseEffects(start: chartStartDate, end: nil, effectVelocities: allInsulinCounteractionEffects) { (result) in
177177
switch result {
178178
case .success((_, let effects)):
179179
carbEffects = effects

0 commit comments

Comments
 (0)