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

serialport addchar whenever needed - not only in char mode

This commit is contained in:
Dave Conway-Jones 2019-08-30 14:47:24 +01:00
parent b0c8b0f2c6
commit 1f0aa6908c
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 3 additions and 3 deletions

View File

@ -233,9 +233,9 @@ module.exports = function(RED) {
else { else {
payload = payload.toString(); payload = payload.toString();
} }
if ((spliton === "char") && (addchar !== "")) { payload += addchar; } if (addchar !== "") { payload += addchar; }
} }
else if ((spliton === "char") && (addchar !== "")) { else if (addchar !== "") {
payload = Buffer.concat([payload,addchar]); payload = Buffer.concat([payload,addchar]);
} }
return payload; return payload;

View File

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