From 38cd9cf64d9598efa9cb3f2815dd5225c3ee0e54 Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Wed, 26 May 2021 10:56:54 -0400 Subject: [PATCH] patterns start over at 8 randomly??? --- lights.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lights.js b/lights.js index 8dfd66d..82fcf98 100644 --- a/lights.js +++ b/lights.js @@ -48,13 +48,17 @@ export function tick() { if (next_pattern[i] != pixels[i]) { if (next_pattern[i] == pixel_cache[i]) { console.log("INCONGRUENCE WITH " + i); - pixels[i] = next_pattern[i] + pixels[i] = next_pattern[i]; } else { changed = true; fade(i); } } + else if (pixel_cache[i] != next_pattern[i]) { + console.log("PATTERN NOT STORED " + i); + pixel_cache[i] = next_pattern[i]; + } } if (!changed) { tick_pattern();