mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Fixed ordering of blink init calls per @dceejay
This commit is contained in:
parent
24a8c6df32
commit
d81828fdd9
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
var RED = require(process.env.NODE_RED_HOME+"/red/red");
|
||||||
var Blink1 = require("node-blink1");
|
var Blink1 = require("node-blink1");
|
||||||
|
var blink1 = new Blink1.Blink1();
|
||||||
|
|
||||||
function Blink1Node(n) {
|
function Blink1Node(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
@ -63,13 +64,13 @@ function Blink1Node(n) {
|
|||||||
node.warn("No Blink1 found");
|
node.warn("No Blink1 found");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// This ought to work but seems to cause more hangs on closing than not...
|
//This ought to work but seems to cause more hangs on closing than not...
|
||||||
//this.on("close", function() {
|
this.on("close", function() {
|
||||||
//if (blink1 && typeof blink1.close == "function") {
|
if (blink1 && typeof blink1.close == "function") {
|
||||||
//blink1.close();
|
blink1.close();
|
||||||
//}
|
}
|
||||||
//});
|
});
|
||||||
var blink1 = new Blink1.Blink1();
|
// var blink1 = new Blink1.Blink1();
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
node.error("No Blink1 found (" + e + ")");
|
node.error("No Blink1 found (" + e + ")");
|
||||||
|
Loading…
Reference in New Issue
Block a user