mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Update LEDborg node to set status more correctly on error
This commit is contained in:
parent
9e9a5e21be
commit
c2dc764965
@ -97,9 +97,14 @@ module.exports = function(RED) {
|
||||
}
|
||||
|
||||
if (RED.settings.verbose) { node.log("out: "+msg.payload); }
|
||||
if (node.child !== null) { node.child.stdin.write(rgb+"\n"); }
|
||||
else { node.warn("Command not running"); }
|
||||
node.status({fill:"green",shape:"dot",text:msg.payload});
|
||||
if (node.child !== null) {
|
||||
node.child.stdin.write(rgb+"\n");
|
||||
node.status({fill:"green",shape:"dot",text:msg.payload});
|
||||
}
|
||||
else {
|
||||
node.warn("Command not running");
|
||||
node.status({fill:"red",shape:"ring",text:"Command not running"});
|
||||
}
|
||||
}
|
||||
|
||||
node.child = spawn(gpioCommand, ["borg","11"]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-ledborg",
|
||||
"version" : "0.0.12",
|
||||
"version" : "0.0.13",
|
||||
"description" : "A Node-RED node to control a PiBorg LedBorg board for a Raspberry Pi.",
|
||||
"dependencies" : {
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user