diff options
| author | Erez Zukerman <bulk@ezuk.org> | 2018-05-30 23:23:12 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2018-05-30 23:23:12 -0400 |
| commit | 21ad968ac14b177a7c97d34106c4d6201912627f (patch) | |
| tree | ae0fede50d9a740fdd05bc7910bd37d8689124c9 /quantum/rgb_matrix.c | |
| parent | b2398ecbe7047d6bcd39a6c8039b1bfbdcc51ad2 (diff) | |
| download | qmk_firmware-21ad968ac14b177a7c97d34106c4d6201912627f.tar.gz qmk_firmware-21ad968ac14b177a7c97d34106c4d6201912627f.zip | |
Customizable LED test duration (#3086)
* Customizable LED test duration
Code by Jack. :)
* only need an unit8_t
Diffstat (limited to 'quantum/rgb_matrix.c')
| -rw-r--r-- | quantum/rgb_matrix.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 992ce99de..8c41fc54d 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -149,8 +149,9 @@ void rgb_matrix_set_suspend_state(bool state) { | |||
| 149 | 149 | ||
| 150 | void rgb_matrix_test(void) { | 150 | void rgb_matrix_test(void) { |
| 151 | // Mask out bits 4 and 5 | 151 | // Mask out bits 4 and 5 |
| 152 | // This 2-bit value will stay the same for 16 ticks. | 152 | // Increase the factor to make the test animation slower (and reduce to make it faster) |
| 153 | switch ( (g_tick & 0x30) >> 4 ) | 153 | uint8_t factor = 10; |
| 154 | switch ( (g_tick & (0b11 << factor)) >> factor ) | ||
| 154 | { | 155 | { |
| 155 | case 0: | 156 | case 0: |
| 156 | { | 157 | { |
