mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
e69d65667a
commit
344d2bfdde
@ -208,13 +208,13 @@ module.exports = function(RED) {
|
||||
var splitc; // split character
|
||||
// Parse the split character onto a 1-char buffer we can immediately compare against
|
||||
if (newline.substr(0,2) == "0x") {
|
||||
splitc = new Buffer.alloc([parseInt(newline,16)]);
|
||||
splitc = new Buffer.from([newline]);
|
||||
}
|
||||
else {
|
||||
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; }
|
||||
|
||||
|
||||
connections[id] = (function() {
|
||||
var obj = {
|
||||
_emitter: new events.EventEmitter(),
|
||||
@ -299,7 +299,6 @@ module.exports = function(RED) {
|
||||
//newline = newline.replace("\\n","\n").replace("\\r","\r");
|
||||
var olderr = "";
|
||||
var setupSerial = function() {
|
||||
|
||||
obj.serial = new serialp(port,{
|
||||
baudRate: baud,
|
||||
dataBits: databits,
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-serialport",
|
||||
"version" : "0.8.1",
|
||||
"version" : "0.8.3",
|
||||
"description" : "Node-RED nodes to talk to serial ports",
|
||||
"dependencies" : {
|
||||
"serialport" : "^7.1.4"
|
||||
"serialport" : "^7.1.5"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
|
Loading…
Reference in New Issue
Block a user