From 807873f685e2c615fad26802c953177115adcc05 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 26 May 2016 10:37:20 +0100 Subject: [PATCH] set pi gpio pin status correctly if set on start --- nodes/core/hardware/36-rpi-gpio.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nodes/core/hardware/36-rpi-gpio.js b/nodes/core/hardware/36-rpi-gpio.js index f94966245..f7f47db78 100644 --- a/nodes/core/hardware/36-rpi-gpio.js +++ b/nodes/core/hardware/36-rpi-gpio.js @@ -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);