1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

don't add time value to output when not asked for

to Close #399
This commit is contained in:
Dave Conway-Jones 2018-01-28 17:00:48 +00:00
parent d8263eab25
commit 17886b7296
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 3 additions and 3 deletions

View File

@ -49,9 +49,9 @@ module.exports = function(RED) {
else {
payload = payload.toString();
}
payload += node.addCh;
if (node.out === "char") { payload += node.addCh; }
}
else if (node.addCh !== "") {
else if ((node.addCh !== "") && (node.out === "char")) {
payload = Buffer.concat([payload,new Buffer(node.addCh)]);
}
node.port.write(payload,function(err,res) {

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-serialport",
"version" : "0.6.2",
"version" : "0.6.3",
"description" : "Node-RED nodes to talk to serial ports",
"dependencies" : {
"serialport" : "^6.0.4"