mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Cleanly close the HID interface when restarting
This commit is contained in:
parent
636b9a23ba
commit
dd776ad97e
@ -50,6 +50,11 @@ function Blink1Node(n) {
|
|||||||
node.warn("No Blink1 found");
|
node.warn("No Blink1 found");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.on("close", function() {
|
||||||
|
if (blink1 && typeof blink1.close == "function") {
|
||||||
|
blink1.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
var blink1 = new Blink1.Blink1();
|
var blink1 = new Blink1.Blink1();
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user