From b79e63e573328ac7b352cea16a166af1dfd00098 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Wed, 22 Feb 2023 16:33:47 -0800 Subject: [PATCH] Remove unused function --- Meshtastic/Helpers/BLEManager.swift | 68 +++++++++---------- .../Views/Map/Custom/MapViewSwiftUI.swift | 1 - 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index 4bad7d2e..167e1c0f 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -2011,38 +2011,38 @@ extension BLEManager: CBCentralManagerDelegate { self.peripherals.removeAll(where: { $0.lastUpdate < visibleDuration}) } - func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) { - - guard let peripherals = dict[CBCentralManagerRestoredStatePeripheralsKey] as? [CBPeripheral] else { - return - } - print(peripherals) - if peripherals.count > 0 { - //connectedPeripheral.peripheral = peripherals[0] - // 5 - //connectedPeripheral.peripheral.delegate = self - - for peripheral in peripherals { - - switch peripheral.state { - case .connecting: // I've only seen this happen when - // re-launching attached to Xcode. - print("Xcode Restore") - - case .connected: // Store for connection / requesting - // notifications when BT starts. - print("Actual restore") - //centralManager.connect(peripheral) - default: break - } - - - - // connectedPeripheral.peripheral - //connectedPeripheral.peripheral = peripheral - //connectedPeripheral.peripheral.delegate = self - } - } - print("willRestoreState Hit!") - } +// func centralManager(_ central: CBCentralManager, willRestoreState dict: [String : Any]) { +// +// guard let peripherals = dict[CBCentralManagerRestoredStatePeripheralsKey] as? [CBPeripheral] else { +// return +// } +// print(peripherals) +// if peripherals.count > 0 { +// //connectedPeripheral.peripheral = peripherals[0] +// // 5 +// //connectedPeripheral.peripheral.delegate = self +// +// for peripheral in peripherals { +// +// switch peripheral.state { +// case .connecting: // I've only seen this happen when +// // re-launching attached to Xcode. +// print("Xcode Restore") +// +// case .connected: // Store for connection / requesting +// // notifications when BT starts. +// print("Actual restore") +// //centralManager.connect(peripheral) +// default: break +// } +// +// +// +// // connectedPeripheral.peripheral +// //connectedPeripheral.peripheral = peripheral +// //connectedPeripheral.peripheral.delegate = self +// } +// } +// print("willRestoreState Hit!") +// } } diff --git a/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift b/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift index 3534b784..4cc5ef0b 100644 --- a/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift +++ b/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift @@ -114,7 +114,6 @@ struct MapViewSwiftUI: UIViewRepresentable { } DispatchQueue.main.async { - print(recenter) mapView.removeAnnotations(mapView.annotations) mapView.addAnnotations(waypoints) switch centeringMode {