mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Remove unused function
This commit is contained in:
parent
3002d377a0
commit
b79e63e573
2 changed files with 34 additions and 35 deletions
|
|
@ -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!")
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
print(recenter)
|
||||
mapView.removeAnnotations(mapView.annotations)
|
||||
mapView.addAnnotations(waypoints)
|
||||
switch centeringMode {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue