Skip to content

Commit

Permalink
Helix led_test keymap reduce size (#4023)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
mtei authored and drashna committed Sep 29, 2018
1 parent 4f64951 commit cd21520
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
13 changes: 13 additions & 0 deletions keyboards/helix/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DISABLE_LEADER
#endif // USE_Link_Time_Optimization

#if defined(LED_ANIMATIONS) || defined(RGBLIGHT_ANIMATIONS)
#undef RGBLIGHT_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_H */
2 changes: 1 addition & 1 deletion keyboards/helix/rev2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,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) {}

Expand Down
16 changes: 13 additions & 3 deletions keyboards/helix/rev2/keymaps/led_test/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@ 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.
#undef RGBLIGHT_EFFECT_BREATHING
#undef RGBLIGHT_EFFECT_RAINBOW_MOOD
#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
#undef RGBLIGHT_EFFECT_SNAKE
#undef RGBLIGHT_EFFECT_KNIGHT
#undef RGBLIGHT_EFFECT_CHRISTMAS
#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
//#undef RGBLIGHT_EFFECT_RGB_TEST // led_test keymap need only this.
#undef RGBLIGHT_EFFECT_ALTERNATING

#endif /* CONFIG_USER_H */
4 changes: 2 additions & 2 deletions keyboards/helix/rev2/keymaps/led_test/led_test_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ void led_test_init(void) {
static int scan_count = 0;
if( scan_count == 2 ) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(35);
rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
}
if( scan_count < 3 ) scan_count ++;
}
Expand All @@ -15,6 +15,6 @@ void led_test_init(void) {
// can use this?
void startup_user(void) {
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(35);
rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
}
#endif

0 comments on commit cd21520

Please sign in to comment.