From 24a8c6df3240d0123f2bf81e53fdb7ee139d6358 Mon Sep 17 00:00:00 2001 From: Dave C-J Date: Sun, 29 Dec 2013 20:55:08 +0000 Subject: [PATCH] Add missing else to Ledborg node Fix to close #129 --- hardware/Pi/78-ledborg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/Pi/78-ledborg.js b/hardware/Pi/78-ledborg.js index 8d47db04..bed7b84c 100644 --- a/hardware/Pi/78-ledborg.js +++ b/hardware/Pi/78-ledborg.js @@ -36,7 +36,7 @@ function LedBorgNode(n) { if (err) node.warn(msg.payload+" : No LedBorg found"); }); } - if (p2.test(msg.payload)) { + else if (p2.test(msg.payload)) { var r = Math.floor(parseInt(msg.payload.slice(1,3),16)/88).toString(); var g = Math.floor(parseInt(msg.payload.slice(3,5),16)/88).toString(); var b = Math.floor(parseInt(msg.payload.slice(5),16)/88).toString();