diff options
author | Erez Zukerman <bulk@ezuk.org> | 2017-11-06 09:44:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 09:44:54 -0500 |
commit | 90a6fea4e8aa5c2bb8f9e10dbb90cce78208d01d (patch) | |
tree | 5613501a9e173198727c39110a3e30a6027c8449 /keyboards/ergodox_ez/keymaps/default/keymap.c | |
parent | cf9f6bbd917c56e7347993f9116953628b16bc6a (diff) | |
parent | e45290a62e117c970155b992b34b2bb3cc8412f2 (diff) |
Merge pull request #1974 from qmk/f/ez_shine_layer_leds
Shine layer indication
Diffstat (limited to 'keyboards/ergodox_ez/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/ergodox_ez/keymaps/default/keymap.c | 92 |
1 files changed, 58 insertions, 34 deletions
diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index ccb4ae3ada..d2976812f5 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -211,39 +211,63 @@ uint32_t layer_state_set_user(uint32_t state) { uint8_t layer = biton32(state); switch (layer) { - case 0: - #ifdef RGBLIGHT_COLOR_LAYER_0 - rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); - #endif - break; - case 1: - ergodox_right_led_1_on(); - #ifdef RGBLIGHT_COLOR_LAYER_1 - rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); - #endif - break; - case 2: - ergodox_right_led_2_on(); - #ifdef RGBLIGHT_COLOR_LAYER_2 - rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); - #endif - break; - case 3: - #ifdef RGBLIGHT_COLOR_LAYER_3 - rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); - #endif - break; - case 4: - #ifdef RGBLIGHT_COLOR_LAYER_4 - rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); - #endif - break; - case 5: - #ifdef RGBLIGHT_COLOR_LAYER_5 - rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); - #endif - break; - } + case 0: + #ifdef RGBLIGHT_COLOR_LAYER_0 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); + #else + rgblight_init(); + #endif + break; + case 1: + ergodox_right_led_1_on(); + #ifdef RGBLIGHT_COLOR_LAYER_1 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1); + #endif + break; + case 2: + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_2 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2); + #endif + break; + case 3: + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_3 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3); + #endif + break; + case 4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + #ifdef RGBLIGHT_COLOR_LAYER_4 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4); + #endif + break; + case 5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_5 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5); + #endif + break; + case 6: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_6 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + case 7: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + #ifdef RGBLIGHT_COLOR_LAYER_7 + rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6); + #endif + break; + default: + break; + } return state; -};
\ No newline at end of file +}; |