remove node.done calls to tidy up

bump packages
This commit is contained in:
Dave Conway-Jones
2019-06-27 22:26:50 +01:00
parent f32f578c09
commit 8cf3c8b990
10 changed files with 1197 additions and 195 deletions

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-pi-unicorn-hat",
"version" : "0.0.20",
"version" : "0.0.22",
"description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.",
"dependencies" : {
"pngjs": "2.2.*"

View File

@@ -231,9 +231,9 @@ module.exports = function(RED) {
node.child.on('close', function () {
node.child = null;
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); }
if (node.done) {
if (node.finished) {
node.status({fill:"grey",shape:"ring",text:"closed"});
node.done();
node.finished();
}
else { node.status({fill:"red",shape:"ring",text:"stopped"}); }
});
@@ -248,7 +248,7 @@ module.exports = function(RED) {
node.status({fill:"grey",shape:"ring",text:"closed"});
if (node.tout) { clearTimeout(node.tout); }
if (node.child != null) {
node.done = done;
node.finished = done;
node.child.kill('SIGKILL');
}
else { done(); }