Fix LidarSerial Protocol
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
|
import Foundation
|
||||||
|
|
||||||
protocol LidarSerial {
|
protocol LidarSerial {
|
||||||
var dtr: Bool {get set};
|
var dtr: Bool {get set};
|
||||||
var inWaiting: Int {get};
|
var inWaiting: Int {get};
|
||||||
func closePort() -> Void;
|
func closePort() -> Void;
|
||||||
func openPort() -> Void;
|
func openPort() -> Void;
|
||||||
readData(ofLength: Int) throws -> Void;
|
func readData(ofLength: Int) throws -> Data;
|
||||||
writeData(_ data: Data) throws -> Void;
|
func writeData(_ data: Data) throws -> Void;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import LidarSerial
|
|
||||||
|
|
||||||
struct Constants{
|
struct Constants{
|
||||||
static let SYNC: UInt8 = 0xA5
|
static let SYNC: UInt8 = 0xA5
|
||||||
|
|||||||
Reference in New Issue
Block a user