Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
71e5617
[COASTAL-1291] plugin identifier is no longer class property (#5)
nhamming Sep 25, 2023
0a6fbb4
[COASTAL-1291] plugin identifier is no longer class property (#5)
nhamming Sep 25, 2023
ace294d
Merge remote-tracking branch 'origin/main' into ps2/LOOP-4735/cgm-eve…
ps2 Sep 27, 2023
1f2cb0f
Merge remote-tracking branch 'origin/main' into ps2/LOOP-4735/cgm-eve…
ps2 Sep 27, 2023
40cf9d2
Merge pull request #6 from tidepool-org/ps2/LOOP-4735/cgm-event-store
ps2 Sep 27, 2023
23f4982
Merge pull request #6 from tidepool-org/ps2/LOOP-4735/cgm-event-store
ps2 Sep 27, 2023
f153705
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
7e78573
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
0149e96
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
b8db47c
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
12fb306
[LOOP-4801] adding pump inoperable (#8)
nhamming Jun 7, 2024
5628aae
[LOOP-4801] adding pump inoperable (#8)
nhamming Jun 7, 2024
f3ac460
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 21, 2024
159da13
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 21, 2024
e653d6e
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 22, 2024
7bea3c9
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 22, 2024
dd8c0f6
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Dec 4, 2024
65dda59
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Dec 4, 2024
7391f12
Bump to iOS 17
Camji55 Dec 6, 2024
703e641
Bump to iOS 17
Camji55 Dec 6, 2024
f20ff99
Bump to iOS 17
Camji55 Dec 9, 2024
08a287c
Bump to iOS 17
Camji55 Dec 9, 2024
e035d44
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 2, 2025
fae27e2
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 2, 2025
e3c6dbb
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 6, 2025
2f4dd16
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 6, 2025
14f8c97
async updates
ps2 Jul 3, 2025
65f3d69
async updates
ps2 Jul 3, 2025
0e4b7f0
Changes for protocol updates
ps2 Jul 24, 2025
9b39c09
Changes for protocol updates
ps2 Jul 24, 2025
bd02fbc
Merge pull request #12 from tidepool-org/ps2/LOOP-5235/enable-schedul…
ps2 Jul 29, 2025
c6852c8
Merge pull request #12 from tidepool-org/ps2/LOOP-5235/enable-schedul…
ps2 Jul 29, 2025
b0d078d
[LOOP-5496] adding loop status checks (#13)
nhamming Oct 24, 2025
b10922b
[LOOP-5496] adding loop status checks (#13)
nhamming Oct 24, 2025
f1de48a
[LOOP-5743] using pumpStatusHighlight (#14)
nhamming Feb 6, 2026
8992228
[LOOP-5743] using pumpStatusHighlight (#14)
nhamming Feb 6, 2026
a5897b9
Merge tidepool/main into tidepool-sync/2026-03-10
loopkitdev Mar 10, 2026
aa07d3e
Fix Swift 6 compile errors: private(set) whitespace, completion(nil) …
loopkitdev Mar 25, 2026
924f10d
Fix reentrant lock crash in isSignalLost
loopkitdev Mar 26, 2026
fc0c5a5
Merge remote-tracking branch 'upstream/main' into tidepool-sync/2026-…
loopkitdev Apr 9, 2026
0d81565
Merge tidepool/main into tidepool-sync/2026-05-11
ps2 May 11, 2026
52d2f41
OmnipodPumpManager: revert 3 stray mutateState back to setState
ps2 May 11, 2026
e5fad99
Report pod faults as pump events
May 21, 2026
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
12 changes: 2 additions & 10 deletions OmniKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,11 @@
C12EDA0429C7DDC800435701 /* TimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0329C7DDC800435701 /* TimeInterval.swift */; };
C12EDA0629C7DE2500435701 /* TimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0529C7DE2500435701 /* TimeZone.swift */; };
C12EDA0829C7DE6200435701 /* NumberFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0729C7DE6200435701 /* NumberFormatter.swift */; };
C12EDA0A29C7DEAA00435701 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0929C7DEAA00435701 /* HKUnit.swift */; };
C12EDA0C29C7DED000435701 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0B29C7DED000435701 /* LocalizedString.swift */; };
C12EDA0E29C7DEFD00435701 /* NumberFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0D29C7DEFD00435701 /* NumberFormatter.swift */; };
C12EDA1029C7DF1900435701 /* NibLoadable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA0F29C7DF1900435701 /* NibLoadable.swift */; };
C12EDA1229C7DF4B00435701 /* IdentifiableClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA1129C7DF4B00435701 /* IdentifiableClass.swift */; };
C12EDA1429C7DFBF00435701 /* TimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA1329C7DFBF00435701 /* TimeInterval.swift */; };
C12EDA1629C7DFF100435701 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA1529C7DFF100435701 /* HKUnit.swift */; };
C12EDA1829C7E01800435701 /* TimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA1729C7E01800435701 /* TimeZone.swift */; };
C12EDA1B29C7E06900435701 /* OSLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12EDA1A29C7E06900435701 /* OSLog.swift */; };
D80339732A500489004FF953 /* PodInfoPulseLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = C124017E29C7D8E900B32844 /* PodInfoPulseLog.swift */; };
Expand Down Expand Up @@ -401,13 +399,11 @@
C12EDA0329C7DDC800435701 /* TimeInterval.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeInterval.swift; sourceTree = "<group>"; };
C12EDA0529C7DE2500435701 /* TimeZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeZone.swift; sourceTree = "<group>"; };
C12EDA0729C7DE6200435701 /* NumberFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberFormatter.swift; sourceTree = "<group>"; };
C12EDA0929C7DEAA00435701 /* HKUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKUnit.swift; sourceTree = "<group>"; };
C12EDA0B29C7DED000435701 /* LocalizedString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedString.swift; sourceTree = "<group>"; };
C12EDA0D29C7DEFD00435701 /* NumberFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberFormatter.swift; sourceTree = "<group>"; };
C12EDA0F29C7DF1900435701 /* NibLoadable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NibLoadable.swift; sourceTree = "<group>"; };
C12EDA1129C7DF4B00435701 /* IdentifiableClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdentifiableClass.swift; sourceTree = "<group>"; };
C12EDA1329C7DFBF00435701 /* TimeInterval.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeInterval.swift; sourceTree = "<group>"; };
C12EDA1529C7DFF100435701 /* HKUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKUnit.swift; sourceTree = "<group>"; };
C12EDA1729C7E01800435701 /* TimeZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeZone.swift; sourceTree = "<group>"; };
C12EDA1A29C7E06900435701 /* OSLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSLog.swift; sourceTree = "<group>"; };
D845A1342AF89DEC00EA0853 /* SilencePodPreference.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SilencePodPreference.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -529,7 +525,6 @@
C12EDA0329C7DDC800435701 /* TimeInterval.swift */,
C12EDA0529C7DE2500435701 /* TimeZone.swift */,
C12EDA0729C7DE6200435701 /* NumberFormatter.swift */,
C12EDA0929C7DEAA00435701 /* HKUnit.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -671,7 +666,6 @@
C12EDA0F29C7DF1900435701 /* NibLoadable.swift */,
C12EDA1129C7DF4B00435701 /* IdentifiableClass.swift */,
C12EDA1329C7DFBF00435701 /* TimeInterval.swift */,
C12EDA1529C7DFF100435701 /* HKUnit.swift */,
C12EDA1729C7E01800435701 /* TimeZone.swift */,
);
path = Extensions;
Expand Down Expand Up @@ -1155,7 +1149,6 @@
C12401EB29C7D8E900B32844 /* Packet.swift in Sources */,
C12401C029C7D8E900B32844 /* PlaceholderMessageBlock.swift in Sources */,
C12401BA29C7D8E900B32844 /* PodInfoActivationTime.swift in Sources */,
C12EDA0A29C7DEAA00435701 /* HKUnit.swift in Sources */,
C12401C229C7D8E900B32844 /* BolusExtraCommand.swift in Sources */,
C12401E929C7D8E900B32844 /* Packet+RFPacket.swift in Sources */,
C12401E729C7D8E900B32844 /* OmnipodPumpManager.swift in Sources */,
Expand Down Expand Up @@ -1227,7 +1220,6 @@
C124028629C7DA9700B32844 /* NotificationSettingsView.swift in Sources */,
C124027D29C7DA9700B32844 /* InsertCannulaView.swift in Sources */,
C12EDA0C29C7DED000435701 /* LocalizedString.swift in Sources */,
C12EDA1629C7DFF100435701 /* HKUnit.swift in Sources */,
C12EDA1829C7E01800435701 /* TimeZone.swift in Sources */,
C124026D29C7DA9700B32844 /* Image.swift in Sources */,
C124028E29C7DA9700B32844 /* ScheduledExpirationReminderEditView.swift in Sources */,
Expand Down Expand Up @@ -1375,7 +1367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
LOCALIZED_STRING_MACRO_NAMES = (
NSLocalizedString,
Expand Down Expand Up @@ -1441,7 +1433,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
LOCALIZED_STRING_MACRO_NAMES = (
NSLocalizedString,
Expand Down
24 changes: 0 additions & 24 deletions OmniKit/Extensions/HKUnit.swift

This file was deleted.

6 changes: 3 additions & 3 deletions OmniKit/OmnipodCommon/PumpManagerAlert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//

import Foundation
import LoopAlgorithm
import LoopKit
import HealthKit

public enum PumpManagerAlert: Hashable {
case podExpireImminent(triggeringSlot: AlertSlot?)
Expand Down Expand Up @@ -70,8 +70,8 @@ public enum PumpManagerAlert: Hashable {
case .podExpireImminent:
return LocalizedString("Change Pod now. Insulin delivery will stop in 1 hour.", comment: "Alert content body for podExpireImminent pod alert")
case .lowReservoir(_, let lowReservoirReminderValue):
let quantityFormatter = QuantityFormatter(for: .internationalUnit())
let valueString = quantityFormatter.string(from: HKQuantity(unit: .internationalUnit(), doubleValue: lowReservoirReminderValue)) ?? String(describing: lowReservoirReminderValue)
let quantityFormatter = QuantityFormatter(for: .internationalUnit)
let valueString = quantityFormatter.string(from: LoopQuantity(unit: .internationalUnit, doubleValue: lowReservoirReminderValue)) ?? String(describing: lowReservoirReminderValue)
return String(format: LocalizedString("%1$@ insulin or less remaining in Pod. Change Pod soon.", comment: "Format string for alert content body for lowReservoir pod alert. (1: reminder value)"), valueString)
case .suspendInProgress:
return LocalizedString("Suspend In Progress Reminder", comment: "Alert content body for suspendInProgress pod alert")
Expand Down
19 changes: 15 additions & 4 deletions OmniKit/OmnipodCommon/UnfinalizedDose.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
var isHighTemp: Bool = false // Track this for situations where cancelling temp basal is unacknowledged, and recovery fails, and we have to assume the most possible delivery
var insulinType: InsulinType?

var decisionId: UUID?

var finishTime: Date? {
get {
return duration != nil ? startTime.addingTimeInterval(duration!) : nil
Expand Down Expand Up @@ -101,7 +103,8 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
return units
}

init(bolusAmount: Double, startTime: Date, scheduledCertainty: ScheduledCertainty, insulinType: InsulinType, automatic: Bool = false) {
init(decisionId: UUID?, bolusAmount: Double, startTime: Date, scheduledCertainty: ScheduledCertainty, insulinType: InsulinType, automatic: Bool = false) {
self.decisionId = decisionId
self.doseType = .bolus
self.units = bolusAmount
self.startTime = startTime
Expand All @@ -112,7 +115,8 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
self.insulinType = insulinType
}

init(tempBasalRate: Double, startTime: Date, duration: TimeInterval, isHighTemp: Bool, automatic: Bool, scheduledCertainty: ScheduledCertainty, insulinType: InsulinType) {
init(decisionId: UUID?, tempBasalRate: Double, startTime: Date, duration: TimeInterval, isHighTemp: Bool, automatic: Bool, scheduledCertainty: ScheduledCertainty, insulinType: InsulinType) {
self.decisionId = decisionId
self.doseType = .tempBasal
self.units = tempBasalRate * duration.hours
self.startTime = startTime
Expand Down Expand Up @@ -260,6 +264,10 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
if let rawInsulinType = rawValue["insulinType"] as? InsulinType.RawValue {
self.insulinType = InsulinType(rawValue: rawInsulinType)
}

if let decisionIdString = rawValue["decisionId"] as? String {
self.decisionId = UUID(uuidString: decisionIdString)!
}

}

Expand All @@ -277,6 +285,7 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
rawValue["scheduledTempRate"] = scheduledTempRate
rawValue["duration"] = duration
rawValue["insulinType"] = insulinType?.rawValue
rawValue["decisionId"] = decisionId?.uuidString

return rawValue
}
Expand Down Expand Up @@ -311,6 +320,7 @@ extension DoseEntry {
endDate: dose.finishTime,
value: dose.scheduledUnits ?? dose.units,
unit: .units,
decisionId: dose.decisionId,
deliveredUnits: dose.finalizedUnits,
insulinType: dose.insulinType,
automatic: dose.automatic,
Expand All @@ -323,6 +333,7 @@ extension DoseEntry {
endDate: dose.finishTime,
value: dose.scheduledTempRate ?? dose.rate,
unit: .unitsPerHour,
decisionId: dose.decisionId,
deliveredUnits: dose.finalizedUnits,
insulinType: dose.insulinType,
automatic: dose.automatic,
Expand All @@ -340,9 +351,9 @@ extension StartProgram {
func unfinalizedDose(at programDate: Date, withCertainty certainty: UnfinalizedDose.ScheduledCertainty, insulinType: InsulinType) -> UnfinalizedDose? {
switch self {
case .bolus(volume: let volume, automatic: let automatic):
return UnfinalizedDose(bolusAmount: volume, startTime: programDate, scheduledCertainty: certainty, insulinType: insulinType, automatic: automatic)
return UnfinalizedDose(decisionId: nil, bolusAmount: volume, startTime: programDate, scheduledCertainty: certainty, insulinType: insulinType, automatic: automatic)
case .tempBasal(unitsPerHour: let rate, duration: let duration, let isHighTemp, let automatic):
return UnfinalizedDose(tempBasalRate: rate, startTime: programDate, duration: duration, isHighTemp: isHighTemp, automatic: automatic, scheduledCertainty: certainty, insulinType: insulinType)
return UnfinalizedDose(decisionId: nil, tempBasalRate: rate, startTime: programDate, duration: duration, isHighTemp: isHighTemp, automatic: automatic, scheduledCertainty: certainty, insulinType: insulinType)
case .basalProgram:
return UnfinalizedDose(resumeStartTime: programDate, scheduledCertainty: certainty, insulinType: insulinType)
}
Expand Down
Loading