-
-
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
Fix RGBLIGHT startup color #1975
Merged
Merged
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
While it's awesome to see the layer indicating code in here (no really!), and the general rule is to not alter the default keymap/code.... The problem with the layer_state_set_kb call handling this, is that the code doesn't seem to be called at startup. So the default layer color won't ever get set on startup. It needs to be called in the init function to be properly set. I've played with this extensively, and if you check my keymaps, that is precisely why I have the setrgb/sethsv in the init function.
@drashna this is awesome! Thank you for the fix! |
jackhumbert
reviewed
Nov 6, 2017
@@ -194,7 +194,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
|
|||
// Runs just one time when the keyboard initializes. | |||
void matrix_init_user(void) { | |||
|
|||
#ifdef RGBLIGHT_COLOR_|LAYER_0 |
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.
Looks like you have an extra |
here :)
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.
Whoops! Fixed
Perfect! Thanks :) |
kgwong
pushed a commit
to kgwong/qmk_firmware
that referenced
this pull request
Nov 26, 2017
* Fix RGBLIGHT startup color While it's awesome to see the layer indicating code in here (no really!), and the general rule is to not alter the default keymap/code.... The problem with the layer_state_set_kb call handling this, is that the code doesn't seem to be called at startup. So the default layer color won't ever get set on startup. It needs to be called in the init function to be properly set. I've played with this extensively, and if you check my keymaps, that is precisely why I have the setrgb/sethsv in the init function. * Removed typo (pipe)
akatrevorjay
added a commit
to akatrevorjay/qmk_firmware
that referenced
this pull request
Apr 3, 2018
* 'master' of git://github.com/qmk/qmk_firmware: (291 commits) More "oscillope" keymap fixes. (qmk#1982) Improved README of yuuki and added RGB commands (qmk#1983) restructure converters (qmk#1825) qwerty_code_friendly: configurable left thumb Migrated most code from keymaps to userspace (qmk#1980) Small ergodox config fix and update. Update and move around drashna keymaps (qmk#1976) make it easy to customize logo image add pgm_read_dword for Infinity ErgoDox 333fred layout update (qmk#1971) Pete's 40th XD64 Layout Ergodox EZ and Atreus 42 key dvorak layout updates (qmk#1964) Correct the rules.mk documentation for auto shift. Fix RGBLIGHT startup color (qmk#1975) adds indication up to layer 7 restore default mode/color if no 0 color adds per-layer rgb color option to ez update gh60 info add gh60 info.json several improvements for mitosis:datagrok (qmk#1960) ...
LovesTha
pushed a commit
to LovesTha/qmk_firmware
that referenced
this pull request
Jul 24, 2018
* Fix RGBLIGHT startup color While it's awesome to see the layer indicating code in here (no really!), and the general rule is to not alter the default keymap/code.... The problem with the layer_state_set_kb call handling this, is that the code doesn't seem to be called at startup. So the default layer color won't ever get set on startup. It needs to be called in the init function to be properly set. I've played with this extensively, and if you check my keymaps, that is precisely why I have the setrgb/sethsv in the init function. * Removed typo (pipe)
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.
While it's awesome to see the layer indicating code in here (no really!), and the general rule is to not alter the default keymap/code....
The problem with the layer_state_set_kb call handling this, is that the code doesn't seem to be called at startup. So the default layer color won't ever get set on startup. It needs to be called in the init function to be properly set.
I've played with this a lot, and if you check my keymaps, that is precisely why I have the setrgb/sethsv in the init function.