Skip to content

Commit 180882c

Browse files
committed
Fix issue with calculating discance in animation_ripple.c
1 parent 8259184 commit 180882c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/animation/animation_ripple.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ static void animation_ripple_render_frame(const struct device *dev, struct anima
9999

100100
// Render all pixels for each event
101101
for (int j = 0; j < config->pixel_map_size; ++j) {
102-
uint8_t pixel_distance = zmk_animation_get_pixel_distance(event->pixel_id, j);
102+
uint8_t pixel_distance =
103+
zmk_animation_get_pixel_distance(event->pixel_id, pixel_map[j]);
103104

104105
if (config->ripple_width > abs(pixel_distance - event->distance)) {
105106
float intensity = 1.0f - (float)abs(pixel_distance - event->distance) /

0 commit comments

Comments
 (0)