Skip to content

Commit

Permalink
[RGB Matrix] Fix Pixel fractal animation
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna committed Oct 14, 2024
1 parent 2badd41 commit 0a903b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quantum/rgb_matrix/animations/pixel_fractal_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ static bool PIXEL_FRACTAL(effect_params_t* params) {
if (g_rgb_timer > wait_timer) {
rgb_t rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
for (uint8_t h = 0; h < MATRIX_ROWS; ++h) {
if (g_led_config.matrix_co[h][MID_COL - 1] == NO_LED || g_led_config.matrix_co[h][MATRIX_COLS - MID_COL] == NO_LED) {
continue;
}
// Light and copy columns outward
for (uint8_t l = 0; l < MID_COL - 1; ++l) {
if (g_led_config.matrix_co[h][l] == NO_LED || g_led_config.matrix_co[h][MATRIX_COLS - 1 - l] == NO_LED) {
continue;
}
rgb_t index_rgb = led[h][l] ? (rgb_t){rgb.r, rgb.g, rgb.b} : (rgb_t){0, 0, 0};
if (HAS_ANY_FLAGS(g_led_config.flags[g_led_config.matrix_co[h][l]], params->flags)) {
rgb_matrix_set_color(g_led_config.matrix_co[h][l], index_rgb.r, index_rgb.g, index_rgb.b);
Expand Down

0 comments on commit 0a903b8

Please sign in to comment.