Skip to content

Commit c86d1b5

Browse files
committed
Make the delegate name more Cocoa-ic
Fixes LoopKit#8
1 parent 6fb6525 commit c86d1b5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

xDripG5/BluetoothManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protocol BluetoothManagerDelegate: class {
2828

2929
- returns: True if the peripheral should connect
3030
*/
31-
func bluetoothManager(manager: BluetoothManager, shouldConnectToPeripheral peripheral: CBPeripheral) -> Bool
31+
func bluetoothManager(manager: BluetoothManager, shouldConnectPeripheral peripheral: CBPeripheral) -> Bool
3232
}
3333

3434

@@ -311,7 +311,7 @@ class BluetoothManager: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate
311311
func centralManager(central: CBCentralManager, willRestoreState dict: [String : AnyObject]) {
312312
if peripheral == nil, let peripherals = dict[CBCentralManagerRestoredStatePeripheralsKey] as? [CBPeripheral] {
313313
for peripheral in peripherals {
314-
if delegate == nil || delegate!.bluetoothManager(self, shouldConnectToPeripheral: peripheral) {
314+
if delegate == nil || delegate!.bluetoothManager(self, shouldConnectPeripheral: peripheral) {
315315
self.peripheral = peripheral
316316
peripheral.delegate = self
317317
}
@@ -321,7 +321,7 @@ class BluetoothManager: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate
321321

322322
func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber) {
323323

324-
if delegate == nil || delegate!.bluetoothManager(self, shouldConnectToPeripheral: peripheral) {
324+
if delegate == nil || delegate!.bluetoothManager(self, shouldConnectPeripheral: peripheral) {
325325
self.peripheral = peripheral
326326
peripheral.delegate = self
327327

xDripG5/Transmitter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public class Transmitter: BluetoothManagerDelegate {
115115
return string.substringFromIndex(string.endIndex.advancedBy(-2, limit: string.startIndex))
116116
}
117117

118-
func bluetoothManager(manager: BluetoothManager, shouldConnectToPeripheral peripheral: CBPeripheral) -> Bool {
118+
func bluetoothManager(manager: BluetoothManager, shouldConnectPeripheral peripheral: CBPeripheral) -> Bool {
119119
if let name = peripheral.name where lastTwoCharactersOfString(name) == lastTwoCharactersOfString(ID) {
120120
return true
121121
} else {

0 commit comments

Comments
 (0)