From 39d88f1c7a7d2528090aa8d27b05c34de3dec394 Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Sat, 22 Apr 2017 16:26:28 -0500 Subject: [PATCH 1/2] Use the normal forecast for bolusing. --- Loop/Managers/LoopDataManager.swift | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Loop/Managers/LoopDataManager.swift b/Loop/Managers/LoopDataManager.swift index 7d3fac004f..76688bb2b1 100644 --- a/Loop/Managers/LoopDataManager.swift +++ b/Loop/Managers/LoopDataManager.swift @@ -838,22 +838,7 @@ final class LoopDataManager { insulinActionDuration: insulinActionDuration ) - // TODO: This was added in https://github.com/LoopKit/Loop/issues/370, but concerns were raised - // that this contradicts users expectations in https://github.com/LoopKit/Loop/issues/435 - let bolusSafetyEffects = settings.enabledEffects.subtracting([.retrospection, .momentum]) - - return min(recommendation, - DoseMath.recommendBolusFromPredictedGlucose( - try predictGlucoseFromCurrentData(using: bolusSafetyEffects), - maxBolus: maxBolus, - glucoseTargetRange: glucoseTargetRange, - insulinSensitivity: insulinSensitivity, - basalRateSchedule: basalRates, - pendingInsulin: pendingInsulin, - minimumBGGuard: minimumBGGuard, - insulinActionDuration: insulinActionDuration - ) - ) + return recommendation; } /// *This method should only be called from the `dataAccessQueue`* From 2d30d76379b57afb16e20350f2f9bbc8f3f2335c Mon Sep 17 00:00:00 2001 From: Pete Schwamb Date: Sat, 22 Apr 2017 16:36:17 -0500 Subject: [PATCH 2/2] remove semicolon --- Loop/Managers/LoopDataManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Loop/Managers/LoopDataManager.swift b/Loop/Managers/LoopDataManager.swift index 76688bb2b1..c039581e97 100644 --- a/Loop/Managers/LoopDataManager.swift +++ b/Loop/Managers/LoopDataManager.swift @@ -838,7 +838,7 @@ final class LoopDataManager { insulinActionDuration: insulinActionDuration ) - return recommendation; + return recommendation } /// *This method should only be called from the `dataAccessQueue`*