diff options
| author | mtei <2170248+mtei@users.noreply.github.com> | 2019-02-18 19:01:37 +0900 |
|---|---|---|
| committer | mtei <2170248+mtei@users.noreply.github.com> | 2019-02-18 19:01:37 +0900 |
| commit | 2cd2078b9d84449996dc0b01c8ad8cd0b56d9372 (patch) | |
| tree | 79c331e4e4e1f16fc3d853aa0324cc16cead8cae | |
| parent | 5cb713148dbc319167517df370ca9dd774ceb31c (diff) | |
| download | qmk_firmware-2cd2078b9d84449996dc0b01c8ad8cd0b56d9372.tar.gz qmk_firmware-2cd2078b9d84449996dc0b01c8ad8cd0b56d9372.zip | |
Update Helix 'led_test' keymap
Change to use keyboard_post_init_user() hook (#3113)
| -rw-r--r-- | keyboards/helix/rev2/keymaps/default/keymap.c | 7 | ||||
| -rw-r--r-- | keyboards/helix/rev2/keymaps/led_test/led_test_init.c | 16 |
2 files changed, 1 insertions, 22 deletions
diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index 5b8c5fae5..a64eed3e7 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c | |||
| @@ -506,14 +506,7 @@ void music_scale_user(void) | |||
| 506 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h | 506 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h |
| 507 | #ifdef SSD1306OLED | 507 | #ifdef SSD1306OLED |
| 508 | 508 | ||
| 509 | // hook point for 'led_test' keymap | ||
| 510 | // 'default' keymap's led_test_init() is empty function, do nothing | ||
| 511 | // 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); | ||
| 512 | __attribute__ ((weak)) | ||
| 513 | void led_test_init(void) {} | ||
| 514 | |||
| 515 | void matrix_scan_user(void) { | 509 | void matrix_scan_user(void) { |
| 516 | led_test_init(); | ||
| 517 | iota_gfx_task(); // this is what updates the display continuously | 510 | iota_gfx_task(); // this is what updates the display continuously |
| 518 | } | 511 | } |
| 519 | 512 | ||
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 85f5d1aa7..7f8813acd 100644 --- a/keyboards/helix/rev2/keymaps/led_test/led_test_init.c +++ b/keyboards/helix/rev2/keymaps/led_test/led_test_init.c | |||
| @@ -1,20 +1,6 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | #if 1 | 3 | void keyboard_post_init_user(void) { |
| 4 | void led_test_init(void) { | ||
| 5 | static int scan_count = 0; | ||
| 6 | if( scan_count == 2 ) { | ||
| 7 | rgblight_enable_noeeprom(); | ||
| 8 | rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); | ||
| 9 | } | ||
| 10 | if( scan_count < 3 ) scan_count ++; | ||
| 11 | } | ||
| 12 | |||
| 13 | #else | ||
| 14 | // when qmk/qmk_firmware PullRequest #3113 available. | ||
| 15 | // can use this? | ||
| 16 | void startup_user(void) { | ||
| 17 | rgblight_enable_noeeprom(); | 4 | rgblight_enable_noeeprom(); |
| 18 | rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); | 5 | rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); |
| 19 | } | 6 | } |
| 20 | #endif | ||
