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

set pi gpio pin status correctly if set on start

This commit is contained in:
Dave Conway-Jones 2016-05-26 10:37:20 +01:00
parent 8d4be848b0
commit 807873f685

View File

@ -160,11 +160,12 @@ module.exports = function(RED) {
if (node.pin !== undefined) {
if (node.set && (node.out === "out")) {
node.child = spawn(gpioCommand, [node.out,node.pin,node.level]);
node.status({fill:"green",shape:"dot",text:node.level});
} else {
node.child = spawn(gpioCommand, [node.out,node.pin]);
node.status({fill:"green",shape:"dot",text:"common.status.ok"});
}
node.running = true;
node.status({fill:"green",shape:"dot",text:"common.status.ok"});
node.on("input", inputlistener);