Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
de51406
[COASTAL-1291] plugin identifier is no longer class property (#8)
nhamming Sep 25, 2023
0a5fff0
[COASTAL-1291] plugin identifier is no longer class property (#8)
nhamming Sep 25, 2023
ab7439e
Merge remote-tracking branch 'origin/dev' into ps2/LOOP-4735/cgm-even…
ps2 Sep 27, 2023
ea5aeba
Merge remote-tracking branch 'origin/dev' into ps2/LOOP-4735/cgm-even…
ps2 Sep 27, 2023
b338752
Merge pull request #9 from tidepool-org/ps2/LOOP-4735/cgm-event-store
ps2 Sep 27, 2023
b53aafa
Merge pull request #9 from tidepool-org/ps2/LOOP-4735/cgm-event-store
ps2 Sep 27, 2023
8592230
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
84c3618
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
441133d
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
674ed7e
[COASTAL-1335] Update Picker Component
Camji55 Jan 12, 2024
3758511
[LOOP-4801] adding pump inoperable (#11)
nhamming Jun 7, 2024
2dafc55
[LOOP-4801] adding pump inoperable (#11)
nhamming Jun 7, 2024
00ea07f
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 21, 2024
1ed1af7
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 21, 2024
b85be85
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 22, 2024
e3b668b
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 22, 2024
533edb0
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Dec 4, 2024
1768304
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Dec 4, 2024
abc4c7a
Bump to iOS 17
Camji55 Dec 6, 2024
c8cff6f
Bump to iOS 17
Camji55 Dec 6, 2024
4c669d6
Bump to iOS 17
Camji55 Dec 9, 2024
62be9bd
Bump to iOS 17
Camji55 Dec 9, 2024
33594d7
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 2, 2025
8203333
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 2, 2025
858eacc
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 6, 2025
68dcf75
[LOOP-5295] decisionId on DoseEntry and PersistedPumpEvent
Camji55 Jun 6, 2025
157ad3c
async updates
ps2 Jul 3, 2025
e94c470
async updates
ps2 Jul 3, 2025
8ba639c
Changes for protocol updates
ps2 Jul 24, 2025
57bdef3
Changes for protocol updates
ps2 Jul 24, 2025
d4b7bf7
Merge pull request #15 from tidepool-org/ps2/LOOP-5235/enable-schedul…
ps2 Jul 29, 2025
8b07406
Merge pull request #15 from tidepool-org/ps2/LOOP-5235/enable-schedul…
ps2 Jul 29, 2025
ab1b671
[LOOP-5496] adding loop status checks (#16)
nhamming Oct 24, 2025
d93525b
[LOOP-5496] adding loop status checks (#16)
nhamming Oct 24, 2025
a8770e0
Support Xcode 26
Camji55 Feb 2, 2026
4f93a89
Support Xcode 26
Camji55 Feb 2, 2026
4767bbd
Support Xcode 26
Camji55 Feb 2, 2026
054e3be
Support Xcode 26
Camji55 Feb 2, 2026
e8f1812
[LOOP-5743] using pumpStatusHighlight (#18)
nhamming Feb 6, 2026
2c2d503
[LOOP-5743] using pumpStatusHighlight (#18)
nhamming Feb 6, 2026
d8b6b15
Merge tidepool/dev into tidepool-sync/2026-03-10
loopkitdev Mar 10, 2026
d5fa71f
Fix private(set) whitespace for Swift 6 compatibility
loopkitdev Mar 25, 2026
db9d08a
Fix Swift 6 compile errors: podState scope, throwing closure, mutateS…
loopkitdev Mar 25, 2026
a16d31d
Merge remote-tracking branch 'upstream/dev' into tidepool-sync/2026-0…
loopkitdev Apr 9, 2026
7f41633
Fix reentrant lock crash in isSignalLost
loopkitdev Apr 23, 2026
e276c71
Merge remote-tracking branch 'origin/dev' into tidepool-sync/2026-05-11
ps2 May 11, 2026
832b124
Merge tidepool/dev into tidepool-sync/2026-05-11
ps2 May 11, 2026
82a8a63
Merge remote-tracking branch 'origin/dev' into tidepool-sync/2026-05-11
ps2 May 11, 2026
166ecfb
OmniBLEPumpManager: revert 3 stray mutateState back to setState
ps2 May 11, 2026
87606c4
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
25 changes: 0 additions & 25 deletions Common/HKUnit.swift

This file was deleted.

10 changes: 2 additions & 8 deletions OmniBLE.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
8475315726EDA193009FD801 /* LocalizedString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475314A26EDA193009FD801 /* LocalizedString.swift */; };
8475315826EDA193009FD801 /* OSLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475314B26EDA193009FD801 /* OSLog.swift */; };
8475315926EDA193009FD801 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475314C26EDA193009FD801 /* UIColor.swift */; };
8475315A26EDA193009FD801 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475314D26EDA193009FD801 /* HKUnit.swift */; };
8475315B26EDA193009FD801 /* NibLoadable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475314E26EDA193009FD801 /* NibLoadable.swift */; };
8475315C26EDA193009FD801 /* TimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475314F26EDA193009FD801 /* TimeZone.swift */; };
8475315D26EDA193009FD801 /* Data.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8475315026EDA193009FD801 /* Data.swift */; };
Expand Down Expand Up @@ -351,7 +350,6 @@
8475314A26EDA193009FD801 /* LocalizedString.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizedString.swift; sourceTree = "<group>"; };
8475314B26EDA193009FD801 /* OSLog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OSLog.swift; sourceTree = "<group>"; };
8475314C26EDA193009FD801 /* UIColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = "<group>"; };
8475314D26EDA193009FD801 /* HKUnit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HKUnit.swift; sourceTree = "<group>"; };
8475314E26EDA193009FD801 /* NibLoadable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NibLoadable.swift; sourceTree = "<group>"; };
8475314F26EDA193009FD801 /* TimeZone.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeZone.swift; sourceTree = "<group>"; };
8475315026EDA193009FD801 /* Data.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -712,7 +710,6 @@
isa = PBXGroup;
children = (
8475315026EDA193009FD801 /* Data.swift */,
8475314D26EDA193009FD801 /* HKUnit.swift */,
10289E69271B2A3E000339E6 /* IdentifiableClass.swift */,
8475314A26EDA193009FD801 /* LocalizedString.swift */,
8475314E26EDA193009FD801 /* NibLoadable.swift */,
Expand Down Expand Up @@ -1137,7 +1134,6 @@
10389A2B26FF7841002115E9 /* PlaceholderMessageBlock.swift in Sources */,
10389A3026FF7841002115E9 /* StatusResponse.swift in Sources */,
1021114A2709462300784F13 /* PodDoseProgressEstimator.swift in Sources */,
8475315A26EDA193009FD801 /* HKUnit.swift in Sources */,
10389A2626FF7841002115E9 /* TempBasalExtraCommand.swift in Sources */,
8475315C26EDA193009FD801 /* TimeZone.swift in Sources */,
8475315726EDA193009FD801 /* LocalizedString.swift in Sources */,
Expand Down Expand Up @@ -1398,7 +1394,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
LOCALIZED_STRING_MACRO_NAMES = (
NSLocalizedString,
Expand Down Expand Up @@ -1465,7 +1461,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
LOCALIZED_STRING_MACRO_NAMES = (
NSLocalizedString,
Expand Down Expand Up @@ -1627,7 +1623,6 @@
INFOPLIST_FILE = OmniBLEPlugin/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 LoopKit Authors. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
LD_DYLIB_INSTALL_NAME = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1664,7 +1659,6 @@
INFOPLIST_FILE = OmniBLEPlugin/Info.plist;
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 LoopKit Authors. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
LD_DYLIB_INSTALL_NAME = "";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
6 changes: 3 additions & 3 deletions OmniBLE/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
18 changes: 14 additions & 4 deletions OmniBLE/OmnipodCommon/UnfinalizedDose.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
var scheduledCertainty: ScheduledCertainty
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 {
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 @@ -261,6 +265,9 @@ public struct UnfinalizedDose: RawRepresentable, Equatable, CustomStringConverti
self.insulinType = InsulinType(rawValue: rawInsulinType)
}

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

public var rawValue: RawValue {
Expand All @@ -277,6 +284,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 +319,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 +332,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 +350,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