]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
rgb_matrix: continue calling rgb_matrix_indicators() when toggled off
authorJames Laird-Wah <james@laird-wah.net>
Sat, 15 Sep 2018 12:28:25 +0000 (22:28 +1000)
committerJack Humbert <jack.humb@gmail.com>
Fri, 5 Oct 2018 01:43:31 +0000 (21:43 -0400)
This allows user code to continue to use the matrix for indication, even
when the RGB toggle is off, using rgb_matrix_set_color().

Without this change, it's impossible for user code to use the matrix
when the toggle is off, as any changes get overwritten with black on the
next task cycle, and the indicator code is not called at all.

quantum/rgb_matrix.c

index 1f00e9d99b479ca5e6f73f204e75df0d573d39b8..26ee57f5c2c4d166e7678186200d1b7ebb5fd668 100644 (file)
@@ -620,7 +620,8 @@ void rgb_matrix_custom(void) {
 void rgb_matrix_task(void) {
     static uint8_t toggle_enable_last = 255;
        if (!rgb_matrix_config.enable) {
-       rgb_matrix_all_off();
+        rgb_matrix_all_off();
+        rgb_matrix_indicators();
         toggle_enable_last = rgb_matrix_config.enable;
        return;
     }