From 45bead4f38bdd9771b7a29df551121b5a8bbe00b Mon Sep 17 00:00:00 2001 From: Piv <18462828+Piv200@users.noreply.github.com> Date: Thu, 9 Jul 2020 20:23:59 +0930 Subject: [PATCH] Fixing Serial Protocol --- Sources/SwiftRPLidar/LidarSerial.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/SwiftRPLidar/LidarSerial.swift b/Sources/SwiftRPLidar/LidarSerial.swift index 1aa44b3..3fc9d57 100644 --- a/Sources/SwiftRPLidar/LidarSerial.swift +++ b/Sources/SwiftRPLidar/LidarSerial.swift @@ -3,8 +3,8 @@ import Foundation public protocol LidarSerial { var dtr: Bool {get set}; var inWaiting: Int {get}; - func closePort() -> Void; - func openPort() -> Void; + func closePort(); + func openPort() throws; func readData(ofLength: Int) throws -> Data; - func writeData(_ data: Data) throws -> Void; + func writeData(_ data: Data) throws -> Int; }