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

Refine twinkle to be smoother (use breathing curve) #11350

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

spidey3
Copy link
Contributor

@spidey3 spidey3 commented Dec 30, 2020

Description

This pull request updates the RGB Lighting "Twinkle" effect to be smoother, similar to the "Breathing" effect. To do this, the Twinkle code has been updated to use the same table that the Breathing uses (but "stretched" mathematically), and the default cycle intervals & twinkle life have been adjusted. There are also some changes to make the effect look nicer when lower brightness settings are configured.

To avoid bloat, I've done some minor refactoring so that Twinkle and Breathe can share some code. There is no significant impact on either firmware size, or on matrix scan rate. Nevertheless, since this is change to an effect that folks may have customized, I am targeting the develop branch.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

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

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.

LGTM. Literally.

@drashna drashna requested a review from a team January 7, 2021 05:52
@drashna drashna merged commit 6e8adee into qmk:develop Jan 11, 2021
@spidey3 spidey3 deleted the twinkle_refine branch January 14, 2021 20:33
Eviscerae added a commit to Eviscerae/qmk_firmware that referenced this pull request Jul 17, 2021
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Refine twinkle to be smoother (use breathing curve)

* tune more for firmware size

* fix bug when v=255

~ drashna approved ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants