From 501c3af95a60c466217f67813822c0d8e19c41e5 Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Tue, 25 May 2021 23:32:30 -0400 Subject: [PATCH] pattern should be int --- lights.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lights.js b/lights.js index 1e56daa..59409da 100644 --- a/lights.js +++ b/lights.js @@ -27,11 +27,7 @@ function tick_pattern() { var b = Math.floor(Math.random() * 100); for (let i = 0; i < cfg.leds; i++) { - if (i % 3 == 0) { - next_pattern[i] = r; - next_pattern[i + 1] = g; - next_pattern[i + 2] = b; - } + next_pattern[i] = ((r << 8) + g) << 8 + b; } }