mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
Remove rgblight_list.h (#18878)
* Remove rgblight_list defines with no usage * Remove rgblight_setrgb_*[_at] defines * Remove rgblight_sethsv_* defines * Remove rgblight_sethsv_noeeprom_* defines * Delete rgblight_list.h and remove all references
This commit is contained in:
parent
a96a9fd5f8
commit
7407347be1
|
@ -40,7 +40,7 @@ void keyboard_post_init_user(void) {
|
||||||
// Set default layer, if enabled
|
// Set default layer, if enabled
|
||||||
if (user_config.rgb_layer_change) {
|
if (user_config.rgb_layer_change) {
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,19 +51,19 @@ The above function will use the EEPROM config immediately after reading it, to s
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_MAGENTA); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_RED); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case _PLOVER:
|
case _PLOVER:
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_GREEN); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_WHITE); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_CYAN); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
@ -119,7 +119,7 @@ void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||||
|
|
||||||
// use the non noeeprom versions, to write these values to EEPROM too
|
// use the non noeeprom versions, to write these values to EEPROM too
|
||||||
rgblight_enable(); // Enable RGB by default
|
rgblight_enable(); // Enable RGB by default
|
||||||
rgblight_sethsv_cyan(); // Set it to CYAN by default
|
rgblight_sethsv(HSV_CYAN); // Set it to CYAN by default
|
||||||
rgblight_mode(1); // set to solid by default
|
rgblight_mode(1); // set to solid by default
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -131,6 +131,6 @@ void matrix_scan_user(void) {
|
||||||
//EEPROM Reset Function
|
//EEPROM Reset Function
|
||||||
void eeconfig_init_user(void) {
|
void eeconfig_init_user(void) {
|
||||||
rgblight_enable(); // Enable RGB by default
|
rgblight_enable(); // Enable RGB by default
|
||||||
rgblight_sethsv_orange(); // Set it to orange by default
|
rgblight_sethsv(HSV_ORANGE); // Set it to orange by default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ void shutdown_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_set_color_all(RGB_RED);
|
rgb_matrix_set_color_all(RGB_RED);
|
||||||
|
|
|
@ -260,7 +260,7 @@ void shutdown_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_set_color_all(RGB_RED);
|
rgb_matrix_set_color_all(RGB_RED);
|
||||||
|
|
|
@ -139,7 +139,7 @@ void shutdown_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_set_color_all(RGB_RED);
|
rgb_matrix_set_color_all(RGB_RED);
|
||||||
|
|
|
@ -162,7 +162,7 @@ void shutdown_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_set_color_all(RGB_RED);
|
rgb_matrix_set_color_all(RGB_RED);
|
||||||
|
|
|
@ -215,7 +215,7 @@ void shutdown_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_set_color_all(RGB_RED);
|
rgb_matrix_set_color_all(RGB_RED);
|
||||||
|
|
|
@ -141,7 +141,7 @@ layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable();
|
rgblight_enable();
|
||||||
rgblight_setrgb_teal();
|
rgblight_setrgb(RGB_TEAL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,16 +150,16 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
rgblight_setrgb_chartreuse(); // RAISE:シャルトリューズ
|
rgblight_setrgb(RGB_CHARTREUSE); // RAISE:シャルトリューズ
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
rgblight_setrgb_pink(); // LOWER:ピンク
|
rgblight_setrgb(RGB_PINK); // LOWER:ピンク
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
rgblight_setrgb_red(); // ADJUST:レッド
|
rgblight_setrgb(RGB_RED); // ADJUST:レッド
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_setrgb_teal(); // 他:ティール
|
rgblight_setrgb(RGB_TEAL); // 他:ティール
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -52,14 +52,14 @@ layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case L_EDVORAKJP_LOWER:
|
case L_EDVORAKJP_LOWER:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
break;
|
break;
|
||||||
case L_EDVORAKJP_RAISE:
|
case L_EDVORAKJP_RAISE:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
||||||
rgblight_sethsv_red();
|
rgblight_sethsv(HSV_RED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include "dp60.h"
|
#include "dp60.h"
|
||||||
|
|
||||||
#include "rgblight_list.h"
|
|
||||||
#include "rgblight.h"
|
#include "rgblight.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,16 +39,16 @@
|
||||||
#define RGB_XMS RGB_M_X //rgb christmas
|
#define RGB_XMS RGB_M_X //rgb christmas
|
||||||
//
|
//
|
||||||
#define RGB_BL_MODE rgblight_mode_noeeprom(3) //rgb mode for BL layer
|
#define RGB_BL_MODE rgblight_mode_noeeprom(3) //rgb mode for BL layer
|
||||||
#define RGB_BL_LIGHT rgblight_sethsv_noeeprom_turquoise() //rgb light for BL layer
|
#define RGB_BL_LIGHT rgblight_sethsv_noeeprom(HSV_TURQUOISE) //rgb light for BL layer
|
||||||
//
|
//
|
||||||
#define RGB_FL_MODE rgblight_mode_noeeprom(1) //rgb mode for FL layer
|
#define RGB_FL_MODE rgblight_mode_noeeprom(1) //rgb mode for FL layer
|
||||||
#define RGB_FL_LIGHT rgblight_sethsv_noeeprom_orange() //rgb light for FL layer
|
#define RGB_FL_LIGHT rgblight_sethsv_noeeprom(HSV_ORANGE) //rgb light for FL layer
|
||||||
//
|
//
|
||||||
#define RGB_NL_MODE rgblight_mode_noeeprom(12) //rgb mode for NL layer
|
#define RGB_NL_MODE rgblight_mode_noeeprom(12) //rgb mode for NL layer
|
||||||
#define RGB_NL_LIGHT rgblight_sethsv_noeeprom_turquoise() //rgb light for NL layer
|
#define RGB_NL_LIGHT rgblight_sethsv_noeeprom(HSV_TURQUOISE) //rgb light for NL layer
|
||||||
//
|
//
|
||||||
#define RGB_RL_MODE rgblight_mode_noeeprom(22) //rgb mode for RL layer
|
#define RGB_RL_MODE rgblight_mode_noeeprom(22) //rgb mode for RL layer
|
||||||
#define RGB_RL_LIGHT rgblight_sethsv_noeeprom_red() //rgb light for RL layer
|
#define RGB_RL_LIGHT rgblight_sethsv_noeeprom(HSV_RED) //rgb light for RL layer
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
|
@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set underglow RGB leds to yellow
|
// Set underglow RGB leds to yellow
|
||||||
// Find the list of available colors in quantum/rgblight_list.h
|
// Find the list of available colors in quantum/color.h
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
rgblight_sethsv_noeeprom_yellow();
|
rgblight_sethsv_noeeprom(HSV_YELLOW);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,4 +65,4 @@ This is set in `mechmerlin/config.h` so that when the computer goes to sleep, th
|
||||||
|
|
||||||
### RGB Underglow Color: Yellow
|
### RGB Underglow Color: Yellow
|
||||||
|
|
||||||
This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/388df5359b913eaf1ce6fb0ef624e430ad010ea5/quantum/rgblight_list.h#L59-L121).
|
This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h).
|
||||||
|
|
|
@ -4,7 +4,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case DVORAK:
|
case DVORAK:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(GREEN);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -15,7 +15,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PLOVER:
|
case PLOVER:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||||
|
|
||||||
if (!(PLOVER_MODE)) {
|
if (!(PLOVER_MODE)) {
|
||||||
|
@ -26,7 +26,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GAMING:
|
case GAMING:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -37,7 +37,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARROWS:
|
case ARROWS:
|
||||||
rgblight_sethsv_noeeprom_blue();
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -48,7 +48,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MOUSE:
|
case MOUSE:
|
||||||
rgblight_sethsv_noeeprom_blue();
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -59,7 +59,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NUMPAD:
|
case NUMPAD:
|
||||||
rgblight_sethsv_noeeprom_blue();
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -70,7 +70,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LAYERS:
|
case LAYERS:
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -81,7 +81,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEDIA_FN:
|
case MEDIA_FN:
|
||||||
rgblight_sethsv_noeeprom_yellow();
|
rgblight_sethsv_noeeprom(HSV_YELLOW);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -92,7 +92,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHORD:
|
case CHORD:
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
@ -103,7 +103,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FIRMWARE:
|
case FIRMWARE:
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
|
||||||
|
|
||||||
if (PLOVER_MODE) {
|
if (PLOVER_MODE) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ bool MATRIX_SCANNED = false;
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
if (!(MATRIX_SCANNED)) {
|
if (!(MATRIX_SCANNED)) {
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
MATRIX_SCANNED = true;
|
MATRIX_SCANNED = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
void eeconfig_init_user(void) {
|
void eeconfig_init_user(void) {
|
||||||
rgblight_enable();
|
rgblight_enable();
|
||||||
rgblight_sethsv_cyan();
|
rgblight_sethsv(HSV_CYAN);
|
||||||
rgblight_mode(1);
|
rgblight_mode(1);
|
||||||
user_config.rgb_layer_change = true;
|
user_config.rgb_layer_change = true;
|
||||||
eeconfig_update_user(user_config.raw);
|
eeconfig_update_user(user_config.raw);
|
||||||
|
@ -213,7 +213,7 @@ void matrix_init_user(void) {
|
||||||
// Set default layer, if enabled
|
// Set default layer, if enabled
|
||||||
if (user_config.rgb_layer_change) {
|
if (user_config.rgb_layer_change) {
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,39 +231,39 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case SYMB:
|
case SYMB:
|
||||||
ergodox_right_led_1_on();
|
ergodox_right_led_1_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_RED); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case MDIA:
|
case MDIA:
|
||||||
ergodox_right_led_2_on();
|
ergodox_right_led_2_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_GREEN); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ergodox_right_led_3_on();
|
ergodox_right_led_3_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_blue(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_BLUE); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
ergodox_right_led_1_on();
|
ergodox_right_led_1_on();
|
||||||
ergodox_right_led_2_on();
|
ergodox_right_led_2_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_orange(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_ORANGE); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ergodox_right_led_1_on();
|
ergodox_right_led_1_on();
|
||||||
ergodox_right_led_3_on();
|
ergodox_right_led_3_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_yellow(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_YELLOW); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
ergodox_right_led_2_on();
|
ergodox_right_led_2_on();
|
||||||
ergodox_right_led_3_on();
|
ergodox_right_led_3_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_pink(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_PINK); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
ergodox_right_led_1_on();
|
ergodox_right_led_1_on();
|
||||||
ergodox_right_led_2_on();
|
ergodox_right_led_2_on();
|
||||||
ergodox_right_led_3_on();
|
ergodox_right_led_3_on();
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_WHITE); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); }
|
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_CYAN); rgblight_mode_noeeprom(1); }
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -227,6 +227,6 @@ void keyboard_post_init_user(void) {
|
||||||
//rgblight_config.val = 255;
|
//rgblight_config.val = 255;
|
||||||
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||||
rgblight_sethsv_noeeprom(100, 255, 255); // sets the color to greenish without saving
|
rgblight_sethsv_noeeprom(100, 255, 255); // sets the color to greenish without saving
|
||||||
//rgblight_sethsv_noeeprom_turquoise();
|
//rgblight_sethsv_noeeprom(HSV_TURQUOISE);
|
||||||
|
|
||||||
}
|
}
|
|
@ -9,6 +9,6 @@ void keyboard_post_init_user(void) {
|
||||||
apa102_set_brightness(5);
|
apa102_set_brightness(5);
|
||||||
|
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,14 +9,14 @@ layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case L_EDVORAKJP_LOWER:
|
case L_EDVORAKJP_LOWER:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
break;
|
break;
|
||||||
case L_EDVORAKJP_RAISE:
|
case L_EDVORAKJP_RAISE:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
||||||
rgblight_sethsv_red();
|
rgblight_sethsv(HSV_RED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -165,5 +165,5 @@ void matrix_scan_user(void) {
|
||||||
//EEPROM Reset Function
|
//EEPROM Reset Function
|
||||||
void eeconfig_init_user(void) {
|
void eeconfig_init_user(void) {
|
||||||
rgblight_enable(); // Enable RGB by default
|
rgblight_enable(); // Enable RGB by default
|
||||||
rgblight_sethsv_orange(); // Set it to orange by default
|
rgblight_sethsv(HSV_ORANGE); // Set it to orange by default
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,5 +205,5 @@ void matrix_scan_user(void) {
|
||||||
//EEPROM Reset Function
|
//EEPROM Reset Function
|
||||||
void eeconfig_init_user(void) {
|
void eeconfig_init_user(void) {
|
||||||
rgblight_enable(); // Enable RGB by default
|
rgblight_enable(); // Enable RGB by default
|
||||||
rgblight_sethsv_orange(); // Set it to orange by default
|
rgblight_sethsv(HSV_ORANGE); // Set it to orange by default
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,16 +47,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case WINDOWS_LAYER:
|
case WINDOWS_LAYER:
|
||||||
rgblight_setrgb_blue();
|
rgblight_setrgb(RGB_BLUE);
|
||||||
break;
|
break;
|
||||||
case WINDOWS_FN_LAYER:
|
case WINDOWS_FN_LAYER:
|
||||||
rgblight_setrgb_blue();
|
rgblight_setrgb(RGB_BLUE);
|
||||||
break;
|
break;
|
||||||
case MAC_LAYER:
|
case MAC_LAYER:
|
||||||
rgblight_setrgb_white();
|
rgblight_setrgb(RGB_WHITE);
|
||||||
break;
|
break;
|
||||||
case MAC_FN_LAYER:
|
case MAC_FN_LAYER:
|
||||||
rgblight_setrgb_white();
|
rgblight_setrgb(RGB_WHITE)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rgblight_setrgb (0x00, 0xFF, 0xFF);
|
rgblight_setrgb (0x00, 0xFF, 0xFF);
|
||||||
|
|
|
@ -57,14 +57,14 @@ layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case L_EDVORAKJP_LOWER:
|
case L_EDVORAKJP_LOWER:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
break;
|
break;
|
||||||
case L_EDVORAKJP_RAISE:
|
case L_EDVORAKJP_RAISE:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
|
||||||
rgblight_sethsv_red();
|
rgblight_sethsv(HSV_RED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
- https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md
|
- https://github.com/qmk/qmk_firmware/blob/master/docs/feature_rgblight.md
|
||||||
- main docs.
|
- main docs.
|
||||||
- https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h
|
- https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h
|
||||||
- list of colors
|
- list of colors
|
||||||
- https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h
|
- https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h
|
||||||
- list of functions for RGB manipulation
|
- list of functions for RGB manipulation
|
||||||
|
|
|
@ -11,13 +11,13 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
|
||||||
rgblight_sethsv_noeeprom(RGB_CLEAR);
|
rgblight_sethsv_noeeprom(RGB_CLEAR);
|
||||||
break;
|
break;
|
||||||
case _SYMB:
|
case _SYMB:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
break;
|
break;
|
||||||
case _NUMP:
|
case _NUMP:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
break;
|
break;
|
||||||
case _OVERWATCH:
|
case _OVERWATCH:
|
||||||
rgblight_sethsv_noeeprom_blue();
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
// TODO set up animated rainbow swirl with overwatch colors.
|
// TODO set up animated rainbow swirl with overwatch colors.
|
||||||
// rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
// rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
|
||||||
// rgblight_effect_breathing(&animation_status);
|
// rgblight_effect_breathing(&animation_status);
|
||||||
|
@ -47,7 +47,7 @@ void matrix_scan_rgb(void) {
|
||||||
void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm) {
|
void set_rgb_indicators(uint8_t this_mod, uint8_t this_osm) {
|
||||||
if (get_highest_layer(layer_state) == _QWERTY) {
|
if (get_highest_layer(layer_state) == _QWERTY) {
|
||||||
if ((this_mod | this_osm) & MOD_MASK_SHIFT) {
|
if ((this_mod | this_osm) & MOD_MASK_SHIFT) {
|
||||||
rgblight_setrgb_gold_at(SHFT_LED1);
|
rgblight_setrgb_at(RGB_GOLD, SHFT_LED1);
|
||||||
} else {
|
} else {
|
||||||
rgblight_setrgb_at(RGB_CLEAR, SHFT_LED1);
|
rgblight_setrgb_at(RGB_CLEAR, SHFT_LED1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,26 +78,26 @@ void eeconfig_init_user(void) {
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
//layer_state_set_user is not called for inital state - set it here
|
//layer_state_set_user is not called for inital state - set it here
|
||||||
rgblight_sethsv_noeeprom_white();
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case _LAYER1:
|
case _LAYER1:
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
break;
|
break;
|
||||||
case _LAYER2:
|
case _LAYER2:
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
break;
|
break;
|
||||||
case _LAYER3:
|
case _LAYER3:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
break;
|
break;
|
||||||
case _LAYER4:
|
case _LAYER4:
|
||||||
rgblight_sethsv_noeeprom_orange();
|
rgblight_sethsv_noeeprom(HSV_ORANGE);
|
||||||
break;
|
break;
|
||||||
case _LAYER0:
|
case _LAYER0:
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_sethsv_noeeprom_white();
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -67,7 +67,7 @@ bool led_update_user(led_t led_state) {
|
||||||
// this is needed so that upon disabling num lock, the leds don't stay red
|
// this is needed so that upon disabling num lock, the leds don't stay red
|
||||||
rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), numer_leds[i]);
|
rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), numer_leds[i]);
|
||||||
else
|
else
|
||||||
rgblight_setrgb_red_at(numer_leds[i]); // set to red
|
rgblight_setrgb_at(RGB_RED, numer_leds[i]); // set to red
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ bool led_update_user(led_t led_state) {
|
||||||
static uint8_t caps_state = 0;
|
static uint8_t caps_state = 0;
|
||||||
if (caps_state != led_state.caps_lock) {
|
if (caps_state != led_state.caps_lock) {
|
||||||
if (led_state.caps_lock) {
|
if (led_state.caps_lock) {
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
} else {
|
} else {
|
||||||
rgblight_sethsv_noeeprom(5, 255, 255);
|
rgblight_sethsv_noeeprom(5, 255, 255);
|
||||||
|
|
|
@ -46,16 +46,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_teal();
|
rgblight_sethsv(HSV_TEAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case 1:
|
case 1:
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_sethsv_noeeprom_teal();
|
rgblight_sethsv_noeeprom(HSV_TEAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -46,16 +46,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_teal();
|
rgblight_sethsv(HSV_TEAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case 1:
|
case 1:
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -249,19 +249,19 @@ void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
switch (get_highest_layer(state)) {
|
switch (get_highest_layer(state)) {
|
||||||
case _SYMB:
|
case _SYMB:
|
||||||
rgblight_setrgb_orange();
|
rgblight_setrgb(RGB_ORANGE);
|
||||||
break;
|
break;
|
||||||
case _NAV:
|
case _NAV:
|
||||||
rgblight_setrgb_springgreen();
|
rgblight_setrgb(RGB_SPRINGGREEN);
|
||||||
break;
|
break;
|
||||||
case _INTER:
|
case _INTER:
|
||||||
rgblight_setrgb_teal();
|
rgblight_setrgb(RGB_TEAL);
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
break;
|
break;
|
||||||
default: // for any other layers, or the default layer
|
default: // for any other layers, or the default layer
|
||||||
rgblight_setrgb_yellow();
|
rgblight_setrgb(RGB_YELLOW);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -84,11 +84,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
uint8_t num = rand() / (RAND_MAX / NUM_ANSWERS + 1);
|
uint8_t num = rand() / (RAND_MAX / NUM_ANSWERS + 1);
|
||||||
rgblight_mode(1);
|
rgblight_mode(1);
|
||||||
if (num < UNCERTAIN_BREAK) {
|
if (num < UNCERTAIN_BREAK) {
|
||||||
rgblight_setrgb_green();
|
rgblight_setrgb(RGB_GREEN);
|
||||||
} else if (num < NO_BREAK) {
|
} else if (num < NO_BREAK) {
|
||||||
rgblight_setrgb_yellow();
|
rgblight_setrgb(RGB_YELLOW);
|
||||||
} else {
|
} else {
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
}
|
}
|
||||||
send_string(ANSWERS[num]);
|
send_string(ANSWERS[num]);
|
||||||
lastTime = timer_read32();
|
lastTime = timer_read32();
|
||||||
|
@ -135,6 +135,6 @@ void led_set_user(uint8_t usb_led) {
|
||||||
void reset_rgb(void) {
|
void reset_rgb(void) {
|
||||||
// This gets called on init and after the timeout for the answer color
|
// This gets called on init and after the timeout for the answer color
|
||||||
// If you want to change the default color/mode, do it here
|
// If you want to change the default color/mode, do it here
|
||||||
rgblight_sethsv_blue();
|
rgblight_sethsv(HSV_BLUE);
|
||||||
rgblight_mode(7);
|
rgblight_mode(7);
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,9 +282,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
//Define layer colors
|
//Define layer colors
|
||||||
#define rgblight_setrgb_user_MAIN() rgblight_sethsv_red()
|
#define rgblight_setrgb_user_MAIN() rgblight_sethsv(HSV_RED)
|
||||||
#define rgblight_setrgb_user_LY1() rgblight_sethsv_green()
|
#define rgblight_setrgb_user_LY1() rgblight_sethsv(HSV_GREEN)
|
||||||
#define rgblight_setrgb_user_LY2() rgblight_sethsv_blue()
|
#define rgblight_setrgb_user_LY2() rgblight_sethsv(HSV_BLUE)
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
rgblight_enable();
|
rgblight_enable();
|
||||||
|
|
|
@ -162,14 +162,14 @@ LT(_LYMD,KC_ESC), KC_A , KC_R , KC_S , KC_T , KC_D ,________ ,_______
|
||||||
|
|
||||||
//Define layer colors
|
//Define layer colors
|
||||||
#define rgblight_setrgb_user_base() rgblight_sethsv(325,255,255)
|
#define rgblight_setrgb_user_base() rgblight_sethsv(325,255,255)
|
||||||
#define rgblight_setrgb_user_LYFK() rgblight_sethsv_red()
|
#define rgblight_setrgb_user_LYFK() rgblight_sethsv(HSV_RED)
|
||||||
#define rgblight_setrgb_user_LYMED() rgblight_sethsv_blue()
|
#define rgblight_setrgb_user_LYMED() rgblight_sethsv(HSV_BLUE)
|
||||||
#define rgblight_setrgb_user_LYNUM() rgblight_sethsv_purple()
|
#define rgblight_setrgb_user_LYNUM() rgblight_sethsv(HSV_PURPLE)
|
||||||
#define rgblight_setrgb_user_LYNAV() rgblight_sethsv_cyan()
|
#define rgblight_setrgb_user_LYNAV() rgblight_sethsv(HSV_CYAN)
|
||||||
#define rgblight_setrgb_user_LYMOS() rgblight_sethsv_orange()
|
#define rgblight_setrgb_user_LYMOS() rgblight_sethsv(HSV_ORANGE)
|
||||||
#define rgblight_setrgb_user_LYSYS() rgblight_sethsv_green()
|
#define rgblight_setrgb_user_LYSYS() rgblight_sethsv(HSV_GREEN)
|
||||||
#define rgblight_setrgb_user_LYLT() rgblight_sethsv_yellow()
|
#define rgblight_setrgb_user_LYLT() rgblight_sethsv(HSV_YELLOW)
|
||||||
#define rgblight_setrgb_user_LYMD() rgblight_sethsv_white()
|
#define rgblight_setrgb_user_LYMD() rgblight_sethsv(HSV_WHITE)
|
||||||
|
|
||||||
//initialize rgb
|
//initialize rgb
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
|
|
|
@ -51,7 +51,7 @@ const uint8_t rgb_keymaps [][RGB_MATRIX_LED_COUNT] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void led_color_set(uint8_t index, uint8_t color_patterns) {
|
static void led_color_set(uint8_t index, uint8_t color_patterns) {
|
||||||
HSV hsv = rgb_matrix_config.hsv; // 'quantum/rgblight_list.h'
|
HSV hsv = rgb_matrix_config.hsv; // 'quantum/color.h'
|
||||||
RGB rgb_white = hsv_to_rgb(_HSV( 0, 0, hsv.v)); // HSV_WHITE
|
RGB rgb_white = hsv_to_rgb(_HSV( 0, 0, hsv.v)); // HSV_WHITE
|
||||||
RGB rgb_indc1 = hsv_to_rgb(_HSV(128, 255, hsv.v)); // HSV_TEAL
|
RGB rgb_indc1 = hsv_to_rgb(_HSV(128, 255, hsv.v)); // HSV_TEAL
|
||||||
RGB rgb_indc2 = hsv_to_rgb(_HSV(191, 255, hsv.v)); // HSV_PURPLE
|
RGB rgb_indc2 = hsv_to_rgb(_HSV(191, 255, hsv.v)); // HSV_PURPLE
|
||||||
|
|
|
@ -37,9 +37,9 @@ void keyboard_post_init_user(void) {
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
void led_set_user(uint8_t usb_led) {
|
||||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||||
rgblight_sethsv_noeeprom_cyan();
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
} else {
|
} else {
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,6 @@ void shutdown_user (void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,6 @@ enum RGBLIGHT_EFFECT_MODE {
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
#include "ws2812.h"
|
#include "ws2812.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "rgblight_list.h"
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_LAYERS
|
#ifdef RGBLIGHT_LAYERS
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -1,136 +0,0 @@
|
||||||
/* Copyright 2018 Jack Humbert
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "color.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
########################################################################################
|
|
||||||
## ##
|
|
||||||
## ##
|
|
||||||
## ##
|
|
||||||
## The functions below have been deprecated and may be removed in a future release. ##
|
|
||||||
## ##
|
|
||||||
## Please use the values in color.h with the RGB functions. ##
|
|
||||||
## ##
|
|
||||||
## ##
|
|
||||||
## ##
|
|
||||||
########################################################################################
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* SET RGB List */
|
|
||||||
#define rgblight_setrgb_white() rgblight_setrgb(RGB_WHITE)
|
|
||||||
#define rgblight_setrgb_red() rgblight_setrgb(RGB_RED)
|
|
||||||
#define rgblight_setrgb_coral() rgblight_setrgb(RGB_CORAL)
|
|
||||||
#define rgblight_setrgb_orange() rgblight_setrgb(RGB_ORANGE)
|
|
||||||
#define rgblight_setrgb_goldenrod() rgblight_setrgb(RGB_GOLDENROD)
|
|
||||||
#define rgblight_setrgb_gold() rgblight_setrgb(RGB_GOLD)
|
|
||||||
#define rgblight_setrgb_yellow() rgblight_setrgb(RGB_YELLOW)
|
|
||||||
#define rgblight_setrgb_chartreuse() rgblight_setrgb(RGB_CHARTREUSE)
|
|
||||||
#define rgblight_setrgb_green() rgblight_setrgb(RGB_GREEN)
|
|
||||||
#define rgblight_setrgb_springgreen() rgblight_setrgb(RGB_SPRINGGREEN)
|
|
||||||
#define rgblight_setrgb_turquoise() rgblight_setrgb(RGB_TURQUOISE)
|
|
||||||
#define rgblight_setrgb_teal() rgblight_setrgb(RGB_TEAL)
|
|
||||||
#define rgblight_setrgb_cyan() rgblight_setrgb(RGB_CYAN)
|
|
||||||
#define rgblight_setrgb_azure() rgblight_setrgb(RGB_AZURE)
|
|
||||||
#define rgblight_setrgb_blue() rgblight_setrgb(RGB_BLUE)
|
|
||||||
#define rgblight_setrgb_purple() rgblight_setrgb(RGB_PURPLE)
|
|
||||||
#define rgblight_setrgb_magenta() rgblight_setrgb(RGB_MAGENTA)
|
|
||||||
#define rgblight_setrgb_pink() rgblight_setrgb(RGB_PINK)
|
|
||||||
|
|
||||||
/* SET RGB List */
|
|
||||||
#define rgblight_setrgb_white_at(at) rgblight_setrgb_at(RGB_WHITE, at)
|
|
||||||
#define rgblight_setrgb_red_at(at) rgblight_setrgb_at(RGB_RED, at)
|
|
||||||
#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at(RGB_CORAL, at)
|
|
||||||
#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at(RGB_ORANGE at)
|
|
||||||
#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at(RGB_GOLDENROD, at)
|
|
||||||
#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at(RGB_GOLD, at)
|
|
||||||
#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at(RGB_YELLOW, at)
|
|
||||||
#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at(RGB_CHARTREUSE, at)
|
|
||||||
#define rgblight_setrgb_green_at(at) rgblight_setrgb_at(RGB_GREEN, at)
|
|
||||||
#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at(RGB_SPRINGGREEN, at)
|
|
||||||
#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at(RGB_TURQUOISE, at)
|
|
||||||
#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at(RGB_TEAL, at)
|
|
||||||
#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at(RGB_CYAN, at)
|
|
||||||
#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at(RGB_AZURE, at)
|
|
||||||
#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at(RGB_BLUE, at)
|
|
||||||
#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at(RGB_PURPLE, at)
|
|
||||||
#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at(RGB_MAGENTA, at)
|
|
||||||
#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at(RGB_PINK, at)
|
|
||||||
|
|
||||||
/* SET HSV List */
|
|
||||||
#define rgblight_sethsv_white() rgblight_sethsv(HSV_WHITE)
|
|
||||||
#define rgblight_sethsv_red() rgblight_sethsv(HSV_RED)
|
|
||||||
#define rgblight_sethsv_coral() rgblight_sethsv(HSV_CORAL)
|
|
||||||
#define rgblight_sethsv_orange() rgblight_sethsv(HSV_ORANGE)
|
|
||||||
#define rgblight_sethsv_goldenrod() rgblight_sethsv(HSV_GOLDENROD)
|
|
||||||
#define rgblight_sethsv_gold() rgblight_sethsv(HSV_GOLD)
|
|
||||||
#define rgblight_sethsv_yellow() rgblight_sethsv(HSV_YELLOW)
|
|
||||||
#define rgblight_sethsv_chartreuse() rgblight_sethsv(HSV_CHARTREUSE)
|
|
||||||
#define rgblight_sethsv_green() rgblight_sethsv(HSV_GREEN)
|
|
||||||
#define rgblight_sethsv_springgreen() rgblight_sethsv(HSV_SPRINGGREEN)
|
|
||||||
#define rgblight_sethsv_turquoise() rgblight_sethsv(HSV_TURQUOISE)
|
|
||||||
#define rgblight_sethsv_teal() rgblight_sethsv(HSV_TEAL)
|
|
||||||
#define rgblight_sethsv_cyan() rgblight_sethsv(HSV_CYAN)
|
|
||||||
#define rgblight_sethsv_azure() rgblight_sethsv(HSV_AZURE)
|
|
||||||
#define rgblight_sethsv_blue() rgblight_sethsv(HSV_BLUE)
|
|
||||||
#define rgblight_sethsv_purple() rgblight_sethsv(HSV_PURPLE)
|
|
||||||
#define rgblight_sethsv_magenta() rgblight_sethsv(HSV_MAGENTA)
|
|
||||||
#define rgblight_sethsv_pink() rgblight_sethsv(HSV_PINK)
|
|
||||||
|
|
||||||
/* SET HSV List */
|
|
||||||
/* If you're doing layer indication, this is best, as it won't */
|
|
||||||
/* write to the eeprom, since it's limited (very high value). */
|
|
||||||
/* If you want to use modes with this (since you can), then you */
|
|
||||||
/* want to use rgblight_mode_noeeprom(x) instead. */
|
|
||||||
#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom(HSV_WHITE)
|
|
||||||
#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom(HSV_RED)
|
|
||||||
#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom(HSV_CORAL)
|
|
||||||
#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom(HSV_ORANGE)
|
|
||||||
#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom(HSV_GOLDENROD)
|
|
||||||
#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom(HSV_GOLD)
|
|
||||||
#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom(HSV_YELLOW)
|
|
||||||
#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom(HSV_CHARTREUSE)
|
|
||||||
#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom(HSV_GREEN)
|
|
||||||
#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom(HSV_SPRINGGREEN)
|
|
||||||
#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom(HSV_TURQUOISE)
|
|
||||||
#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom(HSV_TEAL)
|
|
||||||
#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom(HSV_CYAN)
|
|
||||||
#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom(HSV_AZURE)
|
|
||||||
#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom(HSV_BLUE)
|
|
||||||
#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom(HSV_PURPLE)
|
|
||||||
#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom(HSV_MAGENTA)
|
|
||||||
#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom(HSV_PINK)
|
|
||||||
|
|
||||||
/* SET HSV List */
|
|
||||||
#define rgblight_sethsv_white_at(at) rgblight_sethsv_at(HSV_WHITE, at)
|
|
||||||
#define rgblight_sethsv_red_at(at) rgblight_sethsv_at(HSV_RED, at)
|
|
||||||
#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at(HSV_CORAL, at)
|
|
||||||
#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at(HSV_ORANGE, at)
|
|
||||||
#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at(HSV_GOLDENROD, at)
|
|
||||||
#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at(HSV_GOLD, at)
|
|
||||||
#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at(HSV_YELLOW, at)
|
|
||||||
#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at(HSV_CHARTREUSE, at)
|
|
||||||
#define rgblight_sethsv_green_at(at) rgblight_sethsv_at(HSV_GREEN, at)
|
|
||||||
#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at(HSV_SPRINGGREEN, at)
|
|
||||||
#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at(HSV_TURQUOISE, at)
|
|
||||||
#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at(HSV_TEAL, at)
|
|
||||||
#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at(HSV_CYAN, at)
|
|
||||||
#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at(HSV_AZURE, at)
|
|
||||||
#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at(HSV_BLUE, at)
|
|
||||||
#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at(HSV_PURPLE, at)
|
|
||||||
#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at(HSV_MAGENTA, at)
|
|
||||||
#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at(HSV_PINK, at)
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
#include "brandonschlack.h"
|
#include "brandonschlack.h"
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "rgblight_list.h"
|
|
||||||
|
|
||||||
/*TODO Update as RGBLIGHT Mode */
|
/*TODO Update as RGBLIGHT Mode */
|
||||||
#ifndef RGB_THEME_COLORS_MAX
|
#ifndef RGB_THEME_COLORS_MAX
|
||||||
|
|
|
@ -58,7 +58,7 @@ void shutdown_user(void) {
|
||||||
#if defined(RGBLIGHT_ENABLE)
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RGB_MATRIX_ENABLE)
|
#if defined(RGB_MATRIX_ENABLE)
|
||||||
|
|
|
@ -22,7 +22,7 @@ void keyboard_post_init_rgb(void) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_sethsv_noeeprom_orange();
|
rgblight_sethsv_noeeprom(HSV_ORANGE);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,31 +64,31 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
|
||||||
#ifdef LAYERS_PROGRAMMER
|
#ifdef LAYERS_PROGRAMMER
|
||||||
case _PROGRAMMER_SHIFTED:
|
case _PROGRAMMER_SHIFTED:
|
||||||
#endif
|
#endif
|
||||||
rgblight_sethsv_noeeprom_orange();
|
rgblight_sethsv_noeeprom(HSV_ORANGE);
|
||||||
break;
|
break;
|
||||||
#ifdef LAYERS_ORTHO
|
#ifdef LAYERS_ORTHO
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
break;
|
break;
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
rgblight_sethsv_noeeprom_blue();
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
rgblight_sethsv_noeeprom_purple();
|
rgblight_sethsv_noeeprom(HSV_PURPLE);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef LAYER_FN
|
#ifdef LAYER_FN
|
||||||
case _FN:
|
case _FN:
|
||||||
rgblight_sethsv_noeeprom_chartreuse();
|
rgblight_sethsv_noeeprom(HSV_CHARTREUSE);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef LAYER_GIT
|
#ifdef LAYER_GIT
|
||||||
case _GIT:
|
case _GIT:
|
||||||
rgblight_sethsv_noeeprom_teal();
|
rgblight_sethsv_noeeprom(HSV_TEAL);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
rgblight_sethsv_noeeprom_white();
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -69,7 +69,7 @@ void shutdown_user (void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
rgblight_setrgb_teal();
|
rgblight_setrgb(RGB_TEAL);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
// uint16_t timer_start = timer_read();
|
// uint16_t timer_start = timer_read();
|
||||||
|
|
|
@ -97,7 +97,7 @@ void leader_start(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_savebase();
|
rgblight_savebase();
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
rgblight_sethsv_noeeprom_goldenrod();
|
rgblight_sethsv_noeeprom(HSV_GOLDENROD);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,36 +86,36 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
|
||||||
if (userspace_config.rgb_layer_change) {
|
if (userspace_config.rgb_layer_change) {
|
||||||
switch (get_highest_layer(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect
|
switch (get_highest_layer(state)) { // _RAISE, _LOWER and _ADJUST use a custom color and the breathing effect
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
rgblight_sethsv_noeeprom_white();
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 2);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 2);
|
||||||
break;
|
break;
|
||||||
default: // Use a solid color for normal layers
|
default: // Use a solid color for normal layers
|
||||||
switch (get_highest_layer(default_layer_state)) {
|
switch (get_highest_layer(default_layer_state)) {
|
||||||
case _QWERTY:
|
case _QWERTY:
|
||||||
rgblight_sethsv_noeeprom_magenta();
|
rgblight_sethsv_noeeprom(HSV_MAGENTA);
|
||||||
break;
|
break;
|
||||||
case _COLEMAK:
|
case _COLEMAK:
|
||||||
rgblight_sethsv_noeeprom_green();
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
break;
|
break;
|
||||||
case _DVORAK:
|
case _DVORAK:
|
||||||
rgblight_sethsv_noeeprom_blue();
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
break;
|
break;
|
||||||
case _WORKMAN:
|
case _WORKMAN:
|
||||||
rgblight_sethsv_noeeprom_goldenrod();
|
rgblight_sethsv_noeeprom(HSV_GOLDENROD);
|
||||||
break;
|
break;
|
||||||
case _PLOVER:
|
case _PLOVER:
|
||||||
rgblight_sethsv_noeeprom_pink();
|
rgblight_sethsv_noeeprom(HSV_PINK);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rgblight_sethsv_noeeprom_white();
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
get_highest_layer(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
get_highest_layer(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
||||||
|
|
|
@ -57,7 +57,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
rgblight_mode_noeeprom(1);
|
rgblight_mode_noeeprom(1);
|
||||||
rgblight_setrgb_red();
|
rgblight_setrgb(RGB_RED);
|
||||||
#endif
|
#endif
|
||||||
reset_keyboard();
|
reset_keyboard();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -97,7 +97,6 @@ static inline bool tap_ctrl_other_pressed(void) {
|
||||||
/* Use RGB underglow to indicate layer
|
/* Use RGB underglow to indicate layer
|
||||||
* https://docs.qmk.fm/reference/customizing-functionality
|
* https://docs.qmk.fm/reference/customizing-functionality
|
||||||
*/
|
*/
|
||||||
// add to quantum/rgblight_list.h
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
static bool rgb_layers_enabled = true;
|
static bool rgb_layers_enabled = true;
|
||||||
static bool rgb_L0_enabled = false;
|
static bool rgb_L0_enabled = false;
|
||||||
|
|
|
@ -129,7 +129,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
#if defined(RGBLIGHT_ENABLE)
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
rgblight_sethsv_noeeprom_red();
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return true; // Let QMK send the press/release events as normal
|
return true; // Let QMK send the press/release events as normal
|
||||||
|
|
Loading…
Reference in a new issue