Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
94fb603
Add Dosing Strategy: automaticBolusSlidingScale
marionbarker Apr 26, 2023
4ef6ff1
Reverse order of two new constants
marionbarker Apr 26, 2023
ff1bb40
revert to dev for dosing strategy selection
marionbarker Apr 27, 2023
8ff48a2
revert to dev for dosing strategy selection
marionbarker Apr 27, 2023
5a5b6a8
Rename to effectiveBolusApplicationFactor, change to flag inside exis…
marionbarker Apr 27, 2023
08e6fa2
Add applyLinearRamp slider to Dosing Strategy
marionbarker Apr 28, 2023
cd1da90
Merge branch 'dev' into dosing-strategy-linear-ramp
marionbarker May 6, 2023
c60bb40
Update constants
marionbarker May 6, 2023
095d73c
Merge branch 'dev' into dosing-strategy-linear-ramp
marionbarker May 21, 2023
7e3bc86
Merge branch 'dev' into dosing-strategy-linear-ramp
marionbarker May 22, 2023
289ab56
Modify explanation seen by user
marionbarker May 22, 2023
373e938
missed one phrase
marionbarker May 22, 2023
79d5b32
Merge branch 'dev' into dosing-strategy-linear-ramp
marionbarker Jun 1, 2023
e058d50
Update explanation seen by user, modify font
marionbarker Jun 1, 2023
ab15695
Enable swapping of original and replacment protocols, minimize LoopKi…
marionbarker Jun 3, 2023
89e1512
Restore to dev branch version prior to pr1988_update merge
marionbarker Jun 3, 2023
c8b437b
Merge branch 'pr1988_update' into dosing-strategy-linear-ramp
marionbarker Jun 3, 2023
a515b6c
Restore to dev branch version prior to update for PR 1988
marionbarker Jun 4, 2023
8b3f61e
Updates per requested changes for Loop PR 1988
marionbarker Jun 4, 2023
ee9dee0
Renaming, adjusting views, logging
bjorkert Jun 4, 2023
0cda463
Wording change
bjorkert Jun 4, 2023
069cfc7
Logging error fixed
bjorkert Jun 4, 2023
4b203de
Merge pull request #2 from bjorkert/experimental
marionbarker Jun 4, 2023
e434474
dead code
bjorkert Jun 10, 2023
a7cb6c4
Merge pull request #3 from bjorkert/remove-leftover-code
marionbarker Jun 11, 2023
abb83b0
missed rename
bjorkert Jun 13, 2023
96b8667
Merge pull request #4 from bjorkert/rename_preview
marionbarker Jun 13, 2023
2ac23f4
dark mode fix
bjorkert Jun 17, 2023
ce984c0
Merge pull request #5 from bjorkert/dark_mode_fix
marionbarker Jun 17, 2023
ee6861d
Merge branch 'dev' into dosing-strategy-linear-ramp
marionbarker Jun 17, 2023
57a5c03
Merge branch 'dev' into dosing-strategy-linear-ramp
marionbarker Jun 18, 2023
8e1ef8c
Updated algorithm experiments view and glucose based partial applicat…
ps2 Jun 25, 2023
17fc167
Put algorithm experiments behind feature flag
ps2 Jun 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Common/FeatureFlags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct FeatureFlagConfiguration: Decodable {
let adultChildInsulinModelSelectionEnabled: Bool
let profileExpirationSettingsViewEnabled: Bool
let missedMealNotifications: Bool
let allowAlgorithmExperiments: Bool


fileprivate init() {
Expand Down Expand Up @@ -229,6 +230,11 @@ struct FeatureFlagConfiguration: Decodable {
self.missedMealNotifications = true
#endif

#if ALLOW_ALGORITHM_EXPERIMENTS
self.allowAlgorithmExperiments = true
#else
self.allowAlgorithmExperiments = false
#endif
}
}

Expand Down Expand Up @@ -263,7 +269,8 @@ extension FeatureFlagConfiguration : CustomDebugStringConvertible {
"* dynamicCarbAbsorptionEnabled: \(dynamicCarbAbsorptionEnabled)",
"* adultChildInsulinModelSelectionEnabled: \(adultChildInsulinModelSelectionEnabled)",
"* profileExpirationSettingsViewEnabled: \(profileExpirationSettingsViewEnabled)",
"* missedMealNotifications: \(missedMealNotifications)"
"* missedMealNotifications: \(missedMealNotifications)",
"* allowAlgorithmExperiments: \(allowAlgorithmExperiments)"
].joined(separator: "\n")
}
}
Expand Down
20 changes: 20 additions & 0 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,11 @@
C1FB428D21791D2500FAB378 /* PumpManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C3B6F620BBCAA30026CAFA /* PumpManager.swift */; };
C1FB428F217921D600FAB378 /* PumpManagerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FB428E217921D600FAB378 /* PumpManagerUI.swift */; };
C1FB4290217922A100FAB378 /* PumpManagerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FB428E217921D600FAB378 /* PumpManagerUI.swift */; };
DDC389F62A2B61750066E2E8 /* ApplicationFactorStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */; };
DDC389F82A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389F72A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift */; };
DDC389FA2A2B62470066E2E8 /* ConstantApplicationFactorStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389F92A2B62470066E2E8 /* ConstantApplicationFactorStrategy.swift */; };
DDC389FC2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */; };
DDC389FE2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */; };
E90909D124E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CC24E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json */; };
E90909D224E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CD24E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json */; };
E90909D324E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CE24E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json */; };
Expand Down Expand Up @@ -1687,6 +1692,11 @@
C1FF3D4B29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
C1FF3D4C29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
C1FF3D4D29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/InfoPlist.strings; sourceTree = "<group>"; };
DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationFactorStrategy.swift; sourceTree = "<group>"; };
DDC389F72A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlucoseBasedApplicationFactorStrategy.swift; sourceTree = "<group>"; };
DDC389F92A2B62470066E2E8 /* ConstantApplicationFactorStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantApplicationFactorStrategy.swift; sourceTree = "<group>"; };
DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SettingsView+algorithmExperimentsSection.swift"; sourceTree = "<group>"; };
DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlucoseBasedApplicationFactorSelectionView.swift; sourceTree = "<group>"; };
E90909CC24E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = high_and_rising_with_cob_momentum_effect.json; sourceTree = "<group>"; };
E90909CD24E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = high_and_rising_with_cob_insulin_effect.json; sourceTree = "<group>"; };
E90909CE24E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = high_and_rising_with_cob_predicted_glucose.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2314,6 +2324,7 @@
isa = PBXGroup;
children = (
A98556842493F901000FD662 /* AlertStore+SimulatedCoreData.swift */,
DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */,
C1D289B422F90A52003FFBD9 /* BasalDeliveryState.swift */,
A9F703722489BC8500C98AD8 /* CarbStore+SimulatedCoreData.swift */,
C17824991E1999FA00D9D25C /* CaseCountable.swift */,
Expand Down Expand Up @@ -2400,6 +2411,7 @@
43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */,
4311FB9A1F37FE1B00D4C0A7 /* TitleSubtitleTextFieldTableViewCell.swift */,
C1AF062229426300002C1B19 /* ManualGlucoseEntryRow.swift */,
DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -2441,6 +2453,9 @@
C1F2075B26D6F9B0007AB7EB /* ProfileExpirationAlerter.swift */,
A96DAC2B2838F31200D94E38 /* SharedLogging.swift */,
7E69CFFB2A16A77E00203CBD /* ResetLoopManager.swift */,
DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */,
DDC389F72A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift */,
DDC389F92A2B62470066E2E8 /* ConstantApplicationFactorStrategy.swift */,
);
path = Managers;
sourceTree = "<group>";
Expand Down Expand Up @@ -3872,6 +3887,7 @@
C1201E2C23ECDBD0002DA84A /* WatchContextRequestUserInfo.swift in Sources */,
1D49795824E7289700948F05 /* ServicesViewModel.swift in Sources */,
1D4A3E2D2478628500FD601B /* StoredAlert+CoreDataClass.swift in Sources */,
DDC389FA2A2B62470066E2E8 /* ConstantApplicationFactorStrategy.swift in Sources */,
892D7C5123B54A15008A9656 /* CarbEntryViewController.swift in Sources */,
B4E202302661063E009421B5 /* AutomaticDosingStatus.swift in Sources */,
C191D2A125B3ACAA00C26C0B /* DosingStrategySelectionView.swift in Sources */,
Expand Down Expand Up @@ -3903,6 +3919,7 @@
1DB619AC270BAD3D006C9D07 /* VersionUpdateViewModel.swift in Sources */,
A9C62D882331703100535612 /* Service.swift in Sources */,
89CAB36324C8FE96009EE3CE /* PredictedGlucoseChartView.swift in Sources */,
DDC389F82A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift in Sources */,
4F6663941E905FD2009E74FC /* ChartColorPalette+Loop.swift in Sources */,
A9F703732489BC8500C98AD8 /* CarbStore+SimulatedCoreData.swift in Sources */,
4328E0351CFC0AE100E199AA /* WatchDataManager.swift in Sources */,
Expand Down Expand Up @@ -3933,6 +3950,7 @@
E9B080B1253BDA6300BAD8F8 /* UserDefaults+LoopIntents.swift in Sources */,
C1AF062329426300002C1B19 /* ManualGlucoseEntryRow.swift in Sources */,
C148CEE724FD91BD00711B3B /* DeliveryUncertaintyAlertManager.swift in Sources */,
DDC389FC2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift in Sources */,
1D12D3B92548EFDD00B53E8B /* main.swift in Sources */,
435400341C9F878D00D5819C /* SetBolusUserInfo.swift in Sources */,
A9DCF32A25B0FABF00C89088 /* LoopUIColorPalette+Default.swift in Sources */,
Expand Down Expand Up @@ -3967,13 +3985,15 @@
A97F250825E056D500F0EE19 /* OnboardingManager.swift in Sources */,
438D42F91D7C88BC003244B0 /* PredictionInputEffect.swift in Sources */,
892A5D692230C41D008961AB /* RangeReplaceableCollection.swift in Sources */,
DDC389F62A2B61750066E2E8 /* ApplicationFactorStrategy.swift in Sources */,
4F70C2101DE8FAC5006380B7 /* ExtensionDataManager.swift in Sources */,
43DFB62320D4CAE7008A7BAE /* PumpManager.swift in Sources */,
A9FB75F1252BE320004C7D3F /* BolusDosingDecision.swift in Sources */,
892A5D59222F0A27008961AB /* Debug.swift in Sources */,
431A8C401EC6E8AB00823B9C /* CircleMaskView.swift in Sources */,
1D05219D2469F1F5000EBBDE /* AlertStore.swift in Sources */,
439897371CD2F80600223065 /* AnalyticsServicesManager.swift in Sources */,
DDC389FE2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift in Sources */,
A9C62D842331700E00535612 /* DiagnosticLog+Subsystem.swift in Sources */,
895FE0952201234000FCF18A /* OverrideSelectionViewController.swift in Sources */,
C1EF747228D6A44A00C8C083 /* CrashRecoveryManager.swift in Sources */,
Expand Down
67 changes: 67 additions & 0 deletions Loop/Extensions/SettingsView+algorithmExperimentsSection.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//
// SettingsView+algorithmExperimentsSection.swift
// Loop
//
// Created by Jonas Björkert on 2023-06-03.
// Copyright © 2023 LoopKit Authors. All rights reserved.
//

