-
-
Notifications
You must be signed in to change notification settings - Fork 39.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
refactor: move default RGB/LED matrix #defines #21938
Merged
zvecr
merged 3 commits into
qmk:develop
from
lesshonor:refactor/led_rgb_matrix_macro_defs
Sep 28, 2023
Merged
refactor: move default RGB/LED matrix #defines #21938
zvecr
merged 3 commits into
qmk:develop
from
lesshonor:refactor/led_rgb_matrix_macro_defs
Sep 28, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions).
github-actions
bot
added
core
keyboard
keymap
via
Adds via keymap and/or updates keyboard for via support
labels
Sep 6, 2023
zvecr
requested changes
Sep 7, 2023
and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com>
zvecr
reviewed
Sep 7, 2023
Co-authored-by: Joel Challis <git@zvecr.com>
dexter93
approved these changes
Sep 8, 2023
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.
this has been a long time coming. Yes please
Xelus22
approved these changes
Sep 28, 2023
fauxpark
approved these changes
Sep 28, 2023
zvecr
approved these changes
Sep 28, 2023
mechlovin
pushed a commit
to mechlovin/qmk_firmware
that referenced
this pull request
Oct 25, 2023
* refactor: move default RGB/LED matrix #defines Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions). * style: use if(n)def for consistency and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com> * refactor: remove INDICATOR_MAX_BRIGHTNESS macro Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Joel Challis <git@zvecr.com>
christrotter
pushed a commit
to christrotter/qmk_firmware
that referenced
this pull request
Nov 28, 2023
* refactor: move default RGB/LED matrix #defines Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions). * style: use if(n)def for consistency and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com> * refactor: remove INDICATOR_MAX_BRIGHTNESS macro Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Joel Challis <git@zvecr.com>
zgagnon
pushed a commit
to zgagnon/qmk_firmware_waterfowl
that referenced
this pull request
Dec 15, 2023
* refactor: move default RGB/LED matrix #defines Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions). * style: use if(n)def for consistency and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com> * refactor: remove INDICATOR_MAX_BRIGHTNESS macro Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Joel Challis <git@zvecr.com>
future-figs
pushed a commit
to future-figs/qmk_firmware
that referenced
this pull request
Dec 27, 2023
* refactor: move default RGB/LED matrix #defines Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions). * style: use if(n)def for consistency and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com> * refactor: remove INDICATOR_MAX_BRIGHTNESS macro Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Joel Challis <git@zvecr.com>
mute-civilian
pushed a commit
to mute-civilian/qmk_firmware
that referenced
this pull request
Feb 17, 2024
* refactor: move default RGB/LED matrix #defines Moving the fallback definitions of macros like LED_MATRIX_VAL_STEP and RGB_MATRIX_MAXIMUM_BRIGHTNESS to header files allows keyboards to leverage these defaults without requiring #ifdef guards (and often repeating said fallback definitions). * style: use if(n)def for consistency and remove redundant UINT8_MAX checks on maximum brightness Co-authored-by: Joel Challis <git@zvecr.com> * refactor: remove INDICATOR_MAX_BRIGHTNESS macro Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: Joel Challis <git@zvecr.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Moving the fallback definitions of macros like
LED_MATRIX_VAL_STEP
andRGB_MATRIX_MAXIMUM_BRIGHTNESS
to header files allows keyboards to leverage these defaults without requiring#ifdef
guards (and often repeating said fallback definitions)....also corrected a typo in the console output for
led_matrix_set_flags_eeprom_helper()
/rgb_matrix_set_flags_eeprom_helper()
.Generated SHAs for
default
andvia
keymaps usingqmk mass-compile -f 'exists(led_matrix.driver)' -e SKIP_VERSION=yes
andqmk mass-compile -f 'exists(rgb_matrix.driver)' -e SKIP_VERSION=yes
(...plusteleport/native
'sperfmode
keymaps) to verify this would not change existing behavior.Out of 1396, there were 9 mismatches:
junco/rev1:default
,keebio/convolution/rev1:default
,keychron/v3/iso:default
,keychron/v3/iso:via
,moonlander:default
,moonlander:via
all have console enabled, so were impacted by the typo fix.kbdfans/kbd67/mkiirgb/v3:default
,kbdfans/kbd67/mkiirgb/v3:via
andzykrah/fuyu:via
all manipulate a caps lock indicator based onRGB_MATRIX_MAXIMUM_BRIGHTNESS
/RGB_MATRIX_VAL_STEP
.The way the existing code was written, the indicators ended up with a value step of 8 while the rest of the lights defaulted to 16. It seems clear that the intent was to scale the indicator with everything else, so the affected keymaps/keyboard were modified accordingly. @zykrah @moyi4681
Types of Changes
Checklist