-
-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
Addition of hard brigtness limit for RGB_Matrix #3299
Conversation
yiancar
commented
Jul 3, 2018
- Added a define "RGB_MATRIX_MAXIMUM_BRIGHTNESS" to enable hard limiting the maximum brightness for rgb_matrix
- Used the above define to limit the maximum brigthness of HS60 for better stability
- Added a define "RGB_MATRIX_MAXIMUM_BRIGHTNESS" to enable hard limiting the maximum brightness for rgb_matrix - Used the above define to limit the maximum brigthness of HS60 for better stability
Please let me know if you approve of this and I will be adding documentation as well! |
quantum/rgb_matrix.c
Outdated
@@ -41,6 +41,10 @@ rgb_config_t rgb_matrix_config; | |||
#define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT | |||
#endif | |||
|
|||
#ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS |
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.
It may be a good to limit the value too, so that we can't have a value higher than 255.
so maybe instead, something like:
#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > 255
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#endif
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.
cool yea agreed!
Perfect - thanks folks! |
* Addition of hard brigtness limit for RGB_Matrix - Added a define "RGB_MATRIX_MAXIMUM_BRIGHTNESS" to enable hard limiting the maximum brightness for rgb_matrix - Used the above define to limit the maximum brigthness of HS60 for better stability * Added docs for new rgb_matrix define * Addition of check for maximum brightness
* master: (174 commits) Addition of hard brigtness limit for RGB_Matrix (qmk#3299) Phantom refactor and Configurator update (qmk#3285) Fixed pin for RGB on lets_split/sockets keyboard (qmk#3284) qwerty_code_friendly: update for renamed macro (qmk#3283) defaulted to 5 rows when HELIX_ROWS is not defined (qmk#3282) Omnikey Blackheart refactor (qmk#3280) OK60 Refactor and Configurator support (qmk#3279) Nyquist Configurator support and keymap refactor (qmk#3278) Novelpad refactor and Configurator support (qmk#3276) Nano refactor and Configurator update (qmk#3275) Helix five rows jis (qmk#3274) Miuni32 refactor and Configurator support (qmk#3273) Mitosis refactor and Configurator support (qmk#3271) Helix fix configrator problem (qmk#3270) ErgoDash Hardware Update (qmk#3269) Helix shrink config (qmk#3268) readme update to wanleg layout (qmk#3266) Maxr1998's contra layout (qmk#3267) Add XD75 keymap (qmk#3263) add QMK DFU make option to gherkin, and bootloader replacement instructions (qmk#3253) ...
* Addition of hard brigtness limit for RGB_Matrix - Added a define "RGB_MATRIX_MAXIMUM_BRIGHTNESS" to enable hard limiting the maximum brightness for rgb_matrix - Used the above define to limit the maximum brigthness of HS60 for better stability * Added docs for new rgb_matrix define * Addition of check for maximum brightness
* Addition of hard brigtness limit for RGB_Matrix - Added a define "RGB_MATRIX_MAXIMUM_BRIGHTNESS" to enable hard limiting the maximum brightness for rgb_matrix - Used the above define to limit the maximum brigthness of HS60 for better stability * Added docs for new rgb_matrix define * Addition of check for maximum brightness