Add protocol for serial library to implement.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Foundation
|
||||
import SwiftSerial
|
||||
import LidarSerial
|
||||
|
||||
struct Constants{
|
||||
static let SYNC: UInt8 = 0xA5
|
||||
@@ -64,11 +64,11 @@ typealias ScanHandler = (_ scans: [LidarScan]) -> Void
|
||||
|
||||
class RPLidar{
|
||||
private var motor: Bool = false
|
||||
private var serialPort: SerialPort? = nil
|
||||
private var serialPort: LidarSerial? = nil
|
||||
private var motorRunning = false
|
||||
|
||||
|
||||
init(serialPort: SerialPort) throws {
|
||||
init(serialPort: LidarSerial) throws {
|
||||
self.serialPort = serialPort
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user