import Foundation
import SwiftUI
import LoopKit
import LoopKitUI

extension SettingsView {
internal var algorithmExperimentsSection: some View {
NavigationLink(NSLocalizedString("Algorithm Experiments", comment: "The title of the Algorithm Experiments section in settings")) {
ExperimentsSettingsView(automaticDosingStrategy: viewModel.automaticDosingStrategy)
}
}
}

public struct ExperimentRow: View {
var name: String
var enabled: Bool

public var body: some View {
HStack {
Text(name)
.foregroundColor(.primary)
Spacer()
Text(enabled ? "On" : "Off")
.foregroundColor(enabled ? .red : .secondary)
}
}
}

public struct ExperimentsSettingsView: View {
@State private var isGlucoseBasedApplicationFactorEnabled = UserDefaults.standard.glucoseBasedApplicationFactorEnabled
var automaticDosingStrategy: AutomaticDosingStrategy

public var body: some View {
VStack(alignment: .center, spacing: 12) {
VStack {
Text("⚠️").font(.largeTitle)
Text("Caution")
}
Divider()
VStack(alignment: .leading, spacing: 12) {
Text(NSLocalizedString("Algorithm Experiments are optional modifications to the Loop Algorithm. These modifications are less tested than the standard Loop algorithm, so please use carefully.", comment: "Algorithm Experiments description."))
Text(NSLocalizedString("In future versions of Loop these experiments may change, end up as standard parts of the Loop Algorithm, or be removed from Loop entirely. Please follow along in the Loop Zulip chat to stay informed of possible changes to these features.", comment: "Algorithm Experiments description second paragraph."))
}
.foregroundColor(.secondary)

Divider()
NavigationLink(destination: GlucoseBasedApplicationFactorSelectionView(isGlucoseBasedApplicationFactorEnabled: $isGlucoseBasedApplicationFactorEnabled, automaticDosingStrategy: automaticDosingStrategy)) {
ExperimentRow(name: "Glucose Based Partial Application", enabled: isGlucoseBasedApplicationFactorEnabled && automaticDosingStrategy == .automaticBolus)
}
.padding()
.background(Color(UIColor.secondarySystemBackground))
.foregroundColor(.accentColor)
.cornerRadius(10)
Spacer()
}
.padding()
.navigationTitle(NSLocalizedString("Algorithm Experiments", comment: "Navigation title for algorithms experiments screen"))
}
}
20 changes: 20 additions & 0 deletions Loop/Managers/ApplicationFactorStrategy.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// ApplicationFactorStrategy.swift
// Loop
//
// Created by Jonas Björkert on 2023-06-03.
// Copyright © 2023 LoopKit Authors. All rights reserved.
//

