summaryrefslogtreecommitdiff
path: root/quantum/led_matrix
diff options
context:
space:
mode:
authorDasky <32983009+daskygit@users.noreply.github.com>2023-10-24 13:45:33 +0100
committerGitHub <noreply@github.com>2023-10-24 13:45:33 +0100
commit7e0147f8e6cebbf88a6f25c448cbd0246d3ab260 (patch)
treebec9deca0e7712614121ba92fc73ebb007041efe /quantum/led_matrix
parentc245ee4cd34e768798c4b2c16e1315ebdf3fba79 (diff)
Fix compilation error when led/rgb process limit is zero. (#22328)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'quantum/led_matrix')
-rw-r--r--quantum/led_matrix/led_matrix.c5
-rw-r--r--quantum/led_matrix/led_matrix.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c
index 4f22cd6da8..bbc94bca7a 100644
--- a/quantum/led_matrix/led_matrix.c
+++ b/quantum/led_matrix/led_matrix.c
@@ -342,9 +342,8 @@ void led_matrix_task(void) {
case RENDERING:
led_task_render(effect);
if (effect) {
- // Only run the basic indicators in the last render iteration (default there are 5 iterations)
- if (led_effect_params.iter == LED_MATRIX_LED_PROCESS_MAX_ITERATIONS) {
- led_matrix_indicators();
+ if (led_task_state == FLUSHING) {
+ led_matrix_indicators(); // ensure we only draw basic indicators once rendering is finished
}
led_matrix_indicators_advanced(&led_effect_params);
}
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h
index 77d4f558ac..ab5ca32308 100644
--- a/quantum/led_matrix/led_matrix.h
+++ b/quantum/led_matrix/led_matrix.h
@@ -88,7 +88,6 @@
#ifndef LED_MATRIX_LED_PROCESS_LIMIT
# define LED_MATRIX_LED_PROCESS_LIMIT ((LED_MATRIX_LED_COUNT + 4) / 5)
#endif
-#define LED_MATRIX_LED_PROCESS_MAX_ITERATIONS ((LED_MATRIX_LED_COUNT + LED_MATRIX_LED_PROCESS_LIMIT - 1) / LED_MATRIX_LED_PROCESS_LIMIT)
#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < LED_MATRIX_LED_COUNT
# if defined(LED_MATRIX_SPLIT)