diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index 18253f40..0d54f434 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -956,7 +956,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.3.48; + MARKETING_VERSION = 2.0.0; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; @@ -988,7 +988,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.3.48; + MARKETING_VERSION = 2.0.0; PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index 80af2665..0c13dd73 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -324,8 +324,12 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph // MARK: Discover Characteristics Event func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { + if let e = error { - MeshLogger.log("🚫 BLE didDiscoverCharacteristicsFor error by \(peripheral.name ?? "Unknown") \(e)") + MeshLogger.log("🚫 BLE Discover Characteristics error for \(peripheral.name ?? "Unknown") \(e) disconnecting device") + // Try and stop crashes when this error occurs + disconnectPeripheral() + return } guard let characteristics = service.characteristics else { return } @@ -637,9 +641,11 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph default: print("🚨 Unhandled Characteristic UUID: \(characteristic.uuid)") } - - // Either Read the config complete value or from num notify value - peripheral.readValue(for: FROMRADIO_characteristic) + if FROMRADIO_characteristic != nil { + + // Either Read the config complete value or from num notify value + peripheral.readValue(for: FROMRADIO_characteristic) + } } public func sendMessage(message: String, toUserNum: Int64, isEmoji: Bool, replyID: Int64) -> Bool { diff --git a/Meshtastic/Views/Settings/AppSettings.swift b/Meshtastic/Views/Settings/AppSettings.swift index 6c32f05c..29ec50b1 100644 --- a/Meshtastic/Views/Settings/AppSettings.swift +++ b/Meshtastic/Views/Settings/AppSettings.swift @@ -55,6 +55,10 @@ enum MeshMapType: String, CaseIterable, Identifiable { enum LocationUpdateInterval: Int, CaseIterable, Identifiable { + case fiveSeconds = 5 + case tenSeconds = 10 + case fifteenSeconds = 15 + case thirtySeconds = 30 case oneMinute = 60 case fiveMinutes = 300 case tenMinutes = 600 @@ -64,6 +68,14 @@ enum LocationUpdateInterval: Int, CaseIterable, Identifiable { var description: String { get { switch self { + case .fiveSeconds: + return "Five Seconds" + case .tenSeconds: + return "Ten Seconds" + case .fifteenSeconds: + return "Fifteen Seconds" + case .thirtySeconds: + return "Thirty Seconds" case .oneMinute: return "One Minute" case .fiveMinutes: