From e73e25aa303605ee7e19534ea74f328bf7f4f469 Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Wed, 26 May 2021 12:15:04 -0400 Subject: [PATCH] im c. --- lights.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lights.js b/lights.js index d8f888e..5336025 100644 --- a/lights.js +++ b/lights.js @@ -35,10 +35,10 @@ function tick_pattern() { console.log("TICKING PATTERN") for (let i = 0; i < cfg.leds; i++) { - var r = Math.floor(Math.random() * 100) - var g = Math.floor(Math.random() * 100); - var b = Math.floor(Math.random() * 100); - next_pattern[i] = ((r << 8) + g) << 8 + b; + var r = Math.floor(Math.random() * 256) + var g = Math.floor(Math.random() * 256); + var b = Math.floor(Math.random() * 256); + next_pattern[i] = rgb_to_int(r, g, b); } }