diff options
Diffstat (limited to 'quantum/led_matrix')
-rw-r--r-- | quantum/led_matrix/led_matrix.c | 10 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix.h | 5 |
2 files changed, 12 insertions, 3 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 828d61641a..1676a60aa3 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -20,8 +20,13 @@ #include "led_matrix.h" #include "progmem.h" #include "eeprom.h" +#include "eeconfig.h" +#include "keyboard.h" +#include "sync_timer.h" +#include "debug.h" #include <string.h> #include <math.h> +#include <stdlib.h> #include "led_tables.h" #include <lib/lib8tion/lib8tion.h> @@ -366,7 +371,10 @@ void led_matrix_task(void) { case RENDERING: led_task_render(effect); if (effect) { - led_matrix_indicators(); + // 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(); + } led_matrix_indicators_advanced(&led_effect_params); } break; diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index c7d360f366..c2533ca49c 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -23,7 +23,7 @@ #include <stdint.h> #include <stdbool.h> #include "led_matrix_types.h" -#include "quantum.h" +#include "keyboard.h" #ifdef IS31FL3731 # include "is31fl3731-simple.h" @@ -42,8 +42,9 @@ #endif #ifndef LED_MATRIX_LED_PROCESS_LIMIT -# define LED_MATRIX_LED_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 4) / 5 +# 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) |