summaryrefslogtreecommitdiffstats
path: root/quantum/rgb_matrix.c
diff options
context:
space:
mode:
authorJames Laird-Wah <james@laird-wah.net>2018-09-15 14:28:25 +0200
committerJack Humbert <jack.humb@gmail.com>2018-10-05 03:43:31 +0200
commit0c3137d8ff0b84ee6b39ea8b85aeb4f82fcd7a9c (patch)
treeabde9d60207844c18709f04c89d3e1811c624622 /quantum/rgb_matrix.c
parent26adf3706a7822e05977c0eadb6963c0db2e1c3b (diff)
downloadqmk_firmware-0c3137d8ff0b84ee6b39ea8b85aeb4f82fcd7a9c.tar.gz
qmk_firmware-0c3137d8ff0b84ee6b39ea8b85aeb4f82fcd7a9c.tar.xz
rgb_matrix: continue calling rgb_matrix_indicators() when toggled off
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.
Diffstat (limited to 'quantum/rgb_matrix.c')
-rw-r--r--quantum/rgb_matrix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 1f00e9d99..26ee57f5c 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -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;
}