From 38fdf7a2d2f3f0bb9c21332b81a289de94b9870a Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Fri, 12 Jul 2019 15:16:28 +0200 Subject: [Keymap] Add missing tap dance action and fix RGB hues in personal keymaps (#6312) * Add missing TD_RSF_RCT tap dance * Use standard QMK HSV and RGB structs, fix Godspeed colors * Move PROGMEM after the type in RGB intervals * Add MODERN_DOLCH_RED color, use it on KBD6X * Use 255 instead of RGBLIGHT_LIMIT_VAL in color definitions * Remove IS_COMMAND override on Whitefox --- users/konstantin/rgb.c | 15 ++++++++------- users/konstantin/rgb.h | 17 +++-------------- users/konstantin/tap_dance.c | 1 + users/konstantin/tap_dance.h | 2 ++ 4 files changed, 14 insertions(+), 21 deletions(-) (limited to 'users/konstantin') diff --git a/users/konstantin/rgb.c b/users/konstantin/rgb.c index 0f0c73c49e..a96cad019d 100644 --- a/users/konstantin/rgb.c +++ b/users/konstantin/rgb.c @@ -1,24 +1,25 @@ #include "rgb.h" #ifdef RGBLIGHT_EFFECT_BREATHING -const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {20, 30, 5, 10}; +const uint8_t PROGMEM RGBLED_BREATHING_INTERVALS[] = { 20, 30, 5, 10 }; #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD -const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_RAINBOW_MOOD_INTERVALS[] = { 20, 50, 100 }; #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL -const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_RAINBOW_SWIRL_INTERVALS[] = { 20, 50, 100 }; #endif #ifdef RGBLIGHT_EFFECT_SNAKE -const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_SNAKE_INTERVALS[] = { 20, 50, 100 }; #endif #ifdef RGBLIGHT_EFFECT_KNIGHT -const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {20, 50, 100}; +const uint8_t PROGMEM RGBLED_KNIGHT_INTERVALS[] = { 20, 50, 100 }; #endif -const hsv_t GODSPEED_BLUE = { .h = 280, .s = 68, .v = RGBLIGHT_LIMIT_VAL }; -const hsv_t GODSPEED_YELLOW = { .h = 38, .s = 153, .v = RGBLIGHT_LIMIT_VAL }; +const HSV GODSPEED_BLUE = { .h = 198, .s = 68, .v = 255 }; +const HSV GODSPEED_YELLOW = { .h = 27, .s = 153, .v = 255 }; +const HSV MODERN_DOLCH_RED = { .h = 252, .s = 255, .v = 144 }; diff --git a/users/konstantin/rgb.h b/users/konstantin/rgb.h index aed855aa05..36a9d9cd74 100644 --- a/users/konstantin/rgb.h +++ b/users/konstantin/rgb.h @@ -2,17 +2,6 @@ #include "quantum.h" -typedef struct { - uint16_t h; // 0–360 - uint8_t s; // 0–255 - uint8_t v; // 0–255 -} hsv_t; - -typedef struct { - uint8_t r; // 0–255 - uint8_t g; // 0–255 - uint8_t b; // 0–255 -} rgb_t; - -extern const hsv_t GODSPEED_BLUE; -extern const hsv_t GODSPEED_YELLOW; +extern const HSV GODSPEED_BLUE; +extern const HSV GODSPEED_YELLOW; +extern const HSV MODERN_DOLCH_RED; diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c index fa43288ce7..ba1453fc05 100644 --- a/users/konstantin/tap_dance.c +++ b/users/konstantin/tap_dance.c @@ -110,6 +110,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_LALT), [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI), [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), + [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RSFT, KC_RCTL), [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h index 13d682a603..d2f00c8cb3 100644 --- a/users/konstantin/tap_dance.h +++ b/users/konstantin/tap_dance.h @@ -7,6 +7,7 @@ #define RAL_LAL TD(TD_RAL_LAL) #define RAL_RGU TD(TD_RAL_RGU) #define RCT_RSF TD(TD_RCT_RSF) +#define RSF_RCT TD(TD_RSF_RCT) #define LSFT_FN TD(TD_LSFT_FN) #define RCTL_FN TD(TD_RCTL_FN) @@ -18,6 +19,7 @@ enum tap_dance { TD_RAL_LAL, TD_RAL_RGU, TD_RCT_RSF, + TD_RSF_RCT, TD_LSFT_FN, TD_RCTL_FN, -- cgit v1.2.3