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

fix serialport additional char in request mode

This commit is contained in:
Dave Conway-Jones 2019-08-30 13:02:21 +01:00
parent 6682320c97
commit b0c8b0f2c6
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 3 additions and 2 deletions

View File

@ -214,7 +214,8 @@ module.exports = function(RED) {
splitc = new Buffer.from(newline.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0")); // jshint ignore:line splitc = new Buffer.from(newline.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0")); // jshint ignore:line
} }
if (addchar === true) { addchar = splitc; } if (addchar === true) { addchar = splitc; }
addchar = addchar.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0"); // jshint ignore:line
if (addchar.substr(0,2) == "0x") { addchar = new Buffer.from([addchar]); }
connections[id] = (function() { connections[id] = (function() {
var obj = { var obj = {
_emitter: new events.EventEmitter(), _emitter: new events.EventEmitter(),

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-serialport", "name" : "node-red-node-serialport",
"version" : "0.8.4", "version" : "0.8.5",
"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"