]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Update Helix 'led_test' keymap
authormtei <2170248+mtei@users.noreply.github.com>
Mon, 18 Feb 2019 10:01:37 +0000 (19:01 +0900)
committermtei <2170248+mtei@users.noreply.github.com>
Mon, 18 Feb 2019 10:01:37 +0000 (19:01 +0900)
Change to use keyboard_post_init_user() hook (#3113)

keyboards/helix/rev2/keymaps/default/keymap.c
keyboards/helix/rev2/keymaps/led_test/led_test_init.c

index 5b8c5fae57b486ac252e5c0967efa153e3351915..a64eed3e72cb61c6fac73072ddf5d45853de9727 100644 (file)
@@ -506,14 +506,7 @@ void music_scale_user(void)
 //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
 #ifdef SSD1306OLED
 
-// 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(RGBLIGHT_MODE_RGB_TEST);
-__attribute__ ((weak))
-void led_test_init(void) {}
-
 void matrix_scan_user(void) {
-     led_test_init();
      iota_gfx_task();  // this is what updates the display continuously
 }
 
index 85f5d1aa7efb0ad7337329ac43bf5a5d7c291167..7f8813acdd8c5edc116437a53c5bcc50e9dc0874 100644 (file)
@@ -1,20 +1,6 @@
 #include QMK_KEYBOARD_H
 
-#if 1
-void led_test_init(void) {
-    static int scan_count = 0;
-    if( scan_count == 2 ) {
-       rgblight_enable_noeeprom();
-       rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
-    }
-    if( scan_count < 3 ) scan_count ++;
-}
-
-#else
-// when qmk/qmk_firmware PullRequest #3113 available.
-// can use this?
-void startup_user(void) {
+void keyboard_post_init_user(void) {
     rgblight_enable_noeeprom();
     rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST);
 }
-#endif