Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Add init function to clear previous matrix effect #15815

Merged
merged 1 commit into from
Jan 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I wonder whether clearing all LEDs like that is the proper behavior here — what if some LEDs are excluded from effect usage by flags?

Although it seems that the DIGITAL_RAIN and TYPING_HEATMAP effects also do the same thing, so maybe that's OK, and flag users just need to be aware that changing the effect may result in clearing the excluded LEDs.

}

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