]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Keymaps: Helix rgblight mode update (#4091)
authorMakotoKurauchi <pluis@me.com>
Wed, 10 Oct 2018 19:53:18 +0000 (04:53 +0900)
committerDrashna Jaelre <drashna@live.com>
Wed, 10 Oct 2018 19:53:18 +0000 (12:53 -0700)
* 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.

20 files changed:
keyboards/helix/pico/keymaps/biacco/config.h
keyboards/helix/pico/keymaps/biacco/rules.mk
keyboards/helix/pico/keymaps/default/config.h
keyboards/helix/pico/keymaps/default/keymap.c
keyboards/helix/pico/keymaps/default/rules.mk
keyboards/helix/rev1/keymaps/OLED_sample/keymap.c
keyboards/helix/rev2/keymaps/default/config.h
keyboards/helix/rev2/keymaps/default/keymap.c
keyboards/helix/rev2/keymaps/default/rules.mk
keyboards/helix/rev2/keymaps/edvorakjp/config.h
keyboards/helix/rev2/keymaps/edvorakjp/keymap.c
keyboards/helix/rev2/keymaps/edvorakjp/rules.mk
keyboards/helix/rev2/keymaps/five_rows_jis/config.h
keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk
keyboards/helix/rev2/keymaps/froggy/config.h
keyboards/helix/rev2/keymaps/froggy/keymap.c
keyboards/helix/rev2/keymaps/froggy/rules.mk
keyboards/helix/rev2/keymaps/yshrsmz/config.h
keyboards/helix/rev2/keymaps/yshrsmz/keymap.c
keyboards/helix/rev2/keymaps/yshrsmz/rules.mk

index 776eecfb646bc974b9f8377aa4e845d36d39091b..7653185198bc08968f7de5d0de2c79cc42141299 100644 (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
index 0a720002d78b34ec082d10cdf60642235aacf7d1..4f264fa952dc423ad97d9af05595b579b72fb594 100644 (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)
index 6084b0970bd57298c0e4e778bf575f6e45136285..20dfc9f9858cd40607f289a771722c2b8b3c2f4b 100644 (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 */
index 75221d485a9ccfae91821980b2c6ceb7a7d8d327..4c58785179266c72de71aa1c2b20a0aa3acd836b 100644 (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);
index afb1240685d46922fe2d02d9ef3ee2d5c546da72..b1e219537f4a3c27421c19d73cd10b27686505b6 100644 (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)
index fa51501e629729cc7400f81c597139f70b669b2d..9b81979ff426fe5b30c7c74061bf7e0c9f9ff0dd 100644 (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);
index 185e6783856eb1535ba094ec449ad1853c75d6f9..ed376757942f8e6e351cf03a380b8e4ae9ad8203 100644 (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 */
index 087bd8e517ff56a0172627897167363e4c406002..92393208ce60bc53b4ae1a95db8e66d7ccb62e3e 100644 (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);
index 5340a74ba2d0c94c914370578f1f5fa9f53a732a..14c353d507f12c2bf3a6dedaab3e68befc7eadcc 100644 (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)
index ead31605b248540e4794fb8055a4b4b3165941dd..643220383c5aee4d70590230d226277101ec9c84 100644 (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 */
index 650a39115a3642867a9eca33a38dfb7907899a14..22940f7cbe51afedbf64bb6b4f2b25339a88fbb1 100644 (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;
   }
index 67da9c370b936e0ca1888ff79af78d22dff65a45..9bd46fabcfc22b1fc8897538c3f2891efdf386e4 100644 (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)
index c380b7db4e26bd34b03e10a6f1629eb6a9ecc61d..97494c937f001760845c70e602898b3133b0f930 100644 (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 */
index 5340a74ba2d0c94c914370578f1f5fa9f53a732a..14c353d507f12c2bf3a6dedaab3e68befc7eadcc 100644 (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)
index dad24830347165619cf4c303ebdb1e8ea16adb77..517368ae941dfb6159dc33888e9073b94b654678 100644 (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 */
index 81a28dfa5d857114526ae87ec4e80ec1a16dffd5..75c6f0811427882c1f498ff0fbb3b0f106acdd9e 100644 (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;
index aa979641347d83249cfe8b314e4f62cea1fce938..e52e4a37362e2d85f6ffba77f43fb9ff2e0d5445 100644 (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)
index a1cd126eef554bb97b122d0f8d8b91a8f7228bac..d70f23c3e314f86c86ab427f1538ba931693ce37 100644 (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
index cce28796e6729838f3d1f77f1518f692614d79bc..049a864c1ad05ffc2427fae5790745ca35fd80af 100644 (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) {}
 
index da439dc9b5212bf7f0b0b4a886fcbecee5ca583c..8331a2e1d8cb49be92fef41a272b3d90045b568a 100644 (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)