Ensure the buffer is always reset before calculating each frame
This commit is contained in:
parent
eb1fc0a21b
commit
69de72c6f4
1 changed files with 5 additions and 0 deletions
|
@ -120,6 +120,11 @@ static void zmk_animation_tick(struct k_work *work) {
|
||||||
|
|
||||||
for (size_t i = 0; i < pixels_size; ++i) {
|
for (size_t i = 0; i < pixels_size; ++i) {
|
||||||
zmk_rgb_to_led_rgb(&pixels[i].value, &px_buffer[i]);
|
zmk_rgb_to_led_rgb(&pixels[i].value, &px_buffer[i]);
|
||||||
|
|
||||||
|
// Reset values for the next cycle
|
||||||
|
pixels[i].value.r = 0;
|
||||||
|
pixels[i].value.g = 0;
|
||||||
|
pixels[i].value.b = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t pixels_updated = 0;
|
size_t pixels_updated = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue