weird fade error
This commit is contained in:
parent
9491782686
commit
82b6d6920c
1 changed files with 8 additions and 3 deletions
|
@ -46,10 +46,16 @@ export function tick() {
|
|||
var changed = false;
|
||||
for (let i = 0; i < cfg.leds; i++) {
|
||||
if (next_pattern[i] != pixels[i]) {
|
||||
if (next_pattern[i] == pixel_cache[i]) {
|
||||
console.log("INCONGRUENCE WITH " + i);
|
||||
pixels[i] = next_pattern[i]
|
||||
}
|
||||
else {
|
||||
changed = true;
|
||||
fade(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!changed) {
|
||||
tick_pattern();
|
||||
}
|
||||
|
@ -77,7 +83,6 @@ function fade(index) {
|
|||
// `interval: ${interval_r} ${interval_g} ${interval_b}\n`)
|
||||
|
||||
if (current_tick + 1 >= fade_ticks) {
|
||||
console.log("FINISHED FADE FOR " + index);
|
||||
pixels[index] = next_pattern[index];
|
||||
pixel_cache[index] = next_pattern[index];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue