aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi ISHII <2170248+mtei@users.noreply.github.com>2018-09-30 02:40:54 +0900
committerDrashna Jaelre <drashna@live.com>2018-09-29 10:40:54 -0700
commitcd215209efb0e236b691b51c3397495d4449623b (patch)
tree18889dc90a6d78f09299bd97350efe4ac7ecda01
parent4f6495108087da13d7ee44c1f6ced03ebdfb934d (diff)
downloadqmk_firmware-cd215209efb0e236b691b51c3397495d4449623b.tar.gz
qmk_firmware-cd215209efb0e236b691b51c3397495d4449623b.zip
Helix led_test keymap reduce size (#4023)
* Helix: make rgblight modes selectable. No change in build result. * edit the comment of helix/rev2/keymaps/default/keymap.c * Helix led_test keymap: reduced the size.
-rw-r--r--keyboards/helix/config.h13
-rw-r--r--keyboards/helix/rev2/keymaps/default/keymap.c2
-rw-r--r--keyboards/helix/rev2/keymaps/led_test/config.h16
-rw-r--r--keyboards/helix/rev2/keymaps/led_test/led_test_init.c4
4 files changed, 29 insertions, 6 deletions
diff --git a/keyboards/helix/config.h b/keyboards/helix/config.h
index fbfbd3280..b79093d87 100644
--- a/keyboards/helix/config.h
+++ b/keyboards/helix/config.h
@@ -48,4 +48,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
48 #define DISABLE_LEADER 48 #define DISABLE_LEADER
49#endif // USE_Link_Time_Optimization 49#endif // USE_Link_Time_Optimization
50 50
51#if defined(LED_ANIMATIONS) || defined(RGBLIGHT_ANIMATIONS)
52 #undef RGBLIGHT_ANIMATIONS
53 #define RGBLIGHT_EFFECT_BREATHING
54 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
55 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
56 #define RGBLIGHT_EFFECT_SNAKE
57 #define RGBLIGHT_EFFECT_KNIGHT
58 #define RGBLIGHT_EFFECT_CHRISTMAS
59 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
60 #define RGBLIGHT_EFFECT_RGB_TEST
61 #define RGBLIGHT_EFFECT_ALTERNATING
62#endif
63
51#endif /* CONFIG_H */ 64#endif /* CONFIG_H */
diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c
index dca9be9a4..087bd8e51 100644
--- a/keyboards/helix/rev2/keymaps/default/keymap.c
+++ b/keyboards/helix/rev2/keymaps/default/keymap.c
@@ -512,7 +512,7 @@ void music_scale_user(void)
512 512
513// hook point for 'led_test' keymap 513// hook point for 'led_test' keymap
514// 'default' keymap's led_test_init() is empty function, do nothing 514// 'default' keymap's led_test_init() is empty function, do nothing
515// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); 515// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
516__attribute__ ((weak)) 516__attribute__ ((weak))
517void led_test_init(void) {} 517void led_test_init(void) {}
518 518
diff --git a/keyboards/helix/rev2/keymaps/led_test/config.h b/keyboards/helix/rev2/keymaps/led_test/config.h
index 043825452..094195fc6 100644
--- a/keyboards/helix/rev2/keymaps/led_test/config.h
+++ b/keyboards/helix/rev2/keymaps/led_test/config.h
@@ -21,9 +21,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21#ifndef CONFIG_USER_H 21#ifndef CONFIG_USER_H
22#define CONFIG_USER_H 22#define CONFIG_USER_H
23 23
24// if you need more program area, try uncomment follow line
25#include "serial_config_simpleapi.h"
26
27// place overrides here 24// place overrides here
28 25
26// If you need more program area, try select and reduce rgblight modes to use.
27
28// Selection of RGBLIGHT MODE to use.
29#undef RGBLIGHT_EFFECT_BREATHING
30#undef RGBLIGHT_EFFECT_RAINBOW_MOOD
31#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
32#undef RGBLIGHT_EFFECT_SNAKE
33#undef RGBLIGHT_EFFECT_KNIGHT
34#undef RGBLIGHT_EFFECT_CHRISTMAS
35#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
36//#undef RGBLIGHT_EFFECT_RGB_TEST // led_test keymap need only this.
37#undef RGBLIGHT_EFFECT_ALTERNATING
38
29#endif /* CONFIG_USER_H */ 39#endif /* CONFIG_USER_H */
diff --git a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c
index 1d9cb4ebd..85f5d1aa7 100644
--- a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c
+++ b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c
@@ -5,7 +5,7 @@ void led_test_init(void) {
5 static int scan_count = 0; 5 static int scan_count = 0;
6 if( scan_count == 2 ) { 6 if( scan_count == 2 ) {
7 rgblight_enable_noeeprom(); 7 rgblight_enable_noeeprom();
8 rgblight_mode_noeeprom(35); 8 rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
9 } 9 }
10 if( scan_count < 3 ) scan_count ++; 10 if( scan_count < 3 ) scan_count ++;
11} 11}
@@ -15,6 +15,6 @@ void led_test_init(void) {
15// can use this? 15// can use this?
16void startup_user(void) { 16void startup_user(void) {
17 rgblight_enable_noeeprom(); 17 rgblight_enable_noeeprom();
18 rgblight_mode_noeeprom(35); 18 rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
19} 19}
20#endif 20#endif