From 7e0147f8e6cebbf88a6f25c448cbd0246d3ab260 Mon Sep 17 00:00:00 2001 From: Dasky <32983009+daskygit@users.noreply.github.com> Date: Tue, 24 Oct 2023 13:45:33 +0100 Subject: Fix compilation error when led/rgb process limit is zero. (#22328) Co-authored-by: Drashna Jaelre --- quantum/rgb_matrix/rgb_matrix.c | 3 +-- quantum/rgb_matrix/rgb_matrix.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'quantum/rgb_matrix') diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 8e69616a0e..e56802f164 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -383,8 +383,7 @@ void rgb_matrix_task(void) { case RENDERING: rgb_task_render(effect); if (effect) { - // Only run the basic indicators in the last render iteration (default there are 5 iterations) - if (rgb_effect_params.iter == RGB_MATRIX_LED_PROCESS_MAX_ITERATIONS) { + if (rgb_task_state == FLUSHING) { // ensure we only draw basic indicators once rendering is finished rgb_matrix_indicators(); } rgb_matrix_indicators_advanced(&rgb_effect_params); diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 8ac263c635..bba07af79d 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -106,7 +106,6 @@ #ifndef RGB_MATRIX_LED_PROCESS_LIMIT # define RGB_MATRIX_LED_PROCESS_LIMIT ((RGB_MATRIX_LED_COUNT + 4) / 5) #endif -#define RGB_MATRIX_LED_PROCESS_MAX_ITERATIONS ((RGB_MATRIX_LED_COUNT + RGB_MATRIX_LED_PROCESS_LIMIT - 1) / RGB_MATRIX_LED_PROCESS_LIMIT) #if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < RGB_MATRIX_LED_COUNT # if defined(RGB_MATRIX_SPLIT) -- cgit v1.2.3