mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
and honour text (utf8) mode in single char mode. aaargh.
This commit is contained in:
parent
12b8fa36dc
commit
7d6f70545a
@ -118,7 +118,8 @@ module.exports = function(RED) {
|
||||
this.port.on('data', function(msg) {
|
||||
// single char buffer
|
||||
if ((node.serialConfig.newline == 0)||(node.serialConfig.newline == "")) {
|
||||
node.send({"payload": new Buffer([msg])});
|
||||
if (node.serialConfig.bin !== "bin") { node.send({"payload": String.fromCharCode(msg)}); }
|
||||
else { node.send({"payload": new Buffer([msg])}); }
|
||||
}
|
||||
else {
|
||||
// do the timer thing
|
||||
|
Loading…
Reference in New Issue
Block a user