1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

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 {