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,10 +97,15 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (RED.settings.verbose) { node.log("out: "+msg.payload); }
|
if (RED.settings.verbose) { node.log("out: "+msg.payload); }
|
||||||
if (node.child !== null) { node.child.stdin.write(rgb+"\n"); }
|
if (node.child !== null) {
|
||||||
else { node.warn("Command not running"); }
|
node.child.stdin.write(rgb+"\n");
|
||||||
node.status({fill:"green",shape:"dot",text:msg.payload});
|
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"]);
|
node.child = spawn(gpioCommand, ["borg","11"]);
|
||||||
node.running = true;
|
node.running = true;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-ledborg",
|
"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.",
|
"description" : "A Node-RED node to control a PiBorg LedBorg board for a Raspberry Pi.",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user