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

Fixes #16705 : digital rain follows val #16716

Merged
merged 4 commits into from
Apr 19, 2022

Conversation

KoenGoe
Copy link

@KoenGoe KoenGoe commented Mar 23, 2022

RGB matrix digital rain animation did not follow the current set hsv value.
Due to this, it also ignored RGB_MATRIX_MAXIMUM_BRIGHTNESS, which might cause too much current to be drawn .

This pull request changes the algorithm to adapt to the currently set hsv value by both

  • scaling the brightness constants with the value
  • adjusting the speed of decay to keep time from full brightness to 0 roughly constant
  • Core
  • Bugfix
  • Enhancement/optimization

Issues Fixed or Closed by This PR

Fixes 16705

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).

rgb matrix digital rain animation adjust to listen to currently set rgb val.
This also prevents it from dangerously ignoring `RGB_MATRIX_MAXIMUM_BRIGHTNESS`.
Speed of decay is dynamically adjusted as well to keep time from full brightness to 0 roughly constant
@github-actions github-actions bot added the core label Mar 23, 2022
Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

Not sure it should be added here, but I have noticed that this animation doesn't respect the led flags setting, and will render on leds that aren't "enabled".

@KoenGoe
Copy link
Author

KoenGoe commented Mar 25, 2022

It also doesn't do RGB_MATRIX_USE_LIMITS(led_min, led_max);
I'm not very familiar with how this works and what it means in terms of how often the animation function is called.
If the function gets called more often (/second) according to these limits, it would unintentionally change the animation speed with the current implementation

@drashna drashna requested a review from a team March 25, 2022 17:18
@tzarc tzarc merged commit 671b62e into qmk:develop Apr 19, 2022
0xcharly pushed a commit to Bastardkb/bastardkb-qmk that referenced this pull request Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants