1
0
Fork 0

Keymaps: Helix rgblight mode update (#4091)

* Helix each keymap's using rgblight mode symbol instead magic number

No change in build result.

* Helix pico keymaps: make rgblight modes selectable.

No change in build result.

* Helix rev2 keymaps: make rgblight modes selectable.

No change in build result.

* fixed Helix froggy/keymap.c: invalid rgblight mode value 0 to 1 (=RGBLIGHT_MODE_STATIC_LIGHT)

* Deselect RGB_TEST and ALTERNATING in Helix rev2,pico keymaps config.h.
This commit is contained in:
MakotoKurauchi 2018-10-11 04:53:18 +09:00 committed by Drashna Jaelre
parent ab91e07753
commit 79bff50247
20 changed files with 126 additions and 34 deletions

View file

@ -27,3 +27,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_CLICKY
#endif
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif

View file

@ -92,7 +92,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)

View file

@ -28,4 +28,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define AUDIO_CLICKY
#endif
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
#endif /* CONFIG_USER_H */

View file

@ -238,7 +238,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
TOG_STATUS = !TOG_STATUS;
#ifdef RGBLIGHT_ENABLE
//rgblight_mode(16);
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
#endif
}
layer_on(_LOWER);
@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
TOG_STATUS = !TOG_STATUS;
#ifdef RGBLIGHT_ENABLE
//rgblight_mode(15);
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
#endif
}
layer_on(_RAISE);

View file

@ -92,7 +92,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)

View file

@ -368,7 +368,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
} else {
TOG_STATUS = !TOG_STATUS;
rgblight_mode(16);
rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
}
layer_on(_LOWER);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
@ -387,7 +387,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
} else {
TOG_STATUS = !TOG_STATUS;
rgblight_mode(15);
rgblight_mode(RGBLIGHT_MODE_SNAKE);
}
layer_on(_RAISE);
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);

View file

@ -21,9 +21,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
// if you need more program area, try uncomment follow line
//#include "serial_config_simpleapi.h"
// place overrides here
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
#endif /* CONFIG_USER_H */

View file

@ -373,7 +373,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
TOG_STATUS = !TOG_STATUS;
#ifdef RGBLIGHT_ENABLE
//rgblight_mode(16);
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
#endif
}
layer_on(_LOWER);
@ -396,7 +396,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
TOG_STATUS = !TOG_STATUS;
#ifdef RGBLIGHT_ENABLE
//rgblight_mode(15);
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
#endif
}
layer_on(_RAISE);

View file

@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)

View file

@ -1,11 +1,23 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
// if you need more program area, try uncomment follow line
//#include "serial_config_simpleapi.h"
#undef TAPPING_FORCE_HOLD
#undef TAPPING_TERM
#define TAPPING_TERM 120
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
#endif /* CONFIG_USER_H */

View file

@ -35,7 +35,7 @@ void matrix_scan_user(void) {
#ifdef RGBLIGHT_ENABLE
uint32_t layer_state_set_keymap(uint32_t state) {
rgblight_mode_noeeprom(1);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
switch (biton32(state)) {
case _EDVORAKJ1:
case _EDVORAKJ2:
@ -52,7 +52,7 @@ uint32_t layer_state_set_keymap(uint32_t state) {
rgblight_sethsv_noeeprom_green();
break;
default: // for any other layers, or the default layer
rgblight_mode_noeeprom(28);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
rgblight_sethsv_noeeprom_red();
break;
}

View file

@ -102,7 +102,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)

View file

@ -23,9 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// place overrides here
// if you need more program area, try uncomment follow line
//#include "serial_config_simpleapi.h"
#ifdef MOUSEKEY_ENABLE
#undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 0
@ -43,4 +40,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MOUSEKEY_DELAY 0
#endif
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
#endif /* CONFIG_USER_H */

View file

@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)

View file

@ -21,12 +21,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
// if you need more program area, try uncomment follow line
//#include "serial_config_simpleapi.h"
#undef TAPPING_TERM
#define TAPPING_TERM 200
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
#endif /* CONFIG_USER_H */

View file

@ -399,7 +399,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(6);
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
RGB_current_mode = rgblight_config.mode;
}
#endif
@ -408,7 +408,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(10);
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 1);
RGB_current_mode = rgblight_config.mode;
}
#endif
@ -417,7 +417,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
RGBAnimation = true;
rgblight_mode(21);
rgblight_mode(RGBLIGHT_MODE_KNIGHT);
RGB_current_mode = rgblight_config.mode;
}
#endif
@ -508,7 +508,7 @@ void led_ripple_effect(char r, char g, char b) {
if (scan_count == -1) {
rgblight_enable_noeeprom();
rgblight_mode(0);
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
} else if (scan_count >= 0 && scan_count < 5) {
for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) {
int i = c;

View file

@ -100,7 +100,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)

View file

@ -21,3 +21,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* auto shift config */
#define AUTO_SHIFT_TIMEOUT 150
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif

View file

@ -312,7 +312,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
TOG_STATUS = !TOG_STATUS;
#ifdef RGBLIGHT_ENABLE
//rgblight_mode(16);
//rgblight_mode(RGBLIGHT_MODE_SNAKE + 1);
#endif
}
layer_on(_LOWER);
@ -335,7 +335,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} else {
TOG_STATUS = !TOG_STATUS;
#ifdef RGBLIGHT_ENABLE
//rgblight_mode(15);
//rgblight_mode(RGBLIGHT_MODE_SNAKE);
#endif
}
layer_on(_RAISE);
@ -450,7 +450,7 @@ void music_scale_user(void)
// hook point for 'led_test' keymap
// 'default' keymap's led_test_init() is empty function, do nothing
// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35);
// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
__attribute__ ((weak))
void led_test_init(void) {}

View file

@ -99,7 +99,7 @@ ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DRGBLIGHT_ANIMATIONS
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)