mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
Fix compilation error when led/rgb process limit is zero. (#22328)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
c245ee4cd3
commit
7e0147f8e6
|
@ -342,9 +342,8 @@ void led_matrix_task(void) {
|
||||||
case RENDERING:
|
case RENDERING:
|
||||||
led_task_render(effect);
|
led_task_render(effect);
|
||||||
if (effect) {
|
if (effect) {
|
||||||
// Only run the basic indicators in the last render iteration (default there are 5 iterations)
|
if (led_task_state == FLUSHING) {
|
||||||
if (led_effect_params.iter == LED_MATRIX_LED_PROCESS_MAX_ITERATIONS) {
|
led_matrix_indicators(); // ensure we only draw basic indicators once rendering is finished
|
||||||
led_matrix_indicators();
|
|
||||||
}
|
}
|
||||||
led_matrix_indicators_advanced(&led_effect_params);
|
led_matrix_indicators_advanced(&led_effect_params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,6 @@
|
||||||
#ifndef LED_MATRIX_LED_PROCESS_LIMIT
|
#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
|
#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_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < LED_MATRIX_LED_COUNT
|
||||||
# if defined(LED_MATRIX_SPLIT)
|
# if defined(LED_MATRIX_SPLIT)
|
||||||
|
|
|
@ -383,8 +383,7 @@ void rgb_matrix_task(void) {
|
||||||
case RENDERING:
|
case RENDERING:
|
||||||
rgb_task_render(effect);
|
rgb_task_render(effect);
|
||||||
if (effect) {
|
if (effect) {
|
||||||
// Only run the basic indicators in the last render iteration (default there are 5 iterations)
|
if (rgb_task_state == FLUSHING) { // ensure we only draw basic indicators once rendering is finished
|
||||||
if (rgb_effect_params.iter == RGB_MATRIX_LED_PROCESS_MAX_ITERATIONS) {
|
|
||||||
rgb_matrix_indicators();
|
rgb_matrix_indicators();
|
||||||
}
|
}
|
||||||
rgb_matrix_indicators_advanced(&rgb_effect_params);
|
rgb_matrix_indicators_advanced(&rgb_effect_params);
|
||||||
|
|
|
@ -106,7 +106,6 @@
|
||||||
#ifndef RGB_MATRIX_LED_PROCESS_LIMIT
|
#ifndef RGB_MATRIX_LED_PROCESS_LIMIT
|
||||||
# define RGB_MATRIX_LED_PROCESS_LIMIT ((RGB_MATRIX_LED_COUNT + 4) / 5)
|
# define RGB_MATRIX_LED_PROCESS_LIMIT ((RGB_MATRIX_LED_COUNT + 4) / 5)
|
||||||
#endif
|
#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_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < RGB_MATRIX_LED_COUNT
|
||||||
# if defined(RGB_MATRIX_SPLIT)
|
# if defined(RGB_MATRIX_SPLIT)
|
||||||
|
|
Loading…
Reference in a new issue