Serial send works

This commit is contained in:
Matthias Neeracher 2014-12-29 08:33:35 +01:00 committed by Matthias Neeracher
parent 41773412f5
commit efd0785a74

View File

@ -75,6 +75,9 @@ class ASSerialWin: NSWindowController {
} }
@IBAction func sendInput(AnyObject) { @IBAction func sendInput(AnyObject) {
let line = inputLine.stringValue + (sendCR ? "\r" : "") + (sendLF ? "\n" : "")
let data = line.dataUsingEncoding(NSASCIIStringEncoding, allowLossyConversion: true)!
portHandle?.writeData(data)
} }
@IBAction func connect(AnyObject) { @IBAction func connect(AnyObject) {