mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
stop gpis node reporting bad status message on slow Pi
This commit is contained in:
parent
9639081e7e
commit
304be96dd6
@ -69,6 +69,7 @@ module.exports = function(RED) {
|
||||
node.child.stdout.on('data', function (data) {
|
||||
var d = data.toString().trim().split("\n");
|
||||
for (var i = 0; i < d.length; i++) {
|
||||
if (d[i] === '') { return; }
|
||||
if (node.running && node.buttonState !== -1 && !isNaN(Number(d[i])) && node.buttonState !== d[i]) {
|
||||
node.send({ topic:"pi/"+node.pin, payload:Number(d[i]) });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user