From f7c253c73d0e1c5f5de79b39ebdc43b2baa5e285 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sat, 27 May 2023 17:47:31 +0900 Subject: [PATCH 1/9] layer status with RGB lighting/matrix --- .../crkbd/keymaps/thunderbird2086/config.h | 28 ++++++--- .../crkbd/keymaps/thunderbird2086/keycodes.h | 3 + .../crkbd/keymaps/thunderbird2086/keymap.c | 10 ++++ .../keymaps/thunderbird2086/layers_block.h | 4 +- .../keymaps/thunderbird2086/process_records.c | 37 ++++++++---- keyboards/crkbd/keymaps/thunderbird2086/rgb.c | 57 +++++++++++++++++++ .../crkbd/keymaps/thunderbird2086/rules.mk | 1 + 7 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 keyboards/crkbd/keymaps/thunderbird2086/rgb.c diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index ad2bfcabc7c7..92e37e78952c 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -14,6 +14,7 @@ # undef TAPPING_TERM #endif #define TAPPING_TERM 200 +#define VER_NEWLINE_WAIT 200 // in milliseconds #define NO_ACTION_ONESHOT @@ -32,26 +33,35 @@ #define RGBLIGHT_SLEEP #if defined(RGBLIGHT_ENABLE) +# define RGBLIGHT_LAYERS # define RGBLIGHT_LIMIT_VAL 150 # define RGBLIGHT_HUE_STEP 16 # define RGBLIGHT_SAT_STEP 32 # define RGBLIGHT_VAL_STEP 32 +# define RGBLIGHT_EFFECT_ALTERING +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_KNIGHT # define RGBLIGHT_EFFECT_RAINBOW_MOOD # define RGBLIGHT_EFFECT_RAINBOW_SWIRL -# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_TWINKLE #endif #if defined(RGB_MATRIX_ENABLE) -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +# define SPLIT_LAYER_STATE_ENABLE +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. -# define RGB_MATRIX_HUE_STEP 32 -# define RGB_MATRIX_SAT_STEP 64 -# define RGB_MATRIX_VAL_STEP 64 -# define RGB_MATRIX_SPD_STEP 20 -# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR +# define RGB_MATRIX_HUE_STEP 32 +# define RGB_MATRIX_SAT_STEP 64 +# define RGB_MATRIX_VAL_STEP 64 +# define RGB_MATRIX_SPD_STEP 20 +# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ diff --git a/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h b/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h index cb10a3ac0748..97ac780880c7 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h @@ -10,7 +10,10 @@ enum custom_keycodes { FUNCTION, CODE, ADJUST, +# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) RGBRST, +# endif + VRSN, // Secret Macros M_XXX1, M_XXX2, diff --git a/keyboards/crkbd/keymaps/thunderbird2086/keymap.c b/keyboards/crkbd/keymaps/thunderbird2086/keymap.c index 7bc23db8aa78..69c5d25fd445 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/keymap.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/keymap.c @@ -80,6 +80,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format off +#if defined(RGBLIGHT_ENABLE) +__attribute__((weak)) +void set_rgb_by_layer(layer_state_t state) { + return; +} +#endif + layer_state_t layer_state_set_user(layer_state_t state) { +# if defined(RGBLIGHT_ENABLE) + set_rgb_by_layer(state); +# endif return update_tri_layer_state(state, _FUNCTION, _ADJUST, _SECRET); } diff --git a/keyboards/crkbd/keymaps/thunderbird2086/layers_block.h b/keyboards/crkbd/keymaps/thunderbird2086/layers_block.h index ba41cd922349..db47ea65ed6d 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/layers_block.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/layers_block.h @@ -48,10 +48,10 @@ #if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) # define ________________________ADJUST_L2________________________ RGBRST , XXXXXXX , RGB_SPI , RGB_SAI , RGB_HUI , RGB_VAI -# define ________________________ADJUST_L3________________________ EE_CLR , XXXXXXX , RGB_SPD , RGB_SAD , RGB_HUD , RGB_VAD +# define ________________________ADJUST_L3________________________ EE_CLR , VRSN , RGB_SPD , RGB_SAD , RGB_HUD , RGB_VAD #else # define ________________________ADJUST_L2________________________ XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX -# define ________________________ADJUST_L3________________________ EE_CLR , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX +# define ________________________ADJUST_L3________________________ EE_CLR , VRSN , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX #endif #if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c index 381cf281e5cc..cec26801a296 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c @@ -4,6 +4,7 @@ #include QMK_KEYBOARD_H #include "keycodes.h" +#include "version.h" __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -23,18 +24,32 @@ bool process_record_oled(uint16_t keycode, keyrecord_t *record) { #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - break; - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); + if (record->event.pressed) { + switch (keycode) { + case COLEMAK: + set_single_persistent_default_layer(_COLEMAK); + break; + case QWERTY: + set_single_persistent_default_layer(_QWERTY); + break; +# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + case RGBRST: +# if defined(RGBLIGHT_ENABLE) + eeconfig_update_rgblight_default(); + rgblight_enable(); +# else + eeconfig_update_rgb_matrix_default(); +# endif + break; +# endif + case VRSN: + send_string("# qmk " QMK_VERSION "\n"); + wait_ms(VER_NEWLINE_WAIT); + send_string("# " QMK_KEYBOARD "/" QMK_KEYMAP "\n"); + wait_ms(VER_NEWLINE_WAIT); + send_string("# built on: " QMK_BUILDDATE "\n"); + break; } - break; } return process_record_keymap(keycode, record) && process_record_secrets(keycode, record) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/rgb.c b/keyboards/crkbd/keymaps/thunderbird2086/rgb.c new file mode 100644 index 000000000000..6e7f92c399b9 --- /dev/null +++ b/keyboards/crkbd/keymaps/thunderbird2086/rgb.c @@ -0,0 +1,57 @@ +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) +# include QMK_KEYBOARD_H + +# include "keycodes.h" + +# ifdef RGBLIGHT_ENABLE + +const rgblight_segment_t PROGMEM _rgb_layer_0[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 56, HSV_BLUE} +); +const rgblight_segment_t PROGMEM _rgb_layer_1[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 56, HSV_GREEN} +); +const rgblight_segment_t PROGMEM _rgb_layer_2[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 56, HSV_WHITE} +); + +const rgblight_segment_t* const PROGMEM _rgb_layers[] = RGBLIGHT_LAYERS_LIST( + _rgb_layer_0, + _rgb_layer_1, + _rgb_layer_2 +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = _rgb_layers; +} + +void set_rgb_by_layer(layer_state_t state) { + rgblight_set_layer_state(0, layer_state_cmp(state, _CODE)); + rgblight_set_layer_state(1, layer_state_cmp(state, _FUNCTION)); + rgblight_set_layer_state(2, layer_state_cmp(state, _ADJUST)); +} + +# else + +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + for (uint8_t i = led_min; i < led_max; i++) { + switch(get_highest_layer(layer_state|default_layer_state)) { + case _CODE: + rgb_matrix_set_color(i, RGB_BLUE); + break; + case _FUNCTION: + rgb_matrix_set_color(i, RGB_GREEN); + break; + case _ADJUST: + rgb_matrix_set_color(i, RGB_WHITE); + break; + default: + break; + } + } + return false; +} + +# endif +#endif diff --git a/keyboards/crkbd/keymaps/thunderbird2086/rules.mk b/keyboards/crkbd/keymaps/thunderbird2086/rules.mk index 4da48db08e39..adc61ea60d3d 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/rules.mk +++ b/keyboards/crkbd/keymaps/thunderbird2086/rules.mk @@ -11,6 +11,7 @@ TAP_DANCE_ENABLE = yes SRC += oled.c SRC += process_records.c +SRC += rgb.c SRC += tap_dances.c ifneq ("$(wildcard keyboards/crkbd/keymaps/thunderbird2086/secrets.c)","") From 50db294ef6f08cceeeab40e97673ef367d338a76 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sun, 20 Nov 2022 17:56:40 +0900 Subject: [PATCH 2/9] rgb matrix --- .../crkbd/keymaps/thunderbird2086/config.h | 43 +++++++++++-------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index 92e37e78952c..bd7ff265faa5 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -65,9 +65,9 @@ /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_ALPHAS_MODS # undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BREATHING # undef ENABLE_RGB_MATRIX_BAND_SAT # undef ENABLE_RGB_MATRIX_BAND_VAL # undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT @@ -77,28 +77,35 @@ # define ENABLE_RGB_MATRIX_CYCLE_ALL # undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# undef ENABLE_RGB_MATRIX_DUAL_BEACON # undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL # undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_DUAL_BEACON # undef ENABLE_RGB_MATRIX_RAINBOW_BEACON -# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS # undef ENABLE_RGB_MATRIX_RAINDROPS -# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# undef ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_RAIN # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP # undef ENABLE_RGB_MATRIX_DIGITAL_RAIN -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SPLASH -# undef ENABLE_RGB_MATRIX_MULTISPLASH -# undef ENABLE_RGB_MATRIX_SOLID_SPLASH -# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif From 3c74776ae62dfba50ebcdd919ffa359bdc092fa7 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Wed, 7 Dec 2022 00:41:39 +0900 Subject: [PATCH 3/9] rgb framebuffer --- .../crkbd/keymaps/thunderbird2086/config.h | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index bd7ff265faa5..f4f2496ab755 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -54,6 +54,7 @@ #if defined(RGB_MATRIX_ENABLE) # define SPLIT_LAYER_STATE_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. @@ -74,38 +75,38 @@ # undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL # undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT # undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL # undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL # undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL # undef ENABLE_RGB_MATRIX_DUAL_BEACON -# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS # undef ENABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS # undef ENABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM # undef ENABLE_RGB_MATRIX_HUE_WAVE -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +# undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL # define ENABLE_RGB_MATRIX_PIXEL_FLOW # define ENABLE_RGB_MATRIX_PIXEL_RAIN # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP -# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS # undef ENABLE_RGB_MATRIX_SPLASH # define ENABLE_RGB_MATRIX_MULTISPLASH # undef ENABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif From 377844d488e38bc5bd6845faad33fd352cf3bec6 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sat, 27 May 2023 19:21:39 +0900 Subject: [PATCH 4/9] changed indicator color for _ADJUST layer --- keyboards/crkbd/keymaps/thunderbird2086/config.h | 4 ++-- keyboards/crkbd/keymaps/thunderbird2086/rgb.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index f4f2496ab755..8251bc9b8fc2 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -77,7 +77,7 @@ # undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL # undef ENABLE_RGB_MATRIX_CYCLE_ALL # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL @@ -93,7 +93,7 @@ # undef ENABLE_RGB_MATRIX_HUE_WAVE # undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL # define ENABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# undef ENABLE_RGB_MATRIX_PIXEL_RAIN # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP # define ENABLE_RGB_MATRIX_DIGITAL_RAIN diff --git a/keyboards/crkbd/keymaps/thunderbird2086/rgb.c b/keyboards/crkbd/keymaps/thunderbird2086/rgb.c index 6e7f92c399b9..2f91b11b7538 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/rgb.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/rgb.c @@ -12,7 +12,7 @@ const rgblight_segment_t PROGMEM _rgb_layer_1[] = RGBLIGHT_LAYER_SEGMENTS( {0, 56, HSV_GREEN} ); const rgblight_segment_t PROGMEM _rgb_layer_2[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 56, HSV_WHITE} + {0, 56, HSV_YELLOW} ); const rgblight_segment_t* const PROGMEM _rgb_layers[] = RGBLIGHT_LAYERS_LIST( @@ -44,7 +44,8 @@ bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { rgb_matrix_set_color(i, RGB_GREEN); break; case _ADJUST: - rgb_matrix_set_color(i, RGB_WHITE); + rgb_matrix_set_color(i, RGB_YELLOW); + // RGB_WHITE caused crash break; default: break; From 5c0a41594bcf49784e8c1583ad7776dc06621923 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sun, 28 May 2023 15:35:11 +0900 Subject: [PATCH 5/9] License header --- keyboards/crkbd/keymaps/thunderbird2086/readme.md | 2 +- keyboards/crkbd/keymaps/thunderbird2086/rgb.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/readme.md b/keyboards/crkbd/keymaps/thunderbird2086/readme.md index 6400309fe8d7..cb57f20aecbd 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/readme.md +++ b/keyboards/crkbd/keymaps/thunderbird2086/readme.md @@ -54,7 +54,7 @@ The concept is Mac and **baby finger** friendly keymap. | --- | --- | --- | | ESC | Caps lock | | -- ADJUST: RGB control, Power control, default layer setting and reset +- ADJUST: RGB control, Power control, default layer setting, QMK version and reset ![adjust](https://i.imgur.com/uDIhigd.png) - SECRET: hold `ADJUST` and `FUNCTION` to activate diff --git a/keyboards/crkbd/keymaps/thunderbird2086/rgb.c b/keyboards/crkbd/keymaps/thunderbird2086/rgb.c index 2f91b11b7538..d9b0003c8817 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/rgb.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/rgb.c @@ -1,3 +1,6 @@ +// Copyright 2023 Allen Choi (@thunderbird2086) +// SPDX-License-Identifier: GPL-2.0-or-later + #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) # include QMK_KEYBOARD_H From c597699c941dcf5a736cc7bd1a6707961cc687ac Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sun, 28 May 2023 16:24:33 +0900 Subject: [PATCH 6/9] small tweak for send_string --- keyboards/crkbd/keymaps/thunderbird2086/process_records.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c index cec26801a296..e94c97b901f6 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c @@ -43,10 +43,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; # endif case VRSN: - send_string("# qmk " QMK_VERSION "\n"); - wait_ms(VER_NEWLINE_WAIT); - send_string("# " QMK_KEYBOARD "/" QMK_KEYMAP "\n"); - wait_ms(VER_NEWLINE_WAIT); + send_string("# qmk " QMK_VERSION "\n" SS_DELAY(VER_NEWLINE_WAIT)); + send_string("# " QMK_KEYBOARD "/" QMK_KEYMAP "\n" SS_DELAY(VER_NEWLINE_WAIT)); send_string("# built on: " QMK_BUILDDATE "\n"); break; } From ebce5db237ba92274ea0c335a9173ab072966289 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sun, 28 May 2023 17:25:11 +0900 Subject: [PATCH 7/9] removed delay for version --- keyboards/crkbd/keymaps/thunderbird2086/config.h | 1 - keyboards/crkbd/keymaps/thunderbird2086/process_records.c | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index 8251bc9b8fc2..69575fc90e26 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -14,7 +14,6 @@ # undef TAPPING_TERM #endif #define TAPPING_TERM 200 -#define VER_NEWLINE_WAIT 200 // in milliseconds #define NO_ACTION_ONESHOT diff --git a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c index e94c97b901f6..9c9715dfae44 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c @@ -43,9 +43,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; # endif case VRSN: - send_string("# qmk " QMK_VERSION "\n" SS_DELAY(VER_NEWLINE_WAIT)); - send_string("# " QMK_KEYBOARD "/" QMK_KEYMAP "\n" SS_DELAY(VER_NEWLINE_WAIT)); - send_string("# built on: " QMK_BUILDDATE "\n"); + send_string( + "# qmk " QMK_VERSION "\n" + "# " QMK_KEYBOARD "/" QMK_KEYMAP "\n" + "# built on: " QMK_BUILDDATE "\n"); break; } } From 1c9c3f6eb85060794756b156d62edc193411c5c8 Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Wed, 31 May 2023 00:14:54 +0900 Subject: [PATCH 8/9] fix broken build --- keyboards/crkbd/keymaps/thunderbird2086/keycodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h b/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h index 97ac780880c7..90b26b88a4e0 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/keycodes.h @@ -5,7 +5,7 @@ enum custom_keycodes { // Layer Macros - COLEMAK = SAFE_RANGE, + COLEMAK = QK_USER, QWERTY, FUNCTION, CODE, From ef59fb58dfef89bf55ec2b052e23197730dc339d Mon Sep 17 00:00:00 2001 From: Allen Choi <37539914+Thunderbird2086@users.noreply.github.com> Date: Sun, 4 Jun 2023 16:39:47 +0900 Subject: [PATCH 9/9] rolled back delay for version --- keyboards/crkbd/keymaps/thunderbird2086/config.h | 1 + keyboards/crkbd/keymaps/thunderbird2086/process_records.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/keyboards/crkbd/keymaps/thunderbird2086/config.h b/keyboards/crkbd/keymaps/thunderbird2086/config.h index 69575fc90e26..8251bc9b8fc2 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/config.h +++ b/keyboards/crkbd/keymaps/thunderbird2086/config.h @@ -14,6 +14,7 @@ # undef TAPPING_TERM #endif #define TAPPING_TERM 200 +#define VER_NEWLINE_WAIT 200 // in milliseconds #define NO_ACTION_ONESHOT diff --git a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c index 9c9715dfae44..46b9126677f3 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c @@ -44,8 +44,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { # endif case VRSN: send_string( - "# qmk " QMK_VERSION "\n" - "# " QMK_KEYBOARD "/" QMK_KEYMAP "\n" + "# qmk " QMK_VERSION "\n" SS_DELAY(VER_NEWLINE_WAIT) + "# " QMK_KEYBOARD "/" QMK_KEYMAP "\n" SS_DELAY(VER_NEWLINE_WAIT) "# built on: " QMK_BUILDDATE "\n"); break; }