Skip to content

Commit 76da0ce

Browse files
Add AutoPresets: activity-based preset automation
Automatically activates insulin override presets during walking/running via CoreMotion pedometer and activity classifier. Feature-flagged off by default (AutoPresets_FeatureFlags.isEnabled). 8 new files in AutoPresets/ subdirectories, 2 existing files modified (LoopDataManager delegate + SettingsView navigation link).
1 parent c044b52 commit 76da0ce

File tree

11 files changed

+2192
-7
lines changed

11 files changed

+2192
-7
lines changed

Loop.xcodeproj/project.pbxproj

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
B9D78BD57F35DBCFEC65530D /* AutoPresets_Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31B2D28F4F6C8955AB18A98C /* AutoPresets_Coordinator.swift */; };
11+
BACF15F57C2B75D78B797778 /* AutoPresets_Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D17206C8109E75D64068F3D1 /* AutoPresets_Delegate.swift */; };
12+
B1F90AD96E591453CF003AC2 /* AutoPresets_Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = F92C032F72116EA4C06250F9 /* AutoPresets_Logger.swift */; };
13+
211A65C85F6FEC59ED083F2D /* AutoPresets_Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EED74A3E39956E5218453D1 /* AutoPresets_Storage.swift */; };
14+
0556C20E91536D540ED3D91E /* AutoPresets_ActivityDetectionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58CA1221236A70935E684238 /* AutoPresets_ActivityDetectionManager.swift */; };
15+
FFF05E4789A2D06526EB0A24 /* AutoPresets_SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177A32DF2F91D26776BF2C7F /* AutoPresets_SettingsView.swift */; };
16+
232E357E321361C66498FEEA /* AutoPresets_Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D90E77F7FA3F7557C52EA5B /* AutoPresets_Models.swift */; };
17+
13992ED79F79937110B6BFCD /* AutoPresets_FeatureFlags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 593F5B3264F8383861CE3027 /* AutoPresets_FeatureFlags.swift */; };
1018
1419606428D9550400BA86E0 /* LoopKitUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437AFEE6203688CF008C4892 /* LoopKitUI.framework */; };
1119
1419606928D9554E00BA86E0 /* LoopKitUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 437AFEE6203688CF008C4892 /* LoopKitUI.framework */; };
1220
1419606A28D955BC00BA86E0 /* MockKitUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C101947127DD473C004E7EB8 /* MockKitUI.framework */; };
@@ -758,6 +766,14 @@
758766
/* End PBXCopyFilesBuildPhase section */
759767

760768
/* Begin PBXFileReference section */
769+
31B2D28F4F6C8955AB18A98C /* AutoPresets_Coordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_Coordinator.swift; sourceTree = "<group>"; };
770+
D17206C8109E75D64068F3D1 /* AutoPresets_Delegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_Delegate.swift; sourceTree = "<group>"; };
771+
F92C032F72116EA4C06250F9 /* AutoPresets_Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_Logger.swift; sourceTree = "<group>"; };
772+
1EED74A3E39956E5218453D1 /* AutoPresets_Storage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_Storage.swift; sourceTree = "<group>"; };
773+
58CA1221236A70935E684238 /* AutoPresets_ActivityDetectionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_ActivityDetectionManager.swift; sourceTree = "<group>"; };
774+
177A32DF2F91D26776BF2C7F /* AutoPresets_SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_SettingsView.swift; sourceTree = "<group>"; };
775+
2D90E77F7FA3F7557C52EA5B /* AutoPresets_Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_Models.swift; sourceTree = "<group>"; };
776+
593F5B3264F8383861CE3027 /* AutoPresets_FeatureFlags.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoPresets_FeatureFlags.swift; sourceTree = "<group>"; };
761777
142CB7582A60BF2E0075748A /* EditMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EditMode.swift; sourceTree = "<group>"; };
762778
142CB75A2A60BFC30075748A /* FavoriteFoodsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FavoriteFoodsView.swift; sourceTree = "<group>"; };
763779
1452F4A82A851C9400F8B9E4 /* AddEditFavoriteFoodViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddEditFavoriteFoodViewModel.swift; sourceTree = "<group>"; };
@@ -1520,6 +1536,50 @@
15201536
/* End PBXFrameworksBuildPhase section */
15211537

