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

fix serialport to append chars to buffer correctly

This commit is contained in:
Dave Conway-Jones 2023-01-31 11:27:31 +00:00
parent f7f313c197
commit 559ce050da
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 4 additions and 4 deletions

View File

@ -271,7 +271,7 @@ module.exports = function(RED) {
if (addchar !== "") { payload += addchar; }
}
else if (addchar !== "") {
payload = Buffer.concat([payload,addchar]);
payload = Buffer.concat([payload,Buffer.from(addchar)]);
}
return payload;
},

View File

@ -1,9 +1,9 @@
{
"name" : "node-red-node-serialport",
"version" : "1.0.1",
"version" : "1.0.2",
"description" : "Node-RED nodes to talk to serial ports",
"dependencies" : {
"serialport" : "^10.3.0"
"serialport" : "^10.5.0"
},
"repository" : {
"type":"git",
@ -21,7 +21,7 @@
"engines" : { "node" : ">=12.0.0" },
"author": {
"name": "Dave Conway-Jones",
"email": "ceejay@vnet.ibm.com",
"email": "dceejay@gmail.com",
"url": "http://nodered.org"
}
}