From f06910f5bf4de66b800342a47f24800e2f229b07 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 00:22:55 -0700 Subject: [PATCH 01/15] Re-enable Audio And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes! --- keyboards/keebio/iris/keymaps/drashna/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index 1311ab280..a315e1a0b 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -5,7 +5,7 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = no +AUDIO_ENABLE = yes NKRO_ENABLE = yes BACKLIGHT_ENABLE = no SWAP_HANDS_ENABLE = no From ed6d5d5b7be2e41d184b484c70562651ed1f2f45 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 14:16:00 -0700 Subject: [PATCH 02/15] Re-add debounce to ergodox EZ --- layouts/community/ergodox/drashna/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 7feaf6f25..afc5a1ddc 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -13,3 +13,4 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE +#define DEBOUNCE 10 From 42a6bd2fd4f797a5ef629621cd50ca4ac2a7f835 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 21:08:41 -0700 Subject: [PATCH 03/15] Fix rgb matrix helper function --- layouts/community/ergodox/drashna/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 08689cf3d..fd867ede5 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -399,7 +399,8 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { +extern led_config_t g_led_config; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { for (int i = 0; i < DRIVER_LED_TOTAL; i++) { if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { rgb_matrix_set_color( i, red, green, blue ); From 6af0c1e1293cbc50b7d5136c2c8260cec1d1a21b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 9 May 2019 23:50:30 -0700 Subject: [PATCH 04/15] Make sure that RGM Matrix is checked properly --- users/drashna/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 085840f1c..cdb9e5436 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -33,6 +33,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif +RGB_MATRIX_ENABLE ?= no ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) SRC += rgb_stuff.c endif From db7c3b9220eb97e3c453e86c461760eda3652700 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 10 May 2019 01:36:07 -0700 Subject: [PATCH 05/15] Fix merge commit? --- keyboards/crkbd/keymaps/drashna/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index 0b035ba3c..670ad9fec 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -69,6 +69,7 @@ along with this program. If not, see . # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif #ifdef AUDIO_ENABLE # define B6_AUDIO From 667b927004641d6352378af5eb19785572dbc341 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 11 May 2019 12:25:59 -0700 Subject: [PATCH 06/15] Disable more RGB matrix modes --- layouts/community/ergodox/drashna_glow/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h index 5eb1c6d0f..e6c8223e9 100644 --- a/layouts/community/ergodox/drashna_glow/config.h +++ b/layouts/community/ergodox/drashna_glow/config.h @@ -18,7 +18,9 @@ # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS From f520316124fb789af0981fd6e5381f090c300acb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 12 May 2019 10:33:10 -0700 Subject: [PATCH 07/15] Increase Debounce for Ergodox EZ The performance improvements have made it necessary, actually --- layouts/community/ergodox/drashna/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index afc5a1ddc..821710ed8 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -13,4 +13,4 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE -#define DEBOUNCE 10 +#define DEBOUNCE 15 From 6689f900fc0ed9022706af7605d40225a3348f63 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 14:48:53 -0700 Subject: [PATCH 08/15] Consolidate RGB Matrix layer indication function And changes to iris --- keyboards/crkbd/keymaps/drashna/keymap.c | 54 ++++++++++++++++++- .../keebio/iris/keymaps/drashna/keymap.c | 2 +- layouts/community/ergodox/drashna/keymap.c | 37 +++++-------- layouts/community/ortho_4x12/drashna/keymap.c | 30 ++++------- users/drashna/rgb_stuff.c | 11 ++++ users/drashna/rgb_stuff.h | 2 + 6 files changed, 92 insertions(+), 44 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 3eea7af9f..75b62cad8 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -22,7 +22,7 @@ enum crkbd_keycodes { KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) @@ -156,6 +156,8 @@ void add_keylog(uint16_t keycode) { if (keycode < 60) { keylog_str[0] = code_to_name[keycode]; } + keylog_str[KEYLOG_LEN] = 0; + log_timer = timer_read(); } @@ -267,3 +269,53 @@ uint16_t get_tapping_term(uint16_t keycode) { return TAPPING_TERM; } } + +#ifdef RGB_MATRIX_ENABLE + +void rgb_matrix_indicators_user(void) { + if ( userspace_config.rgb_layer_change && +#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +#endif +#if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +#else + rgb_matrix_config.enable +#endif + ) { + switch (biton32(layer_state)) { + case _MODS: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _GAMEPAD: + rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_UNDERGLOW); break; + case _DIABLO: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + case _RAISE: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _LOWER: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _ADJUST: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + default: + switch (biton32(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_UNDERGLOW); break; + case _COLEMAK: + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + case _DVORAK: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _WORKMAN: + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_UNDERGLOW); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_UNDERGLOW); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_UNDERGLOW); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + } + } + } +} +#endif diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index 95092cc52..44ffb59f6 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -13,7 +13,7 @@ KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) #define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index fd867ede5..71ac549ae 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -399,15 +399,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -extern led_config_t g_led_config; -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - void rgb_matrix_indicators_user(void) { if ( userspace_config.rgb_layer_change && #ifdef RGB_DISABLE_WHEN_USB_SUSPENDED @@ -421,9 +412,9 @@ void rgb_matrix_indicators_user(void) { ) { switch (biton32(layer_state)) { case _MODS: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _GAMEPAD: - rgb_matrix_layer_helper(0xFF, 0x80, 0x00); + rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_MODIFIER); rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E @@ -439,31 +430,31 @@ void rgb_matrix_indicators_user(void) { break; case _DIABLO: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; default: switch (biton32(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break; + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break; + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break; + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; } } } diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 9b0c2d794..3ebcd84a6 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -180,14 +180,6 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color( i, red, green, blue ); - } - } -} - void rgb_matrix_indicators_user(void) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); @@ -209,29 +201,29 @@ void rgb_matrix_indicators_user(void) { ) { switch (biton32(layer_state)) { case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; default: switch (biton32(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break; + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; case _NORMAN: - rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break; + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; case _MALTRON: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; case _EUCALYN: - rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break; + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; case _CARPLAX: - rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break; + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; } } } diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 9e19747fa..342186617 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -334,3 +334,14 @@ uint32_t layer_state_set_rgb(uint32_t state) { return state; } + +#ifdef RGB_MATRIX_ENABLE +extern led_config_t g_led_config; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} +#endif diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 886f20ffc..572104612 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -19,3 +19,5 @@ uint32_t layer_state_set_rgb(uint32_t state); uint32_t default_layer_state_set_rgb(uint32_t state); void rgblight_sethsv_default_helper(uint8_t index); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type); From 2a6cb0487656b2f954ff6f01f41628138fed9a58 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 19:40:19 -0700 Subject: [PATCH 09/15] Fix lighting issue for gamepad --- layouts/community/ergodox/drashna/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 71ac549ae..74382f175 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -424,8 +424,8 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F - rgb_matrix_set_color(27, 0xFF, 0xFF, 0xFF); // 1 - rgb_matrix_set_color(26, 0x00, 0xFF, 0x00); // 2 + rgb_matrix_set_color(userspace_config.swapped_numbers ? 27 : 26, 0xFF, 0xFF, 0xFF); // 1 + rgb_matrix_set_color(userspace_config.swapped_numbers ? 26 : 27, 0x00, 0xFF, 0x00); // 2 rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3 break; From ed08787aaac2f4f96f11f7c074af9c825b6e4917 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 20:55:19 -0700 Subject: [PATCH 10/15] Update Corne Keyboard configuration --- keyboards/crkbd/keymaps/drashna/config.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index 670ad9fec..724d52c38 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -48,17 +48,24 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING # define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_BEACON # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_SOLID_REACTIVE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE @@ -67,6 +74,8 @@ along with this program. If not, see . # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif From 05e2baaa49ffaef14f704e5b25763fc1ec967b21 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 20:58:46 -0700 Subject: [PATCH 11/15] Update Corne Keyboard layout --- keyboards/crkbd/keymaps/drashna/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 75b62cad8..a7a3decf1 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -20,9 +20,9 @@ enum crkbd_keycodes { ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \ + KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ + KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) From bcfc24fd13661612b4af3836b174fe02960a13e7 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 21:03:17 -0700 Subject: [PATCH 12/15] Update KC_MAKE macro to better handle crkbd split --- users/drashna/process_records.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index a5487b585..770219917 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -39,22 +39,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { clear_mods(); clear_oneshot_mods(); send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); #ifndef MAKE_BOOTLOADER - if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) + if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) +#endif + { + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); + #endif // bootloader options + } + if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } +#ifdef RGB_MATRIX_SPLIT_RIGHT + send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); #endif - { - #if defined(__arm__) - send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); - #endif // bootloader options - } - if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); } + break; case VRSN: // Prints firmware version From ebfc39cc5083dd7c597f274883621b932ce6c33f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 14 May 2019 09:11:57 -0700 Subject: [PATCH 13/15] Tweaks to Corne Keyboard Layout --- keyboards/crkbd/keymaps/drashna/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index a7a3decf1..a96420379 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - _______, _______, _______, KC_NUKE, TG_MODS, _______ + _______, KC_NUKE, _______, _______, TG_MODS, _______ ) }; From 356521864e9f49d50131f4779ff9e56dc8b12e8f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 14 May 2019 23:26:41 -0700 Subject: [PATCH 14/15] Enable RGB Matrix Sleep --- keyboards/crkbd/keymaps/drashna/keymap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index a96420379..af0bc0d9a 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -272,6 +272,14 @@ uint16_t get_tapping_term(uint16_t keycode) { #ifdef RGB_MATRIX_ENABLE +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); +} + void rgb_matrix_indicators_user(void) { if ( userspace_config.rgb_layer_change && #ifdef RGB_DISABLE_WHEN_USB_SUSPENDED From 89e9785d7a87e8dbb941dd272c032f34658169fd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 17 May 2019 15:21:45 -0700 Subject: [PATCH 15/15] Update my code to use layer_state_t typedef --- layouts/community/ortho_4x12/drashna/keymap.c | 2 +- users/drashna/drashna.c | 8 ++++---- users/drashna/drashna.h | 4 ++-- users/drashna/rgb_stuff.c | 2 +- users/drashna/rgb_stuff.h | 4 ++-- users/drashna/template.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 3ebcd84a6..c1c016ce9 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -319,7 +319,7 @@ void dip_update(uint8_t index, bool active) { #endif // KEYBOARD_planck_rev6 #ifdef KEYBOARD_planck_ez -uint32_t layer_state_set_keymap(uint32_t state) { +layer_state_t layer_state_set_keymap(layer_state_t state) { palClearPad(GPIOB, 8); palClearPad(GPIOB, 9); diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 7c60a2e4a..acc6b9f9e 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -187,13 +187,13 @@ void matrix_scan_user(void) { __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } // on layer change, no matter where the change was initiated // Then runs keymap's layer change check -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #ifdef RGBLIGHT_ENABLE state = layer_state_set_rgb(state); @@ -203,12 +203,12 @@ uint32_t layer_state_set_user(uint32_t state) { __attribute__ ((weak)) -uint32_t default_layer_state_set_keymap (uint32_t state) { +layer_state_t default_layer_state_set_keymap (layer_state_t state) { return state; } // Runs state check and changes underglow color and animation -uint32_t default_layer_state_set_user(uint32_t state) { +layer_state_t default_layer_state_set_user(layer_state_t state) { state = default_layer_state_set_keymap(state); #if 0 #ifdef RGBLIGHT_ENABLE diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 5df67792a..507504f04 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -67,8 +67,8 @@ void shutdown_keymap(void); void suspend_power_down_keymap(void); void suspend_wakeup_init_keymap(void); void matrix_scan_keymap(void); -uint32_t layer_state_set_keymap (uint32_t state); -uint32_t default_layer_state_set_keymap (uint32_t state); +layer_state_t layer_state_set_keymap (layer_state_t state); +layer_state_t default_layer_state_set_keymap (layer_state_t state); void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 342186617..7d364fa68 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -275,7 +275,7 @@ void matrix_scan_rgb(void) { } -uint32_t layer_state_set_rgb(uint32_t state) { +layer_state_t layer_state_set_rgb(layer_state_t state) { #ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (biton32(state)) { diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 572104612..f5bbd0f3b 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -15,8 +15,8 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); void scan_rgblight_fadeout(void); void keyboard_post_init_rgb(void); void matrix_scan_rgb(void); -uint32_t layer_state_set_rgb(uint32_t state); -uint32_t default_layer_state_set_rgb(uint32_t state); +layer_state_t layer_state_set_rgb(layer_state_t state); +layer_state_t default_layer_state_set_rgb(layer_state_t state); void rgblight_sethsv_default_helper(uint8_t index); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); diff --git a/users/drashna/template.c b/users/drashna/template.c index 0e188f3a5..d90e6bdec 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c @@ -62,11 +62,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } -uint32_t layer_state_set_user (uint32_t state) { +layer_state_t layer_state_set_user (layer_state_t state) { return layer_state_set_keymap (state); }