Tiny tidy up of RBE node

This commit is contained in:
dceejay
2015-02-14 17:56:29 +00:00
parent ba557b93c1
commit 7338a17991
4 changed files with 13 additions and 9 deletions

View File

@@ -33,8 +33,8 @@ module.exports = function(RED) {
}
else {
var n = parseFloat(msg.payload);
if (previous == null) { previous = n - node.gap; }
if (!isNaN(n)) {
if (previous == null) { previous = n - node.gap; }
if (Math.abs(n - previous) >= node.gap) {
previous = n;
node.send(msg);