import Foundation
import HealthKit
import LoopKit
import LoopCore

protocol ApplicationFactorStrategy {
func calculateDosingFactor(
for glucose: HKQuantity,
correctionRangeSchedule: GlucoseRangeSchedule,
settings: LoopSettings
) -> Double
}
23 changes: 23 additions & 0 deletions Loop/Managers/ConstantApplicationFactorStrategy.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// ConstantDosingStrategy.swift
// Loop
//
// Created by Jonas Björkert on 2023-06-03.
// Copyright © 2023 LoopKit Authors. All rights reserved.
//

import Foundation
import HealthKit
import LoopKit
import LoopCore

struct ConstantApplicationFactorStrategy: ApplicationFactorStrategy {
func calculateDosingFactor(
for glucose: HKQuantity,
correctionRangeSchedule: GlucoseRangeSchedule,
settings: LoopSettings
) -> Double {
// The original strategy uses a constant dosing factor.
return LoopConstants.bolusPartialApplicationFactor
}
}
57 changes: 57 additions & 0 deletions Loop/Managers/GlucoseBasedApplicationFactorStrategy.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// GlucoseBasedApplicationFactorStrategy.swift
// Loop
//
// Created by Jonas Björkert on 2023-06-03.
// Copyright © 2023 LoopKit Authors. All rights reserved.
//

