Skip to content

Commit

Permalink
Update rgb_underglow.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Sep 15, 2023
1 parent f353396 commit 89883eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/rgb_underglow.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ static void zmk_rgb_underglow_effect_solid() {
else {
for (int i = 0; i < STRIP_NUM_PIXELS; i++) {
struct zmk_led_hsb hsb = state.color;
hsb.h = state.animation_step;
hsb.h = (HUE_MAX / STRIP_NUM_PIXELS * i + state.animation_step) % HUE_MAX;

pixels[i] = hsb_to_rgb(hsb_scale_min_max(hsb));
}

state.animation_step += state.animation_speed;
state.animation_step += state.animation_speed * 2;
state.animation_step = state.animation_step % HUE_MAX;
}
}
Expand Down

0 comments on commit 89883eb

Please sign in to comment.