Ivan před 4 roky
rodič
revize
764816f19c

+ 9 - 7
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<TimeInterval> 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

+ 7 - 2
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

+ 7 - 2
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 {

+ 7 - 3
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)
 

+ 24 - 24
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";

+ 22 - 22
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" = "Авто";

+ 2 - 2
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;

+ 1 - 1
FreeAPS/Resources/Config.xcconfig

@@ -1 +1 @@
-BUILD_VERSION = 0.2.1
+BUILD_VERSION = 0.2.2

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 10 - 10
FreeAPS/Sources/Localizations/Main/ru.lproj/Localizable.strings