import Foundation
import HealthKit
import LoopKit
import LoopCore

struct GlucoseBasedApplicationFactorStrategy: ApplicationFactorStrategy {
static let minPartialApplicationFactor = 0.20 // min fraction of correction when glucose > minGlucoseSlidingScale
static let maxPartialApplicationFactor = 0.80 // max fraction of correction when glucose > maxGlucoseSlidingScale
// set minGlucoseSlidingScale based on user setting for correction range
// use mg/dL for calculations
static let minGlucoseDeltaSlidingScale = 10.0 // mg/dL
static let maxGlucoseSlidingScale = 200.0 // mg/dL

func calculateDosingFactor(
for glucose: HKQuantity,
correctionRangeSchedule: GlucoseRangeSchedule,
settings: LoopSettings
) -> Double {
// Calculate current glucose and lower bound target
let currentGlucose = glucose.doubleValue(for: .milligramsPerDeciliter)
let correctionRange = correctionRangeSchedule.quantityRange(at: Date())
let lowerBoundTarget = correctionRange.lowerBound.doubleValue(for: .milligramsPerDeciliter)

// Calculate minimum glucose sliding scale and scaling fraction
let minGlucoseSlidingScale = GlucoseBasedApplicationFactorStrategy.minGlucoseDeltaSlidingScale + lowerBoundTarget
let scalingFraction = (GlucoseBasedApplicationFactorStrategy.maxPartialApplicationFactor - GlucoseBasedApplicationFactorStrategy.minPartialApplicationFactor) / (GlucoseBasedApplicationFactorStrategy.maxGlucoseSlidingScale - minGlucoseSlidingScale)
let scalingGlucose = max(currentGlucose - minGlucoseSlidingScale, 0.0)

// Calculate effectiveBolusApplicationFactor
let effectiveBolusApplicationFactor = min(GlucoseBasedApplicationFactorStrategy.minPartialApplicationFactor + scalingGlucose * scalingFraction, GlucoseBasedApplicationFactorStrategy.maxPartialApplicationFactor)

return effectiveBolusApplicationFactor
}
}

