mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
pi gpio close pins timeout
This commit is contained in:
parent
e133d01e53
commit
c32823a85a
@ -108,10 +108,12 @@ module.exports = function(RED) {
|
||||
delete pinsInUse[node.pin];
|
||||
if (node.child != null) {
|
||||
node.finished = done;
|
||||
node.child.stdin.write("close "+node.pin);
|
||||
node.child.kill('SIGKILL');
|
||||
node.child.stdin.write("close "+node.pin, () => {
|
||||
node.child.kill('SIGKILL');
|
||||
setTimeout(function() { if (done) { done(); } }, 25);
|
||||
});
|
||||
}
|
||||
else { done(); }
|
||||
else { if (done) { done(); } }
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("rpi-gpio in",GPIOInNode);
|
||||
@ -210,10 +212,12 @@ module.exports = function(RED) {
|
||||
delete pinsInUse[node.pin];
|
||||
if (node.child != null) {
|
||||
node.finished = done;
|
||||
node.child.stdin.write("close "+node.pin);
|
||||
node.child.kill('SIGKILL');
|
||||
node.child.stdin.write("close "+node.pin, () => {
|
||||
node.child.kill('SIGKILL');
|
||||
setTimeout(function() { if (done) { done(); } }, 25);
|
||||
});
|
||||
}
|
||||
else { done(); }
|
||||
else { if (done) { done(); } }
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-node-pi-gpio",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "The basic Node-RED node for Pi GPIO",
|
||||
"dependencies" : {
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user