diff options
author | Drashna Jaelre <drashna@live.com> | 2019-04-22 11:55:55 -0700 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-04-22 11:55:55 -0700 |
commit | a2cec0594b15dc667adf7f1b0e35cb698dc1758d (patch) | |
tree | fdfd6646aa6bdd9003125406e2dc5e2069f8ea17 /users/drashna/rgb_stuff.c | |
parent | 6d73fe12779d6e8527d404572810ea95e714dce7 (diff) | |
download | firmware-a2cec0594b15dc667adf7f1b0e35cb698dc1758d.tar.gz firmware-a2cec0594b15dc667adf7f1b0e35cb698dc1758d.tar.bz2 firmware-a2cec0594b15dc667adf7f1b0e35cb698dc1758d.zip |
[Keymap] Update to Drashna Keymaps (#5594)
* Start to standardize macro timer
* Update Fractal layout
Specifically, limit the RGB Lighting, since it's too many for the power, and only have the KITT annimation on the front
* Update Iris keymap to use I2C for transport
* Remove TAP_CODE_DELAY from keyboard in favor of global setting
* Remove Woodpad
Since it\'s no longer in my possession
* Only enable LTO on AVR boards
* Run matrix_scans while doing startup light
* Run matrix_scan to get split keyboard code synced properly
* Fix rgb mode
* Remove custom debouncing settings
* Make RGB Light Startup Animation optional
* Fix opt def
* Remove extra tap code delay value
* Fix references to keebio boards
* Add support for LP Iris keyboard
* Add backlight code
* Make startup animation optional
* Update gitlab ci script
* Remove port declaration
* Revert avrgcc changes to gitlab ci file
* Don't re-set mods
* Remove MACRO_TIMER define
* Add custom name for crkbd
* Add name for Prime M pad
* Add names for ortho 4x12 boards
* Add some additional handling for rgb init
* Change thumb clusters on ergodox
* Switch Orthodox to I2C
* Fix Space in ergodox keymap
* Use OSL for ergodox layout
* Ugh, can't find a good layout
* Fix typo
* Fix up animation startup
* Cries in AVR
* Fix makefiles for ergodox ez boards
* Add support for "secret songs" in my userspace
* Reset debounce to 5ms for Ergodox EZ
* Fix gitlab CI yaml file
* More crying in AVR
* Cannot use rgb light and rgb matrix at the same time due to the WS2812 rgb matrix PR until the "Coexistance" PR is merged
* Update ODox for split common and i2c
* Add split config
* Impement Split code
* Add support for xscorpion OLED code
* Add OLED display config
* Fix OLED screen font
* Get OLED set up in vertical mode
* Remove old OLED code
* add per key support for crkbd
* Fix split changes
* RGB Tweeaks
* More OLED tweaks
* Fix rotation stuff
* Fix more OLED stuff
* Remove custom Debounce from Ergodox layout since it's no longer needed
Diffstat (limited to 'users/drashna/rgb_stuff.c')
-rw-r--r-- | users/drashna/rgb_stuff.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index a98ad590c..b5e145842 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -247,17 +247,20 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { void keyboard_post_init_rgb(void) { -#ifdef RGBLIGHT_ENABLE - rgblight_enable_noeeprom(); - layer_state_set_user(layer_state); - uint16_t old_hue = rgblight_config.hue; - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - for (uint16_t i = 360; i > 0; i--) { - rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255); - wait_ms(10); - } - layer_state_set_user(layer_state); +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION) + if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } + if (rgblight_config.enable) { + layer_state_set_user(layer_state); + uint16_t old_hue = rgblight_config.hue; + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 360; i > 0; i--) { + rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255); + matrix_scan(); + wait_ms(10); + } + } #endif + layer_state_set_user(layer_state); } void matrix_scan_rgb(void) { @@ -278,7 +281,7 @@ uint32_t layer_state_set_rgb(uint32_t state) { switch (biton32(state)) { case _MACROS: rgblight_sethsv_noeeprom_orange(); - userspace_config.is_overwatch ? rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 2) : rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 3); + userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3); break; case _MEDIA: rgblight_sethsv_noeeprom_chartreuse(); |