From 82591843d136eaabee3e28196c0f3f650369c49d Mon Sep 17 00:00:00 2001 From: Kuba Birecki Date: Wed, 21 Jun 2023 12:36:20 +0200 Subject: [PATCH] Fix bug with counting updated pixels --- app/src/animation/animation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/animation/animation.c b/app/src/animation/animation.c index ad3b1500..7aed1000 100644 --- a/app/src/animation/animation.c +++ b/app/src/animation/animation.c @@ -44,7 +44,7 @@ static const size_t drivers_size = DT_INST_PROP_LEN(0, drivers); /** * Array containing the number of LEDs handled by each device. */ -static const uint8_t pixels_per_driver[] = DT_INST_PROP(0, chain_lengths); +static const size_t pixels_per_driver[] = DT_INST_PROP(0, chain_lengths); /** * Pointer to the root animation @@ -121,7 +121,7 @@ static void zmk_animation_tick(struct k_work *work) { for (size_t i = 0; i < drivers_size; ++i) { led_strip_update_rgb(drivers[i], &px_buffer[pixels_updated], pixels_per_driver[i]); - pixels_updated += (size_t)pixels_per_driver; + pixels_updated += pixels_per_driver[i]; } }