Skip to content

Commit

Permalink
Release 3.4.0.
Browse files Browse the repository at this point in the history
Bug fixes etc. Please see Release notes in Github, tag v3.4.0, or in Discord release notes channel.
  • Loading branch information
Jon-b-m committed Mar 18, 2024
2 parents 41c0330 + 507de99 commit 349683a
Show file tree
Hide file tree
Showing 96 changed files with 3,502 additions and 162 deletions.
2 changes: 1 addition & 1 deletion Config.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_DISPLAY_NAME = iAPS
APP_VERSION = 3.2.1
APP_VERSION = 3.4.0
APP_BUILD_NUMBER = 1
COPYRIGHT_NOTICE =
DEVELOPER_TEAM = ##TEAM_ID##
Expand Down
12 changes: 6 additions & 6 deletions Dependencies/OmniBLE/Localizations/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@
"Play Test Beeps" = "Testtöne abspielen";

/* */
"Skipping Read Pulse Log due to bolus still in progress." = "Überspringe Lese Pulse Protokoll wegen noch laufendem Bolus.";
"Skipping Read Pulse Log due to bolus still in progress." = "Impuls-Log kann nicht gelesen werden da die Pumpe zurzeit einen Bolus verabreicht.";

/* */
"Read Pulse Log" = "Pulse-Log lesen";
"Read Pulse Log" = "Impuls-Log lesen";

/* */
"Set Confirmation Beeps to %s" = "Bestätigungston auf %s setzen";
Expand Down Expand Up @@ -834,13 +834,13 @@
"Done" = "Fertig";

/* Title for the pod diagnostic view */
"Pod Diagnostics" = "Pod Diagnostics";
"Pod Diagnostics" = "Diagnose-Infos";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Erweiterten Impuls-Log lesen";

/* Text for read activation time title */
"Read Activation Time" = "Read Activation Time";
"Read Activation Time" = "Aktivierungsinformationen";

/* Text for read triggered alerts title */
"Read Triggered Alerts" = "Read Triggered Alerts";
"Read Triggered Alerts" = "Ausgelöste Warnungen";
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
"Skipping Read Pulse Log due to bolus still in progress." = "Ignorer les bips de test en raison du bolus en cours.";

/* */
"Read Pulse Log" = "Lecture journal d'impulsion";
"Read Pulse Log" = "Journal des impulsions";

/* */
"Set Confirmation Beeps to %s" = "Définir les bips de confirmation à %s";
Expand Down Expand Up @@ -837,7 +837,7 @@
"Pod Diagnostics" = "Diagnostics du pod";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Journal des impulsions étendu";

/* Text for read activation time title */
"Read Activation Time" = "Lire le temps d'activation";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,13 +834,13 @@
"Done" = "Fine";

/* Title for the pod diagnostic view */
"Pod Diagnostics" = "Pod Diagnostics";
"Pod Diagnostics" = "Diagnostica pod";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Leggi i dati dei battiti";

/* Text for read activation time title */
"Read Activation Time" = "Read Activation Time";
"Read Activation Time" = "Leggi Il Tempo Di Attivazione";

/* Text for read triggered alerts title */
"Read Triggered Alerts" = "Read Triggered Alerts";
"Read Triggered Alerts" = "Leggi avvisi non letti";
Original file line number Diff line number Diff line change
Expand Up @@ -834,13 +834,13 @@
"Done" = "OK";

/* Title for the pod diagnostic view */
"Pod Diagnostics" = "Pod Diagnostics";
"Pod Diagnostics" = "Diagnostische Pod gegevens";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Pulslog uitlezen";

/* Text for read activation time title */
"Read Activation Time" = "Read Activation Time";
"Read Activation Time" = "Activatietijd lezen";

/* Text for read triggered alerts title */
"Read Triggered Alerts" = "Read Triggered Alerts";
"Read Triggered Alerts" = "Lees geactiveerde waarschuwingen";
Original file line number Diff line number Diff line change
Expand Up @@ -834,13 +834,13 @@
"Done" = "Готово";

/* Title for the pod diagnostic view */
"Pod Diagnostics" = "Pod Diagnostics";
"Pod Diagnostics" = "Диагностика пода";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Расширенный журнал импульсов";

/* Text for read activation time title */
"Read Activation Time" = "Read Activation Time";
"Read Activation Time" = "Прочитать время активации";

/* Text for read triggered alerts title */
"Read Triggered Alerts" = "Read Triggered Alerts";
"Read Triggered Alerts" = "Прочитать сработавшие оповещения";
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
"Paired" = "Đã ghép đôi";

/* Cancel button text in navigation bar on pair pod UI */
"Cancel" = "Bỏ qua";
"Cancel" = "Hủy";

/* Alert title for cancel pairing modal */
"Are you sure you want to cancel Pod setup?" = "Bạn có chắc chắn muốn hủy cấu hình pod?";
Expand Down
8 changes: 4 additions & 4 deletions Dependencies/OmniBLE/OmniBLE/OmnipodCommon/AlertSlot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public struct AlertConfiguration {

static let length = 6

public init(alertType: AlertSlot, active: Bool = true, duration: TimeInterval = 0, trigger: AlertTrigger, beepRepeat: BeepRepeat, beepType: BeepType, silent: Bool = false, autoOffModifier: Bool = false)
public init(alertType: AlertSlot, active: Bool = true, duration: TimeInterval = 0, trigger: AlertTrigger, beepRepeat: BeepRepeat, beepType: BeepType, silent: Bool, autoOffModifier: Bool = false)
{
self.slot = alertType
self.active = active
Expand Down Expand Up @@ -180,7 +180,7 @@ public enum PodAlert: CustomStringConvertible, RawRepresentable, Equatable {

// slot1NotUsed
case .notUsed:
return AlertConfiguration(alertType: .slot1NotUsed, duration: .minutes(55), trigger: .timeUntilAlert(.minutes(5)), beepRepeat: .every5Minutes, beepType: .noBeepNonCancel)
return AlertConfiguration(alertType: .slot1NotUsed, duration: .minutes(55), trigger: .timeUntilAlert(.minutes(5)), beepRepeat: .every5Minutes, beepType: .noBeepNonCancel, silent: false)

// slot2ShutdownImminent
case .shutdownImminent(let offset, let absAlertTime, let silent):
Expand Down Expand Up @@ -277,12 +277,12 @@ public enum PodAlert: CustomStringConvertible, RawRepresentable, Equatable {
// After pod is powered up, beep every 10 minutes for up to 2 hours before pairing before failing
let totalDuration: TimeInterval = .hours(2)
let startOffset: TimeInterval = .minutes(10)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep, silent: false)
case .finishSetupReminder:
// After pod is paired, beep every 5 minutes for up to 1 hour for pod setup to complete before failing
let totalDuration: TimeInterval = .hours(1)
let startOffset: TimeInterval = .minutes(5)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep, silent: false)
case .expired(let offset, let absAlertTime, let duration, let silent):
// Normally used to alert at Pod.nominalPodLife (72 hours) for Pod.expirationAdvisoryWindow (7 hours)
// 2 sets of beeps repeating every 60 minutes
Expand Down
26 changes: 16 additions & 10 deletions Dependencies/OmniBLE/OmniBLE/PumpManager/OmniBLEPumpManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -984,11 +984,11 @@ extension OmniBLEPumpManager {

let expirationReminderTime = Pod.nominalPodLife - self.state.defaultExpirationReminderOffset
let alerts: [PodAlert] = [
.expirationReminder(offset: self.podTime, absAlertTime: self.state.defaultExpirationReminderOffset > 0 ? expirationReminderTime : 0),
.lowReservoir(units: self.state.lowReservoirReminderValue)
.expirationReminder(offset: self.podTime, absAlertTime: self.state.defaultExpirationReminderOffset > 0 ? expirationReminderTime : 0, silent: self.state.silencePod),
.lowReservoir(units: self.lowReservoirReminderValue, silent: self.state.silencePod)
]

let finishWait = try session.insertCannula(optionalAlerts: alerts, silent: self.silencePod)
let finishWait = try session.insertCannula(optionalAlerts: alerts, silent: self.state.silencePod)
completion(.success(finishWait))
} catch let error {
completion(.failure(.communication(error)))
Expand Down Expand Up @@ -1024,7 +1024,7 @@ extension OmniBLEPumpManager {

// Called when resuming a pod setup operation which sometimes can fail on the first pod command in various situations.
// Attempting a getStatus and sleeping a couple of seconds on errors greatly improves the odds for first pod command success.
fileprivate func resumingPodSetup() {
public func resumingPodSetup() {
let sleepTime:UInt32 = 2

if !isConnected {
Expand Down Expand Up @@ -1132,23 +1132,29 @@ extension OmniBLEPumpManager {

public func setTime(completion: @escaping (OmniBLEPumpManagerError?) -> Void) {

guard state.hasActivePod else {
completion(OmniBLEPumpManagerError.noPodPaired)
let timeZone = TimeZone.currentFixed
guard let podState = state.podState, podState.fault == nil else {
// With no non-faulted pod just update our pump manager
// state with the current timezone and return success
// instead of an inappropriate "No pod paired" error.
self.setState { (state) in
state.timeZone = timeZone
}
completion(nil)
return
}

guard state.podState?.setupProgress == .completed else {
guard podState.isSetupComplete else {
// A cancel delivery command before pod setup is complete will fault the pod
completion(.state(PodCommsError.setupNotComplete))
return
}

guard state.podState?.unfinalizedBolus?.isFinished() != false else {
guard podState.unfinalizedBolus?.isFinished() != false else {
completion(.state(PodCommsError.unfinalizedBolus))
return
}

let timeZone = TimeZone.currentFixed
self.podComms.runSession(withName: "Set time zone") { (result) in
switch result {
case .success(let session):
Expand Down Expand Up @@ -1183,7 +1189,7 @@ extension OmniBLEPumpManager {
}

guard state.podState?.unfinalizedBolus?.isFinished() != false else {
return .failure(.deviceState(PodCommsError.unfinalizedBolus))
return .failure(PumpManagerError.deviceState(PodCommsError.unfinalizedBolus))
}

return .success(true)
Expand Down
8 changes: 4 additions & 4 deletions Dependencies/OmniKit/OmniKit/OmnipodCommon/AlertSlot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct AlertConfiguration {

static let length = 6

public init(alertType: AlertSlot, active: Bool = true, duration: TimeInterval = 0, trigger: AlertTrigger, beepRepeat: BeepRepeat, beepType: BeepType, silent: Bool = false, autoOffModifier: Bool = false)
public init(alertType: AlertSlot, active: Bool = true, duration: TimeInterval = 0, trigger: AlertTrigger, beepRepeat: BeepRepeat, beepType: BeepType, silent: Bool, autoOffModifier: Bool = false)
{
self.slot = alertType
self.active = active
Expand Down Expand Up @@ -179,7 +179,7 @@ public enum PodAlert: CustomStringConvertible, RawRepresentable, Equatable {

// slot1NotUsed
case .notUsed:
return AlertConfiguration(alertType: .slot1NotUsed, duration: .minutes(55), trigger: .timeUntilAlert(.minutes(5)), beepRepeat: .every5Minutes, beepType: .noBeepNonCancel)
return AlertConfiguration(alertType: .slot1NotUsed, duration: .minutes(55), trigger: .timeUntilAlert(.minutes(5)), beepRepeat: .every5Minutes, beepType: .noBeepNonCancel, silent: false)

// slot2ShutdownImminent
case .shutdownImminent(let offset, let absAlertTime, let silent):
Expand Down Expand Up @@ -276,12 +276,12 @@ public enum PodAlert: CustomStringConvertible, RawRepresentable, Equatable {
// After pod is powered up, beep every 10 minutes for up to 2 hours before pairing before failing
let totalDuration: TimeInterval = .hours(2)
let startOffset: TimeInterval = .minutes(10)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep, silent: false)
case .finishSetupReminder:
// After pod is paired, beep every 5 minutes for up to 1 hour for pod setup to complete before failing
let totalDuration: TimeInterval = .hours(1)
let startOffset: TimeInterval = .minutes(5)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep)
return AlertConfiguration(alertType: .slot7Expired, duration: totalDuration - startOffset, trigger: .timeUntilAlert(startOffset), beepRepeat: .every5Minutes, beepType: .bipBeepBipBeepBipBeepBipBeep, silent: false)
case .expired(let offset, let absAlertTime, let duration, let silent):
// Normally used to alert at Pod.nominalPodLife (72 hours) for Pod.expirationAdvisoryWindow (7 hours)
// 2 sets of beeps repeating every 60 minutes
Expand Down
35 changes: 20 additions & 15 deletions Dependencies/OmniKit/OmniKit/PumpManager/OmnipodPumpManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -850,11 +850,10 @@ extension OmnipodPumpManager {
} else {
self.log.default("Pod already paired. Continuing.")

self.podComms.runSession(withName: "Prime pod", using: deviceSelector) { (result) in

// Resuming the pod setup, try to ensure pod comms will work right away
self.resumingPodSetup()
// Resuming the pod setup, try to ensure pod comms will work right away
self.resumingPodSetup()

self.podComms.runSession(withName: "Prime pod", using: deviceSelector) { (result) in
// Calls completion
primeSession(result)
}
Expand Down Expand Up @@ -911,7 +910,7 @@ extension OmnipodPumpManager {
let timeZone = self.state.timeZone

let rileyLinkSelector = self.rileyLinkDeviceProvider.firstConnectedDevice
self.podComms.runSession(withName: "Insert cannula", using: rileyLinkSelector) { (result) in
self.podComms.runSession(withName: "Insert cannula", using: rileyLinkSelector) { (result) in
switch result {
case .success(let session):
if self.state.podState?.setupProgress.cannulaInsertionSuccessfullyStarted == true {
Expand All @@ -930,11 +929,11 @@ extension OmnipodPumpManager {

let expirationReminderTime = Pod.nominalPodLife - self.state.defaultExpirationReminderOffset
let alerts: [PodAlert] = [
.expirationReminder(offset: self.podTime, absAlertTime: self.state.defaultExpirationReminderOffset > 0 ? expirationReminderTime : 0),
.lowReservoir(units: self.state.lowReservoirReminderValue)
.expirationReminder(offset: self.podTime, absAlertTime: self.state.defaultExpirationReminderOffset > 0 ? expirationReminderTime : 0, silent: self.state.silencePod),
.lowReservoir(units: self.state.lowReservoirReminderValue, silent: self.state.silencePod)
]

let finishWait = try session.insertCannula(optionalAlerts: alerts, silent: self.silencePod)
let finishWait = try session.insertCannula(optionalAlerts: alerts, silent: self.state.silencePod)
completion(.success(finishWait))
} catch let error {
completion(.failure(.communication(error)))
Expand Down Expand Up @@ -971,7 +970,7 @@ extension OmnipodPumpManager {

// Called when resuming a pod setup operation which sometimes can fail on the first pod command in various situations.
// Attempting a getStatus and sleeping a couple of seconds on errors greatly improves the odds for first pod command success.
fileprivate func resumingPodSetup() {
public func resumingPodSetup() {
let sleepTime:UInt32 = 2

let rileyLinkSelector = self.rileyLinkDeviceProvider.firstConnectedDevice
Expand Down Expand Up @@ -1076,24 +1075,30 @@ extension OmnipodPumpManager {
}

public func setTime(completion: @escaping (OmnipodPumpManagerError?) -> Void) {

guard state.hasActivePod else {
completion(OmnipodPumpManagerError.noPodPaired)

let timeZone = TimeZone.currentFixed
guard let podState = state.podState, podState.fault == nil else {
// With no non-faulted pod just update our pump manager
// state with the current timezone and return success
// instead of an inappropriate "No pod paired" error.
self.setState { (state) in
state.timeZone = timeZone
}
completion(nil)
return
}

guard state.podState?.setupProgress == .completed else {
guard podState.isSetupComplete else {
// A cancel delivery command before pod setup is complete will fault the pod
completion(.state(PodCommsError.setupNotComplete))
return
}

guard state.podState?.unfinalizedBolus?.isFinished() != false else {
guard podState.unfinalizedBolus?.isFinished() != false else {
completion(.state(PodCommsError.unfinalizedBolus))
return
}

let timeZone = TimeZone.currentFixed
let rileyLinkSelector = self.rileyLinkDeviceProvider.firstConnectedDevice
self.podComms.runSession(withName: "Set time zone", using: rileyLinkSelector) { (result) in
switch result {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,13 @@ Silence Pod" = "Stille Pod";
"Read Pod Status" = "Pod-Status ablesen";

/* Title for the pod diagnostic view */
"Pod Diagnostics" = "Pod Diagnostics";
"Pod Diagnostics" = "Diagnose-Infos";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Erweiterten Impuls-Log lesen";

/* Text for read activation time title */
"Read Activation Time" = "Read Activation Time";
"Read Activation Time" = "Aktivierungsinformationen";

/* Text for read triggered alerts title */
"Read Triggered Alerts" = "Read Triggered Alerts";
"Read Triggered Alerts" = "Ausgelöste Warnungen";
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ Silence Pod" = "Pod silencieux";
"Pod Diagnostics" = "Diagnostics du pod";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Journal des impulsions étendu";

/* Text for read activation time title */
"Read Activation Time" = "Lire le temps d'activation";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,13 @@ Silence Pod" = "Pod Silenziato";
"Read Pod Status" = "Leggi stato microinfusore";

/* Title for the pod diagnostic view */
"Pod Diagnostics" = "Pod Diagnostics";
"Pod Diagnostics" = "Diagnostica pod";

/* Text for read pulse log plus title */
"Read Pulse Log Plus" = "Read Pulse Log Plus";
"Read Pulse Log Plus" = "Leggi i dati dei battiti";

/* Text for read activation time title */
"Read Activation Time" = "Read Activation Time";
"Read Activation Time" = "Leggi Il Tempo Di Attivazione";

/* Text for read triggered alerts title */
"Read Triggered Alerts" = "Read Triggered Alerts";
"Read Triggered Alerts" = "Leggi avvisi non letti";
Loading

0 comments on commit 349683a

Please sign in to comment.