1
- Submodule Loop fee85e0..66723d6 :
1
+ Submodule Loop 3034e45..b9c7cec :
2
2
diff --git a/Loop/Loop.xcodeproj/project.pbxproj b/Loop/Loop.xcodeproj/project.pbxproj
3
- index 360db94c..f403686e 100644
3
+ index d9e48718..0d2dda5e 100644
4
4
--- a/Loop/Loop.xcodeproj/project.pbxproj
5
5
+++ b/Loop/Loop.xcodeproj/project.pbxproj
6
- @@ -516 ,6 +516 ,11 @@
6
+ @@ -518 ,6 +518 ,11 @@
7
7
C1FB428D21791D2500FAB378 /* PumpManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C3B6F620BBCAA30026CAFA /* PumpManager.swift */; };
8
8
C1FB428F217921D600FAB378 /* PumpManagerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FB428E217921D600FAB378 /* PumpManagerUI.swift */; };
9
9
C1FB4290217922A100FAB378 /* PumpManagerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FB428E217921D600FAB378 /* PumpManagerUI.swift */; };
@@ -15,7 +15,7 @@ index 360db94c..f403686e 100644
15
15
E90909D124E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CC24E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json */; };
16
16
E90909D224E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CD24E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json */; };
17
17
E90909D324E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CE24E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json */; };
18
- @@ -1683 ,6 +1688 ,11 @@
18
+ @@ -1687 ,6 +1692 ,11 @@
19
19
C1FF3D4B29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
20
20
C1FF3D4C29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
21
21
C1FF3D4D29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -27,23 +27,23 @@ index 360db94c..f403686e 100644
27
27
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>"; };
28
28
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>"; };
29
29
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>"; };
30
- @@ -2309 ,6 +2319 ,7 @@
30
+ @@ -2314 ,6 +2324 ,7 @@
31
31
isa = PBXGroup;
32
32
children = (
33
33
A98556842493F901000FD662 /* AlertStore+SimulatedCoreData.swift */,
34
34
+ DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */,
35
35
C1D289B422F90A52003FFBD9 /* BasalDeliveryState.swift */,
36
36
A9F703722489BC8500C98AD8 /* CarbStore+SimulatedCoreData.swift */,
37
37
C17824991E1999FA00D9D25C /* CaseCountable.swift */,
38
- @@ -2395 ,6 +2406 ,7 @@
38
+ @@ -2400 ,6 +2411 ,7 @@
39
39
43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */,
40
40
4311FB9A1F37FE1B00D4C0A7 /* TitleSubtitleTextFieldTableViewCell.swift */,
41
41
C1AF062229426300002C1B19 /* ManualGlucoseEntryRow.swift */,
42
42
+ DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */,
43
43
);
44
44
path = Views;
45
45
sourceTree = "<group>";
46
- @@ -2436 ,6 +2448 ,9 @@
46
+ @@ -2441 ,6 +2453 ,9 @@
47
47
C1F2075B26D6F9B0007AB7EB /* ProfileExpirationAlerter.swift */,
48
48
A96DAC2B2838F31200D94E38 /* SharedLogging.swift */,
49
49
7E69CFFB2A16A77E00203CBD /* ResetLoopManager.swift */,
@@ -53,39 +53,39 @@ index 360db94c..f403686e 100644
53
53
);
54
54
path = Managers;
55
55
sourceTree = "<group>";
56
- @@ -3866 ,6 +3881 ,7 @@
56
+ @@ -3872 ,6 +3887 ,7 @@
57
57
C1201E2C23ECDBD0002DA84A /* WatchContextRequestUserInfo.swift in Sources */,
58
58
1D49795824E7289700948F05 /* ServicesViewModel.swift in Sources */,
59
59
1D4A3E2D2478628500FD601B /* StoredAlert+CoreDataClass.swift in Sources */,
60
60
+ DDC389FA2A2B62470066E2E8 /* ConstantDosingStrategy.swift in Sources */,
61
61
892D7C5123B54A15008A9656 /* CarbEntryViewController.swift in Sources */,
62
62
B4E202302661063E009421B5 /* AutomaticDosingStatus.swift in Sources */,
63
63
C191D2A125B3ACAA00C26C0B /* DosingStrategySelectionView.swift in Sources */,
64
- @@ -3897 ,6 +3913 ,7 @@
64
+ @@ -3903 ,6 +3919 ,7 @@
65
65
1DB619AC270BAD3D006C9D07 /* VersionUpdateViewModel.swift in Sources */,
66
66
A9C62D882331703100535612 /* Service.swift in Sources */,
67
67
89CAB36324C8FE96009EE3CE /* PredictedGlucoseChartView.swift in Sources */,
68
68
+ DDC389F82A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift in Sources */,
69
69
4F6663941E905FD2009E74FC /* ChartColorPalette+Loop.swift in Sources */,
70
70
A9F703732489BC8500C98AD8 /* CarbStore+SimulatedCoreData.swift in Sources */,
71
71
4328E0351CFC0AE100E199AA /* WatchDataManager.swift in Sources */,
72
- @@ -3926 ,6 +3943 ,7 @@
72
+ @@ -3933 ,6 +3950 ,7 @@
73
73
E9B080B1253BDA6300BAD8F8 /* UserDefaults+LoopIntents.swift in Sources */,
74
74
C1AF062329426300002C1B19 /* ManualGlucoseEntryRow.swift in Sources */,
75
75
C148CEE724FD91BD00711B3B /* DeliveryUncertaintyAlertManager.swift in Sources */,
76
76
+ DDC389FC2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift in Sources */,
77
77
1D12D3B92548EFDD00B53E8B /* main.swift in Sources */,
78
78
435400341C9F878D00D5819C /* SetBolusUserInfo.swift in Sources */,
79
79
A9DCF32A25B0FABF00C89088 /* LoopUIColorPalette+Default.swift in Sources */,
80
- @@ -3960 ,6 +3978 ,7 @@
80
+ @@ -3967 ,6 +3985 ,7 @@
81
81
A97F250825E056D500F0EE19 /* OnboardingManager.swift in Sources */,
82
82
438D42F91D7C88BC003244B0 /* PredictionInputEffect.swift in Sources */,
83
83
892A5D692230C41D008961AB /* RangeReplaceableCollection.swift in Sources */,
84
84
+ DDC389F62A2B61750066E2E8 /* ApplicationFactorStrategy.swift in Sources */,
85
85
4F70C2101DE8FAC5006380B7 /* ExtensionDataManager.swift in Sources */,
86
86
43DFB62320D4CAE7008A7BAE /* PumpManager.swift in Sources */,
87
87
A9FB75F1252BE320004C7D3F /* BolusDosingDecision.swift in Sources */,
88
- @@ -3967 ,6 +3986 ,7 @@
88
+ @@ -3974 ,6 +3993 ,7 @@
89
89
431A8C401EC6E8AB00823B9C /* CircleMaskView.swift in Sources */,
90
90
1D05219D2469F1F5000EBBDE /* AlertStore.swift in Sources */,
91
91
439897371CD2F80600223065 /* AnalyticsServicesManager.swift in Sources */,
@@ -235,7 +235,7 @@ index ffc66ee3..1b1bab1f 100644
235
235
@@ -1698,7 +1698,23 @@ extension LoopDataManager {
236
236
return self.delegate?.roundBolusVolume(units: units) ?? units
237
237
}
238
-
238
+
239
239
- let maxAutomaticBolus = min(iobHeadroom, maxBolus! * LoopConstants.bolusPartialApplicationFactor)
240
240
+ // Create dosing strategy based on user setting
241
241
+ let applicationFactorStrategy: ApplicationFactorStrategy = UserDefaults.standard.bool(forKey: "applyExperimentalGlucoseBasedApplicationFactor")
@@ -251,10 +251,10 @@ index ffc66ee3..1b1bab1f 100644
251
251
+ )
252
252
+
253
253
+ self.logger.debug(" *** Glucose: %{public}@, effectiveBolusApplicationFactor: %.2f", glucose.quantity.description, effectiveBolusApplicationFactor)
254
- +
254
+ +
255
255
+ // If a user customizes maxPartialApplicationFactor > 1; this respects maxBolus
256
256
+ let maxAutomaticBolus = min(iobHeadroom, maxBolus! * min(effectiveBolusApplicationFactor, 1.0))
257
-
257
+
258
258
dosingRecommendation = predictedGlucose.recommendedAutomaticDose(
259
259
to: glucoseTargetRange!,
260
260
@@ -1708,7 +1724,7 @@ extension LoopDataManager {
@@ -276,7 +276,7 @@ index ffc66ee3..1b1bab1f 100644
276
276
"",
277
277
diff --git a/Loop/Loop/Views/GlucoseBasedApplicationFactorSelectionView.swift b/Loop/Loop/Views/GlucoseBasedApplicationFactorSelectionView.swift
278
278
new file mode 100644
279
- index 00000000..1e78c81e
279
+ index 00000000..53ff05cd
280
280
--- /dev/null
281
281
+++ b/Loop/Loop/Views/GlucoseBasedApplicationFactorSelectionView.swift
282
282
@@ -0,0 +1,55 @@
@@ -336,17 +336,17 @@ index 00000000..1e78c81e
336
336
+ }
337
337
+ }
338
338
diff --git a/Loop/Loop/Views/SettingsView.swift b/Loop/Loop/Views/SettingsView.swift
339
- index dc3f6ec3..24032203 100644
339
+ index bd4e86e8..c8320e56 100644
340
340
--- a/Loop/Loop/Views/SettingsView.swift
341
341
+++ b/Loop/Loop/Views/SettingsView.swift
342
342
@@ -30,6 +30,7 @@ public struct SettingsView: View {
343
343
@State private var therapySettingsIsPresented: Bool = false
344
344
@State private var deletePumpDataAlertIsPresented = false
345
345
@State private var deleteCGMDataAlertIsPresented = false
346
346
+ @State internal var isGlucoseBasedApplicationFactorEnabled = UserDefaults.standard.bool(forKey: "applyExperimentalGlucoseBasedApplicationFactor")
347
-
347
+
348
348
var localizedAppNameAndVersion: String
349
-
349
+
350
350
@@ -50,6 +51,9 @@ public struct SettingsView: View {
351
351
if FeatureFlags.automaticBolusEnabled {
352
352
dosingStrategySection
0 commit comments