From 21ad968ac14b177a7c97d34106c4d6201912627f Mon Sep 17 00:00:00 2001
From: Erez Zukerman <bulk@ezuk.org>
Date: Wed, 30 May 2018 23:23:12 -0400
Subject: [PATCH] Customizable LED test duration (#3086)

* Customizable LED test duration

Code by Jack. :)

* only need an unit8_t
---
 quantum/rgb_matrix.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 992ce99de9..8c41fc54d2 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -149,8 +149,9 @@ void rgb_matrix_set_suspend_state(bool state) {
 
 void rgb_matrix_test(void) {
     // Mask out bits 4 and 5
-    // This 2-bit value will stay the same for 16 ticks.
-    switch ( (g_tick & 0x30) >> 4 )
+    // Increase the factor to make the test animation slower (and reduce to make it faster)
+    uint8_t factor = 10;
+    switch ( (g_tick & (0b11 << factor)) >> factor )
     {
         case 0:
         {