Skip to content

Commit

Permalink
Updated for Xcode 9
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Jan 21, 2018
1 parent fac2648 commit 2d9b5af
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion Sources/BluetoothLinux/DeviceRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import Bluetooth
public extension Adapter {

/// Sends a command to the device and waits for a response.
@inline(__always)
func deviceRequest<CP: HCICommandParameter, EP: HCIEventParameter>(commandParameter: CP, eventParameterType: EP.Type, timeout: Int = 1000) throws -> EP {

let command = CP.command
Expand Down
2 changes: 0 additions & 2 deletions Sources/BluetoothLinux/GATTClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ public final class GATTClient {
// MARK: - Methods

/// Performs the actual IO for recieving data.
@inline(__always)
public func read() throws {

try connection.read()
}

/// Performs the actual IO for sending data.
@inline(__always)
public func write() throws -> Bool {

return try connection.write()
Expand Down
2 changes: 0 additions & 2 deletions Sources/BluetoothLinux/GATTServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ public final class GATTServer {
// MARK: - Methods

/// Performs the actual IO for sending data.
@inline(__always)
public func read() throws {

try connection.read()
}

/// Performs the actual IO for recieving data.
@inline(__always)
public func write() throws -> Bool {

return try connection.write()
Expand Down
6 changes: 2 additions & 4 deletions Sources/LEScanTest/LEScanTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ func LEScanTest(adapter: Adapter, duration: TimeInterval) {
let startDate = Date()
let endDate = startDate + duration

do { try adapter.lowEnergyScan(duration: duration,
shouldContinueScanning: { Date() < endDate },
foundDevice: { print($0.address) }) }

do { try adapter.lowEnergyScan(shouldContinueScanning: { Date() < endDate }, foundDevice: { print($0.address) }) }

catch { Error("Could not scan: \(error)") }
}

0 comments on commit 2d9b5af

Please sign in to comment.