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