diff options
author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2022-01-17 03:48:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 06:48:09 +1100 |
commit | 1d3c2cededd43dbe5a091c1495aafb6cebc99220 (patch) | |
tree | 027f1f994836daa126e47d1f35ca23571999d2da | |
parent | 33384a366379f844653f74ff5dd5bbdfe9cd048d (diff) |
Add init function to clear previous effect (#15815)
-rw-r--r-- | quantum/rgb_matrix/animations/pixel_fractal_anim.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/rgb_matrix/animations/pixel_fractal_anim.h b/quantum/rgb_matrix/animations/pixel_fractal_anim.h index 8e25ec402c..35187b92de 100644 --- a/quantum/rgb_matrix/animations/pixel_fractal_anim.h +++ b/quantum/rgb_matrix/animations/pixel_fractal_anim.h @@ -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 |