Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Merged
merged 1 commit into from
Jan 16, 2022

Conversation

filterpaper
Copy link
Contributor

@filterpaper filterpaper commented Jan 10, 2022

Description

Add an init function the PIXEL_FRACTAL matrix effect to clear LEDs of previous effect colors on mode change.

Types of Changes

  • Core
  • Bugfix
  • Enhancement/optimization

Issues Fixed or Closed by This PR

RGB mode transition bug that was reported by @sigprof on Discord

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added the core label Jan 10, 2022
@drashna drashna requested a review from a team January 10, 2022 22:58
@tzarc tzarc merged commit 1d3c2ce into qmk:develop Jan 16, 2022
@@ -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.

@filterpaper filterpaper deleted the pixelfractal-fixes branch January 16, 2022 23:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants