From 304be96dd6d656be5bf7555dcd0ee1f471691885 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 2 Jul 2017 00:50:55 +0100 Subject: [PATCH] stop gpis node reporting bad status message on slow Pi --- nodes/core/hardware/36-rpi-gpio.js | 1 + 1 file changed, 1 insertion(+) diff --git a/nodes/core/hardware/36-rpi-gpio.js b/nodes/core/hardware/36-rpi-gpio.js index 15c1c9b75..f65ded6d5 100644 --- a/nodes/core/hardware/36-rpi-gpio.js +++ b/nodes/core/hardware/36-rpi-gpio.js @@ -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]) }); }