-
-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() #5484
Conversation
…le instead of exp() and sin()
add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
I've been testing this one for the last few days, it gives a nice reduction in firmware size! |
Is it possible to specify a custom table for this? |
@drashna In the top of |
Ah, I missed that. And I see that if you add the define for the table in a config.h, you can use your own. |
It's not really in the scope of this PR, but unfortunately, you cannot use the userspace folder to host the file. It has to be in a keymap file. Which is unfortunate. Otherwise, it looks good! |
The current makefile system has a search path set as follows:
I feel that it is ideal to change build_keyboard.mk as follows.
However, the easiest way is the following.
|
Another way is to do the following:
|
Thanks for the info! I think the changes to Also, I've tested the code, and it works perfectly. I don't see any issues with it, and I do see a drop in the firmware size. And I'd like to see this merged sooner, rather than later. Also, a similar change for the rgb matrix feature may be a good idea, for the future. |
Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in qmk#5484, and the fix created by mtei.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in #5484, and the fix created by mtei.
…le instead of exp() and sin() (qmk#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
…le instead of exp() and sin() (qmk#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in qmk#5484, and the fix created by mtei.
…le instead of exp() and sin() (qmk#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in qmk#5484, and the fix created by mtei.
…le instead of exp() and sin() (qmk#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in qmk#5484, and the fix created by mtei.
…le instead of exp() and sin() (qmk#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect.
Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in qmk#5484, and the fix created by mtei.
Description
This is alternative (radical) version of #5480.
Changed rgblight.c's breathing effect to use a fixed table instead of calculating with exp() and sin(). This change reduces the size of the firmware when using the rgblight breathing effect.
I could not decide whether to adopt #5480 or this. So I presented both.This is the result of compilation smaller than #5480, so use this.
Types of Changes
Issues Fixed or Closed by This PR
Checklist