Skip to content

Commit

Permalink
Fixup LED matrix. (#15020)
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc authored Nov 2, 2021
1 parent 2326c8f commit 699e69b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions quantum/led_matrix/led_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@

#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL
# if defined(LED_MATRIX_SPLIT)
# define LED_MATRIX_USE_LIMITS(min, max)
uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter;
uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT;
if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL;
uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT;
if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0];
if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0];
# define LED_MATRIX_USE_LIMITS(min, max) \
uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \
uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \
if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; \
uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; \
if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; \
if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0];
# else
# define LED_MATRIX_USE_LIMITS(min, max) \
uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \
Expand Down

0 comments on commit 699e69b

Please sign in to comment.