aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorGravatar Yan-Fa Li <yanfali@gmail.com>2018-05-24 15:27:43 -0700
committerGravatar Drashna Jaelre <drashna@live.com>2018-05-24 15:27:43 -0700
commit9ae6f4f927bc27012929785e0f7479501406331f (patch)
tree5affdb94edd5d43ae20cc483084de2c44938bf45 /keyboards
parent3a4a28a38b53e67edd1141bf435df09d0a89466b (diff)
downloadqmk_firmware-9ae6f4f927bc27012929785e0f7479501406331f.tar.gz
Wait for QMK to initialize before configuring RGB (#3030)
Wait for 1 second before turning on RGB to get debug messages on console. - configure HSV color, on a brand new pro micro the default values are 0, 0, 0
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/bigswitch/bigswitch.c15
-rwxr-xr-xkeyboards/bigswitch/config.h2
2 files changed, 14 insertions, 3 deletions
diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/bigswitch/bigswitch.c
index 05935f2e9..3cc11e602 100644
--- a/keyboards/bigswitch/bigswitch.c
+++ b/keyboards/bigswitch/bigswitch.c
@@ -16,7 +16,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bigswitch.h"
+volatile uint8_t runonce = true;
+static uint16_t my_timer;
+
void matrix_init_user(void) {
- rgblight_enable();
- rgblight_mode(9);
+ my_timer = timer_read();
+}
+
+void matrix_scan_user(void) {
+ if (runonce && timer_elapsed(my_timer) > 1000) {
+ runonce = false;
+ rgblight_sethsv(0x0, 0xff, 0x80);
+ rgblight_mode(9);
+ rgblight_enable();
+ }
}
diff --git a/keyboards/bigswitch/config.h b/keyboards/bigswitch/config.h
index b6cbf06e9..cc290fd79 100755
--- a/keyboards/bigswitch/config.h
+++ b/keyboards/bigswitch/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN D3
#define RGBLIGHT_ANIMATIONS
-#define RGBLED_NUM 5
+#define RGBLED_NUM 8
#endif
#endif