1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Add missing else to Ledborg node

Fix to close #129
This commit is contained in:
Dave C-J 2013-12-29 20:55:08 +00:00
parent 9347ef2401
commit 24a8c6df32

View File

@ -36,7 +36,7 @@ function LedBorgNode(n) {
if (err) node.warn(msg.payload+" : No LedBorg found"); 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 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 g = Math.floor(parseInt(msg.payload.slice(3,5),16)/88).toString();
var b = Math.floor(parseInt(msg.payload.slice(5),16)/88).toString(); var b = Math.floor(parseInt(msg.payload.slice(5),16)/88).toString();