mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Better serial port error handling
This commit is contained in:
parent
f23762ef9a
commit
6783322e5f
@ -46,15 +46,13 @@ function SerialOutNode(n) {
|
||||
return;
|
||||
}
|
||||
|
||||
node.port.on("ready",function() {
|
||||
node.on("input",function(msg) {
|
||||
node.on("input",function(msg) {
|
||||
//console.log("{",msg,"}");
|
||||
node.port.write(msg.payload,function(err,res) {
|
||||
if (err) {
|
||||
node.error(err);
|
||||
}
|
||||
if (err) {
|
||||
node.error(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.error("missing serial config");
|
||||
|
Loading…
Reference in New Issue
Block a user