Make default layer size 16-bit (#15286)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
parent
cfcd647b2e
commit
0da6562c4d
293 changed files with 1249 additions and 1309 deletions
|
@ -84,7 +84,7 @@ void matrix_scan_rgb(void) {
|
|||
layer_state_t layer_state_set_rgb(layer_state_t state) {
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
switch (biton32(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect
|
||||
switch (get_highest_layer(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect
|
||||
case _RAISE:
|
||||
rgblight_sethsv_noeeprom_green();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||
|
@ -98,7 +98,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
|
|||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 2);
|
||||
break;
|
||||
default: // Use a solid color for normal layers
|
||||
switch (biton32(default_layer_state)) {
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
rgblight_sethsv_noeeprom_magenta();
|
||||
break;
|
||||
|
@ -118,7 +118,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
|
|||
rgblight_sethsv_noeeprom_white();
|
||||
break;
|
||||
}
|
||||
biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
||||
get_highest_layer(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ void matrix_scan_indicator(void) {
|
|||
#endif // !INDICATOR_LIGHTS
|
||||
|
||||
void rgblight_fade_helper(bool direction){
|
||||
// true: increase val = fade in
|
||||
// true: increase val = fade in
|
||||
// false: decrease val = fade out
|
||||
for (uint8_t index = 0; index < RGBLIGHT_VAL_STEP ; index++) {
|
||||
direction ? rgblight_increase_val() : rgblight_decrease_val();
|
||||
|
@ -147,10 +147,10 @@ void fadeflash_leds(uint8_t hue, uint8_t sat, uint8_t val){
|
|||
// fade out, set new hue and saturation, fade in, fade out, set old color, fade in
|
||||
// this is used in leader.c
|
||||
// TODO: come up with a better name maybe
|
||||
rgblight_fade_helper(false);
|
||||
rgblight_sethsv_noeeprom(hue, sat, 0);
|
||||
rgblight_fade_helper(true);
|
||||
rgblight_fade_helper(false);
|
||||
rgblight_sethsv_noeeprom(base_hue, base_sat, 0);
|
||||
rgblight_fade_helper(true);
|
||||
rgblight_fade_helper(false);
|
||||
rgblight_sethsv_noeeprom(hue, sat, 0);
|
||||
rgblight_fade_helper(true);
|
||||
rgblight_fade_helper(false);
|
||||
rgblight_sethsv_noeeprom(base_hue, base_sat, 0);
|
||||
rgblight_fade_helper(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue