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:
parent
8d4be848b0
commit
807873f685
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user