More spidey3 userspace cleanup (#18049)

This commit is contained in:
Joshua Diamond 2022-08-28 13:10:28 -04:00 committed by GitHub
parent ef0c87c976
commit 37a85e1f9b
Failed to generate hash of commit
11 changed files with 56 additions and 69 deletions

View file

@ -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);