1
0
Fork 0

Add init function to clear previous effect (#15815)

This commit is contained in:
Albert Y 2022-01-17 03:48:09 +08:00 committed by GitHub
parent 33384a3663
commit 1d3c2ceded
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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