diff options
author | Joshua Diamond <josh@windowoffire.com> | 2022-08-28 13:10:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-28 10:10:28 -0700 |
commit | 37a85e1f9b5d6ad28e52b800f1b17d68ee5e4892 (patch) | |
tree | 292c6e4525523d125ed99c8b7b5b29b18c2a4667 /users/spidey3/layer_rgb.c | |
parent | ef0c87c976ff298f2e34e417808ed816f7ecb0b5 (diff) |
More spidey3 userspace cleanup (#18049)
Diffstat (limited to 'users/spidey3/layer_rgb.c')
-rw-r--r-- | users/spidey3/layer_rgb.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index 671205362f..c867468194 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -65,6 +65,7 @@ const rgblight_segment_t PROGMEM _uc_mac_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORN // UC_WIN disabled in config.h // UC_BSD not implemented const rgblight_segment_t PROGMEM _uc_winc_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_CYAN)); +const rgblight_segment_t PROGMEM _uc_emacs_layer[] = RGBLIGHT_LAYER_SEGMENTS(CORNER_BR(HSV_GREEN)); // Now define the array of layers. Higher numbered layers take precedence. const rgblight_segment_t *const PROGMEM _rgb_layers[] = { @@ -89,6 +90,7 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = { [UNICODE_OFFSET + UC_WIN] = _none, [UNICODE_OFFSET + UC_BSD] = _none, [UNICODE_OFFSET + UC_WINC] = _uc_winc_layer, + [UNICODE_OFFSET + UC_EMACS] = _uc_emacs_layer, [UNICODE_OFFSET + UC__COUNT] = NULL }; @@ -300,8 +302,8 @@ void matrix_scan_user_rgb(void) { # ifdef STARTUP_ANIMATION_DEBUG dprintf("sua RAMP_DOWN counter=%u\n", counter); # endif + rgblight_sethsv_noeeprom(old_config.hue, STARTUP_ANIMATION_SATURATION, counter); if (counter >= STARTUP_ANIMATION_FADE_STEP) { - rgblight_sethsv_noeeprom(old_config.hue, STARTUP_ANIMATION_SATURATION, counter); counter -= STARTUP_ANIMATION_FADE_STEP; } else { startup_animation_state = CLEAN_UP; @@ -456,7 +458,9 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { break; case RGB_TOG: - rgb_layer_ack_yn(rgblight_config.enable); + // Hack - we only get called on the press for RGB_TOG, + // but the flag is only flipped on the release... + rgb_layer_ack_yn(!rgblight_config.enable); break; #ifdef VELOCIKEY_ENABLE @@ -473,10 +477,14 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { break; #endif -#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) - case SPI_LNX: - case SPI_OSX: - case SPI_WIN: +#if defined(UNICODE_COMMON_ENABLE) + case UC_M_MA: + case UC_M_LN: + case UC_M_WI: + case UC_M_BS: + case UC_M_WC: + case UC_M_EM: + case UC_MOD: case UC_RMOD: rgb_layer_ack(ACK_MEH); |