diff --git a/Dependencies/rileylink_ios/OmniKit/PumpManager/OmnipodPumpManager.swift b/Dependencies/rileylink_ios/OmniKit/PumpManager/OmnipodPumpManager.swift index a9df62633..2e19c0998 100644 --- a/Dependencies/rileylink_ios/OmniKit/PumpManager/OmnipodPumpManager.swift +++ b/Dependencies/rileylink_ios/OmniKit/PumpManager/OmnipodPumpManager.swift @@ -38,7 +38,7 @@ extension OmnipodPumpManagerError: LocalizedError { case .podAlreadyPaired: return LocalizedString("Pod already paired", comment: "Error message shown when user cannot pair because pod is already paired") case .notReadyForCannulaInsertion: - return LocalizedString("Pod is not in a state ready for cannula insertion.", comment: "Error message when cannula insertion fails because the pod is in an unexpected state") + return LocalizedString("Pod is not in a state ready for cannula insertion", comment: "Error message when cannula insertion fails because the pod is in an unexpected state") } } @@ -571,7 +571,7 @@ extension OmnipodPumpManager { podState.activatedAt = start podState.expiresAt = start + .hours(72) - let fault = mockFault ? try? DetailedStatus(encodedData: Data(hexadecimalString: "020d0000000e00c36a020703ff020900002899080082")!) : nil + let fault = mockFault ? try? DetailedStatus(encodedData: Data(hexadecimalString: "020f0000000900345c000103ff0001000005ae056029")!) : nil podState.fault = fault self.podComms = PodComms(podState: podState) @@ -605,7 +605,7 @@ extension OmnipodPumpManager { }) if mockFaultDuringPairing { // needs to be PumpManagerError.communication for OmniKitUI error checking to work correctly - completion(.failure(PumpManagerError.communication(PodCommsError.podFault(fault: fault!)))) + completion(.failure(PumpManagerError.deviceState(PodCommsError.podFault(fault: fault!)))) } else if mockCommsErrorDuringPairing { completion(.failure(PumpManagerError.communication(PodCommsError.noResponse))) } else { @@ -694,12 +694,14 @@ extension OmnipodPumpManager { #if targetEnvironment(simulator) let mockDelay = TimeInterval(seconds: 3) + let mockFaultDuringInsertCannula = false DispatchQueue.global(qos: .userInitiated).asyncAfter(deadline: .now() + mockDelay) { let result = self.setStateWithResult({ (state) -> PumpManagerResult in - // Mock fault - // let fault = try! DetailedStatus(encodedData: Data(hexadecimalString: "020d0000000e00c36a020703ff020900002899080082")!) - // self.state.podState?.fault = fault - // return .failure(PumpManagerError.communication(PodCommsError.podFault(fault: fault))) + if mockFaultDuringInsertCannula { + let fault = try! DetailedStatus(encodedData: Data(hexadecimalString: "020d0000000e00c36a020703ff020900002899080082")!) + state.podState?.fault = fault + return .failure(PumpManagerError.deviceState(PodCommsError.podFault(fault: fault))) + } // Mock success state.podState?.setupProgress = .completed diff --git a/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/InsertCannulaSetupViewController.swift b/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/InsertCannulaSetupViewController.swift index ae3f877d4..afa77f85b 100644 --- a/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/InsertCannulaSetupViewController.swift +++ b/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/InsertCannulaSetupViewController.swift @@ -118,14 +118,19 @@ class InsertCannulaSetupViewController: SetupTableViewController { } loadingText = errorText - var podCommsError: PodCommsError? = nil + let podCommsError: PodCommsError? if let pumpManagerError = lastError as? PumpManagerError { switch pumpManagerError { - case .communication(let error): + // Check for a wrapped PodCommsError in the possible PumpManagerError types + case .communication(let error), .configuration(let error), .connection(let error), .deviceState(let error): podCommsError = error as? PodCommsError default: + podCommsError = nil break } + } else { + // Check for a non PumpManagerError PodCommsError + podCommsError = lastError as? PodCommsError } // If we have an error, update the continue state depending on whether it's fatal or if the cannula insertion was started or not diff --git a/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/PairPodSetupViewController.swift b/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/PairPodSetupViewController.swift index 00e5d3afd..6aed2ad61 100644 --- a/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/PairPodSetupViewController.swift +++ b/Dependencies/rileylink_ios/OmniKitUI/ViewControllers/PairPodSetupViewController.swift @@ -134,14 +134,19 @@ class PairPodSetupViewController: SetupTableViewController { errorStrings = [lastError?.localizedDescription].compactMap { $0 } } - var podCommsError: PodCommsError? = nil + let podCommsError: PodCommsError? if let pumpManagerError = lastError as? PumpManagerError { switch pumpManagerError { - case .communication(let error): + // Check for a wrapped PodCommsError in the possible PumpManagerError types + case .communication(let error), .configuration(let error), .connection(let error), .deviceState(let error): podCommsError = error as? PodCommsError default: + podCommsError = nil break } + } else { + // Check for a non PumpManagerError PodCommsError + podCommsError = lastError as? PodCommsError } if let podCommsError = podCommsError, podCommsError.possibleWeakCommsCause { diff --git a/Dependencies/rileylink_ios/RileyLinkBLEKit/RileyLinkDeviceManager.swift b/Dependencies/rileylink_ios/RileyLinkBLEKit/RileyLinkDeviceManager.swift index b1cdd08df..f92472a98 100644 --- a/Dependencies/rileylink_ios/RileyLinkBLEKit/RileyLinkDeviceManager.swift +++ b/Dependencies/rileylink_ios/RileyLinkBLEKit/RileyLinkDeviceManager.swift @@ -82,7 +82,9 @@ public class RileyLinkDeviceManager: NSObject { lockedTimerTickEnabled.value = newValue centralQueue.async { for device in self.devices { - device.setTimerTickEnabled(newValue) + if device.peripheralState == .connected { + device.setTimerTickEnabled(newValue) + } } } } @@ -163,8 +165,10 @@ extension RileyLinkDeviceManager { device.manager.peripheral = peripheral } else { device = RileyLinkDevice(peripheralManager: PeripheralManager(peripheral: peripheral, configuration: .rileyLink, centralManager: central, queue: sessionQueue)) - device.setTimerTickEnabled(timerTickEnabled) - device.setIdleListeningState(idleListeningState) + if peripheral.state == .connected { + device.setTimerTickEnabled(timerTickEnabled) + device.setIdleListeningState(idleListeningState) + } devices.append(device) diff --git a/Dependencies/rileylink_ios/RileyLinkKitUI/de.lproj/Localizable.strings b/Dependencies/rileylink_ios/RileyLinkKitUI/de.lproj/Localizable.strings index 950b2637f..603c1ef70 100644 --- a/Dependencies/rileylink_ios/RileyLinkKitUI/de.lproj/Localizable.strings +++ b/Dependencies/rileylink_ios/RileyLinkKitUI/de.lproj/Localizable.strings @@ -20,16 +20,16 @@ "Disconnected" = "Getrennt"; /* The in-progress disconnecting state */ -"Disconnecting" = "trennen"; +"Disconnecting" = "Trennen"; /* The title of the cell showing firmware version */ "Firmware" = "Firmware"; /* The title of the cell showing current rileylink frequency */ -"Frequency" = "Frequency"; +"Frequency" = "Frequenz"; /* The title of the cell showing device name */ -"Name" = "Nombre"; +"Name" = "Name"; /* RileyLink setup description */ "RileyLink allows for communication with the pump over Bluetooth Low Energy." = "RileyLink ermöglicht Kommunikation zur Pumpe über Bluetooth Low Energy."; @@ -38,67 +38,67 @@ "Signal Strength" = "Signalstärke"; /* The header of the cells showing connection monitoring */ -"Connection Monitoring" = "Connection Monitoring"; +"Connection Monitoring" = "Verbindungsüberwachung"; /* The title of the cell showing uptime */ -"Uptime" = "Uptime"; +"Uptime" = "Betriebszeit"; /* The title of the cell showing battery level */ -"Battery level" = "Battery level"; +"Battery level" = "Ladezustand"; /* The title of the cell showing Voltage */ -"Voltage" = "Voltage"; +"Voltage" = "Spannung"; /* "The title of the section for alerts" */ -"Alert" = "Alert"; +"Alert" = "Alarmierung"; /* The title of the cell showing Low Battery Alert */ -"Low Battery Alert" = "Low Battery Alert"; +"Low Battery Alert" = "Warnung bei schwacher Batterie"; /* Header of list showing battery level alert options */ -"Battery level Alert" = "Battery level Alert"; +"Battery level Alert" = "Ladezustandswarnung"; /* Battery level alert OFF in list of options */ -"OFF" = "OFF"; +"OFF" = "Aus"; /* The title of the command to update diagnostic LEDs */ -"Diagnostic LEDs" = "Diagnostic LEDs"; +"Diagnostic LEDs" = "Diagnose LEDs"; /* The title of the command to fetch RileyLink statistics */ -"Get RileyLink Statistics" = "Get RileyLink Statistics"; +"Get RileyLink Statistics" = "RileyLink Messwerte abrufen"; /* The title of the command to invert BLE connection LED logic */ -"Invert LED Logic" = "Invert LED Logic"; +"Invert LED Logic" = "LED Logik umkehren"; /* The header of the cells showing test commands */ -"Test Commands" = "Test Commands"; +"Test Commands" = "Testbefehle"; /* The title of the cell showing Lighten Yellow LED */ -"Lighten Yellow LED" = "Lighten Yellow LED"; +"Lighten Yellow LED" = "Gelbe LED aktivieren"; /* The title of the cell showing Lighten Yellow LED */ -"Lighten Red LED" = "Lighten Red LED"; +"Lighten Red LED" = "Rote LED aktivieren"; /* The title of the cell showing Test Vibration */ -"Test Vibration" = "Test Vibration"; +"Test Vibration" = "Vibration aktivieren"; /* The title of the cell for sounding device finding piezo */ -"Find Device" = "Find Device"; +"Find Device" = "Gerät lokalisieren"; /* The title of the cell for connection LED */ -"Connection LED" = "Connection LED"; +"Connection LED" = "Verbindungs-LED"; /* The title of the cell for connection vibration */ -"Connection Vibration" = "Connection Vibration"; +"Connection Vibration" = "Vibrieren bei Verbindung"; /* Detail text when battery alert disabled. */ -"Off" = "Off"; +"Off" = "Aus"; /* Text indicating LED Mode is on */ -"On" = "On"; +"On" = "An"; /* Text indicating LED Mode is off */ -"Off" = "Off"; +"Off" = "Aus"; /* Text indicating LED Mode is auto */ "Auto" = "Auto"; diff --git a/Dependencies/rileylink_ios/RileyLinkKitUI/ru.lproj/Localizable.strings b/Dependencies/rileylink_ios/RileyLinkKitUI/ru.lproj/Localizable.strings index 4ab4951de..da73c3cbf 100644 --- a/Dependencies/rileylink_ios/RileyLinkKitUI/ru.lproj/Localizable.strings +++ b/Dependencies/rileylink_ios/RileyLinkKitUI/ru.lproj/Localizable.strings @@ -26,7 +26,7 @@ "Firmware" = "Прошивка"; /* The title of the cell showing current rileylink frequency */ -"Frequency" = "Frequency"; +"Frequency" = "Частота"; /* The title of the cell showing device name */ "Name" = "Название"; @@ -38,67 +38,67 @@ "Signal Strength" = "Уровень сигнала"; /* The header of the cells showing connection monitoring */ -"Connection Monitoring" = "Connection Monitoring"; +"Connection Monitoring" = "Проверка подключения"; /* The title of the cell showing uptime */ -"Uptime" = "Uptime"; +"Uptime" = "Время непрерывной работы"; /* The title of the cell showing battery level */ -"Battery level" = "Battery level"; +"Battery level" = "Уровень заряда батареи"; /* The title of the cell showing Voltage */ -"Voltage" = "Voltage"; +"Voltage" = "Напряжение"; /* "The title of the section for alerts" */ "Alert" = "Alert"; /* The title of the cell showing Low Battery Alert */ -"Low Battery Alert" = "Low Battery Alert"; +"Low Battery Alert" = "Предупредить при уровне заряда"; /* Header of list showing battery level alert options */ -"Battery level Alert" = "Battery level Alert"; +"Battery level Alert" = "Уровень предупреждения о низком заряде"; /* Battery level alert OFF in list of options */ -"OFF" = "OFF"; +"OFF" = "Не предупреждать"; /* The title of the command to update diagnostic LEDs */ -"Diagnostic LEDs" = "Diagnostic LEDs"; +"Diagnostic LEDs" = "Индикатор диагностики"; /* The title of the command to fetch RileyLink statistics */ -"Get RileyLink Statistics" = "Get RileyLink Statistics"; +"Get RileyLink Statistics" = "Статистика RileyLink"; /* The title of the command to invert BLE connection LED logic */ -"Invert LED Logic" = "Invert LED Logic"; +"Invert LED Logic" = "Обратная логика индикации"; /* The header of the cells showing test commands */ -"Test Commands" = "Test Commands"; +"Test Commands" = "Проверочные команды"; /* The title of the cell showing Lighten Yellow LED */ -"Lighten Yellow LED" = "Lighten Yellow LED"; +"Lighten Yellow LED" = "Светло-желтый индикатор"; /* The title of the cell showing Lighten Yellow LED */ -"Lighten Red LED" = "Lighten Red LED"; +"Lighten Red LED" = "Светло-красный индикатор"; /* The title of the cell showing Test Vibration */ -"Test Vibration" = "Test Vibration"; +"Test Vibration" = "Проверка вибрации"; /* The title of the cell for sounding device finding piezo */ -"Find Device" = "Find Device"; +"Find Device" = "Поиск устройства"; /* The title of the cell for connection LED */ -"Connection LED" = "Connection LED"; +"Connection LED" = "Индикатор подключения"; /* The title of the cell for connection vibration */ -"Connection Vibration" = "Connection Vibration"; +"Connection Vibration" = "Вибрировать при потере связи"; /* Detail text when battery alert disabled. */ -"Off" = "Off"; +"Off" = "Нет"; /* Text indicating LED Mode is on */ -"On" = "On"; +"On" = "Вкл"; /* Text indicating LED Mode is off */ -"Off" = "Off"; +"Off" = "Выкл"; /* Text indicating LED Mode is auto */ -"Auto" = "Auto"; +"Auto" = "Авто"; diff --git a/FreeAPS.xcodeproj/project.pbxproj b/FreeAPS.xcodeproj/project.pbxproj index 31971a506..f241ae8bb 100644 --- a/FreeAPS.xcodeproj/project.pbxproj +++ b/FreeAPS.xcodeproj/project.pbxproj @@ -2154,7 +2154,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = ""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = BA7ZHP4963; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = FreeAPS/Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; @@ -2180,7 +2180,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = ""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = BA7ZHP4963; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = FreeAPS/Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 14.0; diff --git a/FreeAPS/Resources/Config.xcconfig b/FreeAPS/Resources/Config.xcconfig index 7b874aec9..ad86f77b1 100644 --- a/FreeAPS/Resources/Config.xcconfig +++ b/FreeAPS/Resources/Config.xcconfig @@ -1 +1 @@ -BUILD_VERSION = 0.2.1 +BUILD_VERSION = 0.2.2 diff --git a/FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings b/FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings index 6e93556f0..e75da61e8 100644 --- a/FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings +++ b/FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings @@ -110,7 +110,7 @@ "Duration" = "Длительность"; /* */ -"Enact Temp Target" = "Запустить Временную Цель"; +"Enact Temp Target" = "Временная цель"; /* */ "Enter preset name" = "Название шаблона"; @@ -155,7 +155,7 @@ "Sensitivity" = "Чувствительность"; /* */ -"Use Autotune" = "использовать Автотюн"; +"Use Autotune" = "Использовать автотюн"; /* Add profile basal */ "Add" = "Добавить"; @@ -185,7 +185,7 @@ "Calculated Ratio" = "Рассчитанное соотношение"; /* Carb Ratios header */ -"Carb Ratios" = "Углеводные Коэфициенты"; +"Carb Ratios" = "Углеводные коэффициенты"; /* */ "Ratio" = "Коэфициент"; @@ -197,7 +197,7 @@ "Calculated Sensitivity" = "Рассчитанная Чувствительность"; /* */ -"Insulin Sensitivities" = "Факторы Чувствительности к Инсулину"; +"Insulin Sensitivities" = "Чувствительность к инсулину"; /* */ "Sensitivity Ratio" = "Коэффициент Чувствительности"; @@ -243,7 +243,7 @@ Enact a temp Basal or a temp target */ "Local glucose source" = "Локальный источник глюкозы"; /* Header */ -"Nightscout Config" = "Настройка Nightscout"; +"Nightscout Config" = "Nightscout"; /* */ "Port" = "Порт"; @@ -261,13 +261,13 @@ Enact a temp Basal or a temp target */ "Glucose units" = "Единицы измерения глюкозы"; /* */ -"Preferences" = "Настройки"; +"Preferences" = "Предпочтения"; /* Recommended Insulin Fraction in preferences */ "Recommended Insulin Fraction" = "Рекомендуемая дробь инсулина"; /* Do you want to show bolus screen after added carbs? */ -"Skip Bolus screen after carbs" = "Пропустить Экран болюса после ввода углеводов"; +"Skip Bolus screen after carbs" = "Пропустить экран болюса после ввода углеводов"; /* Allow remote control from NS */ "Remote control" = "Удаленное управление"; @@ -348,7 +348,7 @@ Enact a temp Basal or a temp target */ "Closed loop" = "Замкнутая петля"; /* */ -"Configuration" = "Настройка"; +"Configuration" = "Конфигурация"; /* */ "Devices" = "Устройства"; @@ -372,7 +372,7 @@ Enact a temp Basal or a temp target */ "Low target" = "Нижняя цель"; /* */ -"Target Ranges" = "Целевой Диапазон"; +"Target Ranges" = "Целевой диапазон"; /* When bolusing */ "Bolusing" = "Подается болюс"; @@ -407,7 +407,7 @@ Enact a temp Basal or a temp target */ */ /* ”Rewind Resets Autosens” */ -"This feature, enabled by default, resets the autosens ratio to neutral when you rewind your pump, on the assumption that this corresponds to a probable site change. Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours. If you usually rewind your pump independently of site changes, you may want to consider disabling this feature." = "This feature, enabled by default, resets the autosens ratio to neutral when you rewind your pump, on the assumption that this corresponds to a probable site change. Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours. If you usually rewind your pump independently of site changes, you may want to consider disabling this feature."; +"This feature, enabled by default, resets the autosens ratio to neutral when you rewind your pump, on the assumption that this corresponds to a probable site change. Autosens will begin learning sensitivity anew from the time of the rewind, which may take up to 6 hours. If you usually rewind your pump independently of site changes, you may want to consider disabling this feature." = "Эта функция (включена по умолчанию), сбрасывает Автосенс к нейтральному при сбросе помпы, предполагая, что это связано со сменой канюли. Автосенс начнет учиться заново со времени сброса, что может занять до 6 часов. Если вы сбрасываете помпу отдельно от смены канюли, вам стоит отключить эту функцию."; /* ”High Temptarget Raises Sensitivity" */ "Defaults to false. When set to true, raises sensitivity (lower sensitivity ratio) for temp targets set to >= 111. Synonym for exercise_mode. The higher your temp target above 110 will result in more sensitive (lower) ratios, e.g., temp target of 120 results in sensitivity ratio of 0.75, while 140 results in 0.6 (with default halfBasalTarget of 160)." = "Defaults to false. When set to true, raises sensitivity (lower sensitivity ratio) for temp targets set to >= 111. Synonym for exercise_mode. The higher your temp target above 110 will result in more sensitive (lower) ratios, e.g., temp target of 120 results in sensitivity ratio of 0.75, while 140 results in 0.6 (with default halfBasalTarget of 160).";