extension UserDefaults {
private enum Key: String {
case GlucoseBasedApplicationFactorEnabled = "com.loopkit.algorithmExperiments.glucoseBasedApplicationFactorEnabled"
}

var glucoseBasedApplicationFactorEnabled: Bool {
get {
bool(forKey: Key.GlucoseBasedApplicationFactorEnabled.rawValue) as Bool
}
set {
set(newValue, forKey: Key.GlucoseBasedApplicationFactorEnabled.rawValue)
}
}
}
21 changes: 19 additions & 2 deletions Loop/Managers/LoopDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,23 @@ extension LoopDataManager {
return self.delegate?.roundBolusVolume(units: units) ?? units
}

let maxAutomaticBolus = min(iobHeadroom, maxBolus! * LoopConstants.bolusPartialApplicationFactor)
// Create dosing strategy based on user setting
let applicationFactorStrategy: ApplicationFactorStrategy = UserDefaults.standard.glucoseBasedApplicationFactorEnabled
? GlucoseBasedApplicationFactorStrategy()
: ConstantApplicationFactorStrategy()

let correctionRangeSchedule = settings.effectiveGlucoseTargetRangeSchedule()

let effectiveBolusApplicationFactor = applicationFactorStrategy.calculateDosingFactor(
for: glucose.quantity,
correctionRangeSchedule: correctionRangeSchedule!,
settings: settings
)

self.logger.debug(" *** Glucose: %{public}@, effectiveBolusApplicationFactor: %.2f", glucose.quantity.description, effectiveBolusApplicationFactor)

// If a user customizes maxPartialApplicationFactor > 1; this respects maxBolus
let maxAutomaticBolus = min(iobHeadroom, maxBolus! * min(effectiveBolusApplicationFactor, 1.0))

dosingRecommendation = predictedGlucose.recommendedAutomaticDose(
to: glucoseTargetRange!,
Expand All @@ -1708,7 +1724,7 @@ extension LoopDataManager {
model: doseStore.insulinModelProvider.model(for: pumpInsulinType),
basalRates: basalRateSchedule!,
maxAutomaticBolus: maxAutomaticBolus,
partialApplicationFactor: LoopConstants.bolusPartialApplicationFactor * self.timeBasedDoseApplicationFactor,
partialApplicationFactor: effectiveBolusApplicationFactor * self.timeBasedDoseApplicationFactor,
lastTempBasal: lastTempBasal,
volumeRounder: volumeRounder,
rateRounder: rateRounder,
Expand Down Expand Up @@ -2128,6 +2144,7 @@ extension LoopDataManager {
"insulinOnBoard: \(String(describing: manager.insulinOnBoard))",
"error: \(String(describing: state.error))",
"overrideInUserDefaults: \(String(describing: UserDefaults.appGroup?.intentExtensionOverrideToSet))",
"glucoseBasedApplicationFactorEnabled: \(UserDefaults.standard.glucoseBasedApplicationFactorEnabled)",
"",
String(reflecting: self.retrospectiveCorrection),
"",
Expand Down
Loading