Serial port - missed no split char option. If no split char then send every

character in char mode.
This commit is contained in:
Dave C-J 2014-06-08 15:21:02 +01:00
parent 00f87cbcd6
commit 12b8fa36dc
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ module.exports = function(RED) {
var splitc = new Buffer(node.serialConfig.newline.replace("\\n","\n").replace("\\r","\r").replace("\\t","\t").replace("\\e","\e").replace("\\f","\f").replace("\\0","\0"));
this.port.on('data', function(msg) {
// single char buffer
if (node.serialConfig.newline == 0) {
if ((node.serialConfig.newline == 0)||(node.serialConfig.newline == "")) {
node.send({"payload": new Buffer([msg])});
}
else {