Fix pi gpio output of boolean to actually send 1/0

rather than true/false
This commit is contained in:
Dave Conway-Jones 2018-02-27 23:26:32 +00:00
parent aeadc40c65
commit e123e7b0b0
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
1 changed files with 2 additions and 2 deletions

View File

@ -142,9 +142,9 @@ module.exports = function(RED) {
var limit = 1;
if (node.out === "pwm") { limit = 100; }
if ((out >= 0) && (out <= limit)) {
if (RED.settings.verbose) { node.log("out: "+msg.payload); }
if (RED.settings.verbose) { node.log("out: "+out); }
if (node.child !== null) {
node.child.stdin.write(msg.payload+"\n");
node.child.stdin.write(out+"\n");
node.status({fill:"green",shape:"dot",text:msg.payload.toString()});
}
else {