Skip to content

Commit

Permalink
Add init function to clear previous effect (#15815)
Browse files Browse the repository at this point in the history
  • Loading branch information
filterpaper committed Jan 16, 2022
1 parent 33384a3 commit 1d3c2ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quantum/rgb_matrix/animations/pixel_fractal_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ static bool PIXEL_FRACTAL(effect_params_t* params) {

inline uint32_t interval(void) { return 3000 / scale16by8(qadd8(rgb_matrix_config.speed, 16), 16); }

if (params->init) {
rgb_matrix_set_color_all(0, 0, 0);
}

RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv);
for (uint8_t h = 0; h < MATRIX_ROWS; ++h) {
for (uint8_t l = 0; l < MID_COL - 1; ++l) { // Light and move left columns outwards
Expand Down

0 comments on commit 1d3c2ce

Please sign in to comment.