Skip to content

Commit

Permalink
Fix RGBLIGHT startup color (qmk#1975)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
drashna authored and Gareth RSS Pye committed May 1, 2018
1 parent b469c0c commit 0231435
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion keyboards/ergodox_ez/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#endif
};

// Runs constantly in the background, in a loop.
Expand Down

0 comments on commit 0231435

Please sign in to comment.