From ed6d5d5b7be2e41d184b484c70562651ed1f2f45 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 14:16:00 -0700 Subject: Re-add debounce to ergodox EZ --- layouts/community/ergodox/drashna/config.h | 1 + 1 file changed, 1 insertion(+) (limited to 'layouts') diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 7feaf6f252..afc5a1ddc1 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 -- cgit v1.2.3 From 42a6bd2fd4f797a5ef629621cd50ca4ac2a7f835 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 7 May 2019 21:08:41 -0700 Subject: Fix rgb matrix helper function --- layouts/community/ergodox/drashna/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'layouts') diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 08689cf3de..fd867ede54 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 ); -- cgit v1.2.3 From 667b927004641d6352378af5eb19785572dbc341 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 11 May 2019 12:25:59 -0700 Subject: Disable more RGB matrix modes --- layouts/community/ergodox/drashna_glow/config.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'layouts') diff --git a/layouts/community/ergodox/drashna_glow/config.h b/layouts/community/ergodox/drashna_glow/config.h index 5eb1c6d0f3..e6c8223e91 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 -- cgit v1.2.3 From f520316124fb789af0981fd6e5381f090c300acb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 12 May 2019 10:33:10 -0700 Subject: 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(-) (limited to 'layouts') diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index afc5a1ddc1..821710ed8e 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 -- cgit v1.2.3 From 6689f900fc0ed9022706af7605d40225a3348f63 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 14:48:53 -0700 Subject: Consolidate RGB Matrix layer indication function And changes to iris --- layouts/community/ergodox/drashna/keymap.c | 37 ++++++++++----------------- layouts/community/ortho_4x12/drashna/keymap.c | 30 ++++++++-------------- 2 files changed, 25 insertions(+), 42 deletions(-) (limited to 'layouts') diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index fd867ede54..71ac549aeb 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 9b0c2d7949..3ebcd84a69 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; } } } -- cgit v1.2.3 From 2a6cb0487656b2f954ff6f01f41628138fed9a58 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 19:40:19 -0700 Subject: Fix lighting issue for gamepad --- layouts/community/ergodox/drashna/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layouts') diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 71ac549aeb..74382f1752 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; -- cgit v1.2.3 From 89e9785d7a87e8dbb941dd272c032f34658169fd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 17 May 2019 15:21:45 -0700 Subject: Update my code to use layer_state_t typedef --- layouts/community/ortho_4x12/drashna/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts') diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 3ebcd84a69..c1c016ce9f 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); -- cgit v1.2.3