From dda31afba4ce3569300d1971876a9e95221e951c Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Sun, 22 Aug 2021 22:50:44 -0700 Subject: [PATCH 1/5] Expand the colors! --- layouts/community/ortho_4x12/drashna/keymap.c | 15 ++++++++------- users/drashna/drashna.h | 7 ++++++- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 9ef2317f445e..cb3166c9403f 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -215,11 +215,12 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); uint8_t this_osm = get_oneshot_mods(); - bool is_ez; # ifdef KEYBOARD_planck_ez - is_ez = true; +# define THUMB_LED 41 +# else +# define THUMB_LED 42 # endif - +# define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) # if defined(RGBLIGHT_ENABLE) if (!userspace_config.rgb_layer_change) # else @@ -265,16 +266,16 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { switch (get_highest_layer(default_layer_state)) { case _DEFAULT_LAYER_1: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF); + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_1_RGB); break; case _DEFAULT_LAYER_2: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF); + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_2_RGB); break; case _DEFAULT_LAYER_3: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00); + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_3_RGB); break; case _DEFAULT_LAYER_4: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21); + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_4_RGB); break; } diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index a1fa3ffa92c8..af26fdc433f1 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -76,10 +76,15 @@ enum userspace_layers { #endif #define DEFAULT_LAYER_1_HSV HSV_CYAN -#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN +#define DEFAULT_LAYER_2_HSV HSV_CHARTREUSE #define DEFAULT_LAYER_3_HSV HSV_MAGENTA #define DEFAULT_LAYER_4_HSV HSV_GOLDENROD +#define DEFAULT_LAYER_1_RGB RGB_CYAN +#define DEFAULT_LAYER_2_RGB RGB_CHARTREUSE +#define DEFAULT_LAYER_3_RGB RGB_MAGENTA +#define DEFAULT_LAYER_4_RGB RGB_GOLDENROD + bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); void matrix_init_keymap(void); From 23d48e8b50153b625e53cc49cb0e9e7de296cb2b Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Sun, 22 Aug 2021 23:06:52 -0700 Subject: [PATCH 2/5] Move layer callback --- users/drashna/drashna.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 13421f39d7ed..3423e379a1e7 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -172,7 +172,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } - state = layer_state_set_keymap(state); state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #if defined(RGBLIGHT_ENABLE) state = layer_state_set_rgb_light(state); @@ -188,6 +187,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } } #endif + state = layer_state_set_keymap(state); return state; } From a59c1e764e78ee112331146c1eaea2171cbdca59 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Mon, 23 Aug 2021 18:36:38 -0700 Subject: [PATCH 3/5] Fix defines for pmw3360 --- keyboards/handwired/tractyl_manuform/5x6_right/config.h | 3 --- .../handwired/tractyl_manuform/5x6_right/f411/config.h | 6 ++---- .../handwired/tractyl_manuform/5x6_right/teensy2pp/config.h | 3 +++ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h index 5d75432aed8e..d1860c3378b9 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h @@ -50,6 +50,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - -/* PMW3360 Settings */ -#define PMW3360_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h index d3e0598cd644..cc4efedb86ea 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -91,8 +91,6 @@ along with this program. If not, see . // #define EXTERNAL_EEPROM_BYTE_COUNT 8196 // #define EXTERNAL_EEPROM_PAGE_SIZE 32 // #define EXTERNAL_EEPROM_ADDRESS_SIZE 2 -#define DEBUG_EEPROM_OUTPUT +// #define DEBUG_EEPROM_OUTPUT -#define PMW_CS_PIN B0 -#define SPI_MODE 0 -#define SPI_DIVISOR 64 +#define PMW3360_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h index 44a66750b9f9..1317fd0894d7 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h @@ -48,3 +48,6 @@ along with this program. If not, see . { D5 } #define ENCODERS_PAD_B \ { D4 } + +/* PMW3360 Settings */ +#define PMW3360_CS_PIN B0 From 763d089ee8bf60a2a3b14a282a3c3891ba111355 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Mon, 23 Aug 2021 20:45:17 -0700 Subject: [PATCH 4/5] Re-institute max rgb brightness for tractyl manuform --- .../handwired/tractyl_manuform/5x6_right/teensy2pp/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h index 1317fd0894d7..2391020598af 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h @@ -34,6 +34,7 @@ along with this program. If not, see . #define RGBLIGHT_SPLIT #define RGBLED_SPLIT \ { 10, 10 } +#define RGBLIGHT_LIMIT_VAL 80 #define DEBUG_LED_PIN D6 From 8deb455fbea6bff6520bbeaf090439e0d20b72ed Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Tue, 24 Aug 2021 01:00:51 -0700 Subject: [PATCH 5/5] fix merge conflicts --- users/drashna/transport_sync.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c index 38434751e67a..fdd596c04c1f 100644 --- a/users/drashna/transport_sync.c +++ b/users/drashna/transport_sync.c @@ -71,10 +71,6 @@ void keyboard_post_init_transport_sync(void) { void user_transport_update(void) { if (is_keyboard_master()) { -# ifdef OLED_ENABLE - user_state.oled_on = is_oled_on(); -# endif - transport_keymap_config = keymap_config.raw; transport_userspace_config = userspace_config.raw; #ifdef AUDIO_ENABLE @@ -89,13 +85,6 @@ void user_transport_update(void) { #endif } else { -# ifdef OLED_ENABLE - if (user_state.oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif keymap_config.raw = transport_keymap_config; userspace_config.raw = transport_userspace_config; #ifdef UNICODE_ENABLE