15221538
/* Begin PBXGroup section */
1539+
7B0AE0D9D2D919C6882C0799 /* AutoPresets */ = {
1540+
isa = PBXGroup;
1541+
children = (
1542+
31B2D28F4F6C8955AB18A98C /* AutoPresets_Coordinator.swift */,
1543+
D17206C8109E75D64068F3D1 /* AutoPresets_Delegate.swift */,
1544+
F92C032F72116EA4C06250F9 /* AutoPresets_Logger.swift */,
1545+
1EED74A3E39956E5218453D1 /* AutoPresets_Storage.swift */,
1546+
58CA1221236A70935E684238 /* AutoPresets_ActivityDetectionManager.swift */,
1547+
);
1548+
path = AutoPresets;
1549+
sourceTree = "<group>";
1550+
};
1551+
E018293E3B1A901519B37E05 /* AutoPresets */ = {
1552+
isa = PBXGroup;
1553+
children = (
1554+
177A32DF2F91D26776BF2C7F /* AutoPresets_SettingsView.swift */,
1555+
);
1556+
path = AutoPresets;
1557+
sourceTree = "<group>";
1558+
};
1559+
137AA12EFF968E58FEC07BF3 /* AutoPresets */ = {
1560+
isa = PBXGroup;
1561+
children = (
1562+
2D90E77F7FA3F7557C52EA5B /* AutoPresets_Models.swift */,
1563+
);
1564+
path = AutoPresets;
1565+
sourceTree = "<group>";
1566+
};
1567+
F37727DBE886D7AF624C93AE /* AutoPresets */ = {
1568+
isa = PBXGroup;
1569+
children = (
1570+
593F5B3264F8383861CE3027 /* AutoPresets_FeatureFlags.swift */,
1571+
);
1572+
path = AutoPresets;
1573+
sourceTree = "<group>";
1574+
};
1575+
6D8BAA86B3F7DFB7735A618B /* Resources */ = {
1576+
isa = PBXGroup;
1577+
children = (
1578+
F37727DBE886D7AF624C93AE /* AutoPresets */,
1579+
);
1580+
path = Resources;
1581+
sourceTree = "<group>";
1582+
};
15231583
14B1736128AED9EC006CCD7C /* Loop Widget Extension */ = {
15241584
isa = PBXGroup;
15251585
children = (
@@ -1656,7 +1716,8 @@
16561716
43757D131C06F26C00910CB9 /* Models */ = {
16571717
isa = PBXGroup;
16581718
children = (
1659-
DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */,
1719+
1720+
137AA12EFF968E58FEC07BF3 /* AutoPresets */, DDC389F52A2B61750066E2E8 /* ApplicationFactorStrategy.swift */,
16601721
B4E2022F2661063E009421B5 /* AutomaticDosingStatus.swift */,
16611722
A9FB75F0252BE320004C7D3F /* BolusDosingDecision.swift */,
16621723
DDC389F92A2B62470066E2E8 /* ConstantApplicationFactorStrategy.swift */,
@@ -1722,7 +1783,8 @@
17221783
43776F8E1B8022E90074EA36 /* Loop */ = {
17231784
isa = PBXGroup;
17241785
children = (
1725-
C16DA84022E8E104008624C2 /* Plugins */,
1786+
1787+
6D8BAA86B3F7DFB7735A618B /* Resources */, C16DA84022E8E104008624C2 /* Plugins */,
17261788
B66D1F322E6A5D6600471149 /* Localizable.xcstrings */,
17271789
B66D1F382E6A5D6600471149 /* InfoPlist.xcstrings */,
17281790
43EDEE6B1CF2E12A00393BE3 /* Loop.entitlements */,
@@ -1960,7 +2022,8 @@
19602022
43F5C2CF1B92A2ED003EB13D /* Views */ = {
19612023
isa = PBXGroup;
19622024
children = (
1963-
1452F4AA2A851EDF00F8B9E4 /* AddEditFavoriteFoodView.swift */,
2025+
2026+
E018293E3B1A901519B37E05 /* AutoPresets */, 1452F4AA2A851EDF00F8B9E4 /* AddEditFavoriteFoodView.swift */,
19642027
B4001CED28CBBC82002FB414 /* AlertManagementView.swift */,
19652028
897A5A9524C2175B00C4E71D /* BolusEntryView.swift */,
19662029
C1F8B1D122375E4200DD66CF /* BolusProgressTableViewCell.swift */,
@@ -2001,7 +2064,8 @@
20012064
43F5C2E41B93C5D4003EB13D /* Managers */ = {
20022065
isa = PBXGroup;
20032066
children = (
2004-
B42D124228D371C400E43D22 /* AlertMuter.swift */,
2067+
2068+
7B0AE0D9D2D919C6882C0799 /* AutoPresets */, B42D124228D371C400E43D22 /* AlertMuter.swift */,
20052069
1D6B1B6626866D89009AC446 /* AlertPermissionsChecker.swift */,
20062070
439897361CD2F80600223065 /* AnalyticsServicesManager.swift */,
20072071
B4F3D25024AF890C0095CE44 /* BluetoothStateManager.swift */,
@@ -3378,7 +3442,15 @@
33783442
isa = PBXSourcesBuildPhase;
33793443
buildActionMask = 2147483647;
33803444
files = (
3381-
C17824A51E1AD4D100D9D25C /* ManualBolusRecommendation.swift in Sources */,
3445+
3446+
B9D78BD57F35DBCFEC65530D /* AutoPresets_Coordinator.swift in Sources */,
3447+
BACF15F57C2B75D78B797778 /* AutoPresets_Delegate.swift in Sources */,
3448+
B1F90AD96E591453CF003AC2 /* AutoPresets_Logger.swift in Sources */,
3449+
211A65C85F6FEC59ED083F2D /* AutoPresets_Storage.swift in Sources */,
3450+
0556C20E91536D540ED3D91E /* AutoPresets_ActivityDetectionManager.swift in Sources */,
3451+
FFF05E4789A2D06526EB0A24 /* AutoPresets_SettingsView.swift in Sources */,
3452+
232E357E321361C66498FEEA /* AutoPresets_Models.swift in Sources */,
3453+
13992ED79F79937110B6BFCD /* AutoPresets_FeatureFlags.swift in Sources */, C17824A51E1AD4D100D9D25C /* ManualBolusRecommendation.swift in Sources */,
33823454
897A5A9624C2175B00C4E71D /* BolusEntryView.swift in Sources */,
33833455
4F70C2131DE90339006380B7 /* StatusExtensionContext.swift in Sources */,
33843456
A9A056B324B93C62007CF06D /* CriticalEventLogExportView.swift in Sources */,

0 commit comments

Comments
 (0)