1
1
Submodule Loop contains modified content
2
- Submodule Loop 6e822fd..6c13724 :
2
+ Submodule Loop 0258326..f083293 :
3
3
diff --git a/Loop/Loop.xcodeproj/project.pbxproj b/Loop/Loop.xcodeproj/project.pbxproj
4
- index 9c95453a..5f46c3d4 100644
4
+ index ba7f9464..b2efab9c 100644
5
5
--- a/Loop/Loop.xcodeproj/project.pbxproj
6
6
+++ b/Loop/Loop.xcodeproj/project.pbxproj
7
- @@ -517,6 +517,11 @@
8
- C1FB428D21791D2500FAB378 /* PumpManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C3B6F620BBCAA30026CAFA /* PumpManager.swift */; };
9
- C1FB428F217921D600FAB378 /* PumpManagerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FB428E217921D600FAB378 /* PumpManagerUI.swift */; };
7
+ @@ -520,6 +520,10 @@
10
8
C1FB4290217922A100FAB378 /* PumpManagerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FB428E217921D600FAB378 /* PumpManagerUI.swift */; };
9
+ DD3DBD272A33AEC8000F8B5B /* SettingsView+algorithmExperimentsSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3DBD262A33AEC8000F8B5B /* SettingsView+algorithmExperimentsSection.swift */; };
10
+ DD3DBD292A33AFE9000F8B5B /* IntegralRetrospectiveCorrectionSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3DBD282A33AFE9000F8B5B /* IntegralRetrospectiveCorrectionSelectionView.swift */; };
11
11
+ DDC389F62A2B61750066E2E8 /* ApplicationFactorStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */; };
12
12
+ DDC389F82A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389F72A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift */; };
13
13
+ DDC389FA2A2B62470066E2E8 /* ConstantDosingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389F92A2B62470066E2E8 /* ConstantDosingStrategy.swift */; };
14
- + DDC389FC2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */; };
15
14
+ DDC389FE2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */; };
16
15
E90909D124E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CC24E34AC500F963D2 /* high_and_rising_with_cob_momentum_effect.json */; };
17
16
E90909D224E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CD24E34AC500F963D2 /* high_and_rising_with_cob_insulin_effect.json */; };
18
17
E90909D324E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json in Resources */ = {isa = PBXBuildFile; fileRef = E90909CE24E34AC500F963D2 /* high_and_rising_with_cob_predicted_glucose.json */; };
19
- @@ -1685,6 +1690,11 @@
20
- C1FF3D4B29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
21
- C1FF3D4C29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Localizable.strings; sourceTree = "<group>"; };
18
+ @@ -1691,6 +1695,10 @@
22
19
C1FF3D4D29C786A900BDC1EC /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/InfoPlist.strings; sourceTree = "<group>"; };
20
+ DD3DBD262A33AEC8000F8B5B /* SettingsView+algorithmExperimentsSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SettingsView+algorithmExperimentsSection.swift"; sourceTree = "<group>"; };
21
+ DD3DBD282A33AFE9000F8B5B /* IntegralRetrospectiveCorrectionSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntegralRetrospectiveCorrectionSelectionView.swift; sourceTree = "<group>"; };
23
22
+ DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationFactorStrategy.swift; sourceTree = "<group>"; };
24
23
+ DDC389F72A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlucoseBasedApplicationFactorStrategy.swift; sourceTree = "<group>"; };
25
24
+ DDC389F92A2B62470066E2E8 /* ConstantDosingStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstantDosingStrategy.swift; sourceTree = "<group>"; };
26
- + DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SettingsView+algorithmExperimentsSection.swift"; sourceTree = "<group>"; };
27
25
+ DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlucoseBasedApplicationFactorSelectionView.swift; sourceTree = "<group>"; };
28
26
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>"; };
29
27
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>"; };
30
28
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>"; };
31
- @@ -2312,6 +2322,7 @@
32
- isa = PBXGroup;
33
- children = (
34
- A98556842493F901000FD662 /* AlertStore+SimulatedCoreData.swift */,
35
- + DDC389FB2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift */,
36
- C1D289B422F90A52003FFBD9 /* BasalDeliveryState.swift */,
37
- A9F703722489BC8500C98AD8 /* CarbStore+SimulatedCoreData.swift */,
38
- C17824991E1999FA00D9D25C /* CaseCountable.swift */,
39
- @@ -2398,6 +2409,7 @@
40
- 43F64DD81D9C92C900D24DC6 /* TitleSubtitleTableViewCell.swift */,
29
+ @@ -2407,6 +2415,7 @@
41
30
4311FB9A1F37FE1B00D4C0A7 /* TitleSubtitleTextFieldTableViewCell.swift */,
42
31
C1AF062229426300002C1B19 /* ManualGlucoseEntryRow.swift */,
32
+ DD3DBD282A33AFE9000F8B5B /* IntegralRetrospectiveCorrectionSelectionView.swift */,
43
33
+ DDC389FD2A2C4C830066E2E8 /* GlucoseBasedApplicationFactorSelectionView.swift */,
44
34
);
45
35
path = Views;
46
36
sourceTree = "<group>";
47
- @@ -2439 ,6 +2451 ,9 @@
37
+ @@ -2448 ,6 +2457 ,9 @@
48
38
C1F2075B26D6F9B0007AB7EB /* ProfileExpirationAlerter.swift */,
49
39
A96DAC2B2838F31200D94E38 /* SharedLogging.swift */,
50
40
7E69CFFB2A16A77E00203CBD /* ResetLoopManager.swift */,
@@ -54,39 +44,31 @@ index 9c95453a..5f46c3d4 100644
54
44
);
55
45
path = Managers;
56
46
sourceTree = "<group>";
57
- @@ -3870 ,6 +3885 ,7 @@
47
+ @@ -3880 ,6 +3892 ,7 @@
58
48
C1201E2C23ECDBD0002DA84A /* WatchContextRequestUserInfo.swift in Sources */,
59
49
1D49795824E7289700948F05 /* ServicesViewModel.swift in Sources */,
60
50
1D4A3E2D2478628500FD601B /* StoredAlert+CoreDataClass.swift in Sources */,
61
51
+ DDC389FA2A2B62470066E2E8 /* ConstantDosingStrategy.swift in Sources */,
62
52
892D7C5123B54A15008A9656 /* CarbEntryViewController.swift in Sources */,
63
53
B4E202302661063E009421B5 /* AutomaticDosingStatus.swift in Sources */,
64
54
C191D2A125B3ACAA00C26C0B /* DosingStrategySelectionView.swift in Sources */,
65
- @@ -3901 ,6 +3917 ,7 @@
55
+ @@ -3913 ,6 +3926 ,7 @@
66
56
1DB619AC270BAD3D006C9D07 /* VersionUpdateViewModel.swift in Sources */,
67
57
A9C62D882331703100535612 /* Service.swift in Sources */,
68
58
89CAB36324C8FE96009EE3CE /* PredictedGlucoseChartView.swift in Sources */,
69
59
+ DDC389F82A2B620B0066E2E8 /* GlucoseBasedApplicationFactorStrategy.swift in Sources */,
70
60
4F6663941E905FD2009E74FC /* ChartColorPalette+Loop.swift in Sources */,
71
61
A9F703732489BC8500C98AD8 /* CarbStore+SimulatedCoreData.swift in Sources */,
72
62
4328E0351CFC0AE100E199AA /* WatchDataManager.swift in Sources */,
73
- @@ -3930,6 +3947,7 @@
74
- E9B080B1253BDA6300BAD8F8 /* UserDefaults+LoopIntents.swift in Sources */,
75
- C1AF062329426300002C1B19 /* ManualGlucoseEntryRow.swift in Sources */,
76
- C148CEE724FD91BD00711B3B /* DeliveryUncertaintyAlertManager.swift in Sources */,
77
- + DDC389FC2A2BC6670066E2E8 /* SettingsView+algorithmExperimentsSection.swift in Sources */,
78
- 1D12D3B92548EFDD00B53E8B /* main.swift in Sources */,
79
- 435400341C9F878D00D5819C /* SetBolusUserInfo.swift in Sources */,
80
- A9DCF32A25B0FABF00C89088 /* LoopUIColorPalette+Default.swift in Sources */,
81
- @@ -3964,6 +3982,7 @@
63
+ @@ -3976,6 +3990,7 @@
82
64
A97F250825E056D500F0EE19 /* OnboardingManager.swift in Sources */,
83
65
438D42F91D7C88BC003244B0 /* PredictionInputEffect.swift in Sources */,
84
66
892A5D692230C41D008961AB /* RangeReplaceableCollection.swift in Sources */,
85
67
+ DDC389F62A2B61750066E2E8 /* ApplicationFactorStrategy.swift in Sources */,
86
68
4F70C2101DE8FAC5006380B7 /* ExtensionDataManager.swift in Sources */,
87
69
43DFB62320D4CAE7008A7BAE /* PumpManager.swift in Sources */,
88
70
A9FB75F1252BE320004C7D3F /* BolusDosingDecision.swift in Sources */,
89
- @@ -3971 ,6 +3990 ,7 @@
71
+ @@ -3983 ,6 +3998 ,7 @@
90
72
431A8C401EC6E8AB00823B9C /* CircleMaskView.swift in Sources */,
91
73
1D05219D2469F1F5000EBBDE /* AlertStore.swift in Sources */,
92
74
439897371CD2F80600223065 /* AnalyticsServicesManager.swift in Sources */,
@@ -95,37 +77,40 @@ index 9c95453a..5f46c3d4 100644
95
77
895FE0952201234000FCF18A /* OverrideSelectionViewController.swift in Sources */,
96
78
C1EF747228D6A44A00C8C083 /* CrashRecoveryManager.swift in Sources */,
97
79
diff --git a/Loop/Loop/Extensions/SettingsView+algorithmExperimentsSection.swift b/Loop/Loop/Extensions/SettingsView+algorithmExperimentsSection.swift
98
- new file mode 100644
99
- index 00000000..811a2f33
100
- --- /dev/null
80
+ index b6f07ba1..b3a5091e 100644
81
+ --- a/Loop/Loop/Extensions/SettingsView+algorithmExperimentsSection.swift
101
82
+++ b/Loop/Loop/Extensions/SettingsView+algorithmExperimentsSection.swift
102
- @@ -0,0 +1,26 @@
103
- + //
104
- + // SettingsView+algorithmExperimentsSection.swift
105
- + // Loop
106
- + //
107
- + // Created by Jonas Björkert on 2023-06-03.
108
- + // Copyright © 2023 LoopKit Authors. All rights reserved.
109
- + //
110
- +
111
- + import Foundation
112
- + import SwiftUI
113
- + import LoopKitUI
114
- +
115
- + extension SettingsView {
116
- + internal var algorithmExperimentsSection: some View {
117
- + Section(header: SectionHeader(label: NSLocalizedString("Algorithm Experiments ⚠️", comment: "The title of the Algorithm Experiments section in settings"))) {
83
+ @@ -5,6 +5,7 @@
84
+ // Created by Jonas Björkert on 2023-06-03.
85
+ // Copyright © 2023 LoopKit Authors. All rights reserved.
86
+ //
118
87
+
88
+ import Foundation
89
+ import SwiftUI
90
+ import LoopKitUI
91
+ @@ -12,7 +13,13 @@ import LoopKitUI
92
+ extension SettingsView {
93
+ internal var algorithmExperimentsSection: some View {
94
+ Section(header: SectionHeader(label: NSLocalizedString("Algorithm Experiments ⚠️", comment: "The title of the Algorithm Experiments section in settings"))) {
95
+ -
119
96
+ NavigationLink(destination: GlucoseBasedApplicationFactorSelectionView(isGlucoseBasedApplicationFactorEnabled: $isGlucoseBasedApplicationFactorEnabled)) {
120
97
+ HStack {
121
98
+ Text("Glucose Based Partial Application")
122
99
+ Spacer()
123
100
+ Text(isGlucoseBasedApplicationFactorEnabled ? "On" : "Off")
124
101
+ }
125
102
+ }
103
+ NavigationLink(destination: IntegralRetrospectiveCorrectionSelectionView(isIntegralRetrospectiveCorrectionEnabled: $isIntegralRetrospectiveCorrectionEnabled)) {
104
+ HStack {
105
+ Text("Integral Retrospective Correction")
106
+ @@ -20,6 +27,6 @@ extension SettingsView {
107
+ Text(isIntegralRetrospectiveCorrectionEnabled ? "On" : "Off")
108
+ }
109
+ }
110
+ - }
126
111
+ }
127
- + }
128
- + }
112
+ }
113
+ }
129
114
diff --git a/Loop/Loop/Managers/ApplicationFactorStrategy.swift b/Loop/Loop/Managers/ApplicationFactorStrategy.swift
130
115
new file mode 100644
131
116
index 00000000..bf67935c
@@ -239,7 +224,7 @@ index 00000000..41caa3d7
239
224
+ }
240
225
+ }
241
226
diff --git a/Loop/Loop/Managers/LoopDataManager.swift b/Loop/Loop/Managers/LoopDataManager.swift
242
- index 085b2420..1b1bab1f 100644
227
+ index 7db36fc7..8133aa84 100644
243
228
--- a/Loop/Loop/Managers/LoopDataManager.swift
244
229
+++ b/Loop/Loop/Managers/LoopDataManager.swift
245
230
@@ -1692,42 +1692,29 @@ extension LoopDataManager {
@@ -320,7 +305,7 @@ index 085b2420..1b1bab1f 100644
320
305
321
306
let temp = predictedGlucose.recommendedTempBasal(
322
307
to: glucoseTargetRange!,
323
- @@ -2157 ,6 +2144 ,7 @@ extension LoopDataManager {
308
+ @@ -2159 ,6 +2146 ,7 @@ extension LoopDataManager {
324
309
"insulinOnBoard: \(String(describing: manager.insulinOnBoard))",
325
310
"error: \(String(describing: state.error))",
326
311
"overrideInUserDefaults: \(String(describing: UserDefaults.appGroup?.intentExtensionOverrideToSet))",
@@ -390,27 +375,19 @@ index 00000000..1e78c81e
390
375
+ }
391
376
+ }
392
377
diff --git a/Loop/Loop/Views/SettingsView.swift b/Loop/Loop/Views/SettingsView.swift
393
- index dc3f6ec3..24032203 100644
378
+ index 2615596c..12255a62 100644
394
379
--- a/Loop/Loop/Views/SettingsView.swift
395
380
+++ b/Loop/Loop/Views/SettingsView.swift
396
- @@ -30,6 +30,7 @@ public struct SettingsView: View {
397
- @State private var therapySettingsIsPresented: Bool = false
381
+ @@ -31,7 +31,8 @@ public struct SettingsView: View {
398
382
@State private var deletePumpDataAlertIsPresented = false
399
383
@State private var deleteCGMDataAlertIsPresented = false
384
+ @State internal var isIntegralRetrospectiveCorrectionEnabled = UserDefaults.standard.bool(forKey: "isExperimentalIntegralRetrospectiveCorrectionEnabled")
385
+ -
400
386
+ @State internal var isGlucoseBasedApplicationFactorEnabled = UserDefaults.standard.bool(forKey: "applyExperimentalGlucoseBasedApplicationFactor")
401
-
387
+ +
402
388
var localizedAppNameAndVersion: String
403
389
404
- @@ -50,6 +51,9 @@ public struct SettingsView: View {
405
- if FeatureFlags.automaticBolusEnabled {
406
- dosingStrategySection
407
- }
408
- + // Note: Experimental Section
409
- + algorithmExperimentsSection
410
- + //
411
- alertManagementSection
412
- if viewModel.pumpManagerSettingsViewModel.isSetUp() {
413
- configurationSection
390
+ public init(viewModel: SettingsViewModel, localizedAppNameAndVersion: String) {
414
391
diff --git a/Loop/Settings.bundle/Root.plist b/Loop/Settings.bundle/Root.plist
415
392
index a176bd16..0df628c0 100644
416
393
--- a/Loop/Settings.bundle/Root.plist
0 commit comments