Skip to content

Commit 76c3d92

Browse files
committed
Version 1.0.2
Fix to reconnect a Serial port if it is disconnected.
1 parent 6a72e22 commit 76c3d92

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/SerialSwift/Serial.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public class Serial: NSObject, ORSSerialPortDelegate, Serialable {
7171
}
7272

7373
public func open() {
74+
serialPort = ORSSerialPort.init(path: port)
75+
serialPort?.delegate = self
76+
serialPort?.baudRate = baud.rawValue
7477
serialPort?.open()
7578
}
7679

0 commit comments

Comments
 (0)