Reinstate global k_rgb_matrix_split (#24388)

This commit is contained in:
Ryan 2024-09-15 10:08:29 +10:00 committed by GitHub
parent d48aac6a2c
commit e84104fe8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View File

@ -387,7 +387,6 @@ struct led_matrix_limits_t led_matrix_get_limits(uint8_t iter) {
limits.led_min_index = LED_MATRIX_LED_PROCESS_LIMIT * (iter);
limits.led_max_index = limits.led_min_index + LED_MATRIX_LED_PROCESS_LIMIT;
if (limits.led_max_index > LED_MATRIX_LED_COUNT) limits.led_max_index = LED_MATRIX_LED_COUNT;
uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT;
if (is_keyboard_left() && (limits.led_max_index > k_led_matrix_split[0])) limits.led_max_index = k_led_matrix_split[0];
if (!(is_keyboard_left()) && (limits.led_min_index < k_led_matrix_split[0])) limits.led_min_index = k_led_matrix_split[0];
# else
@ -397,9 +396,8 @@ struct led_matrix_limits_t led_matrix_get_limits(uint8_t iter) {
# endif
#else
# if defined(LED_MATRIX_SPLIT)
limits.led_min_index = 0;
limits.led_max_index = LED_MATRIX_LED_COUNT;
const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT;
limits.led_min_index = 0;
limits.led_max_index = LED_MATRIX_LED_COUNT;
if (is_keyboard_left() && (limits.led_max_index > k_led_matrix_split[0])) limits.led_max_index = k_led_matrix_split[0];
if (!(is_keyboard_left()) && (limits.led_min_index < k_led_matrix_split[0])) limits.led_min_index = k_led_matrix_split[0];
# else

View File

@ -83,6 +83,11 @@ static uint32_t rgb_timer_buffer;
static last_hit_t last_hit_buffer;
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
// split rgb matrix
#if defined(RGB_MATRIX_SPLIT)
const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT;
#endif
EECONFIG_DEBOUNCE_HELPER(rgb_matrix, EECONFIG_RGB_MATRIX, rgb_matrix_config);
void eeconfig_update_rgb_matrix(void) {
@ -399,7 +404,6 @@ struct rgb_matrix_limits_t rgb_matrix_get_limits(uint8_t iter) {
limits.led_min_index = RGB_MATRIX_LED_PROCESS_LIMIT * (iter);
limits.led_max_index = limits.led_min_index + RGB_MATRIX_LED_PROCESS_LIMIT;
if (limits.led_max_index > RGB_MATRIX_LED_COUNT) limits.led_max_index = RGB_MATRIX_LED_COUNT;
uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT;
if (is_keyboard_left() && (limits.led_max_index > k_rgb_matrix_split[0])) limits.led_max_index = k_rgb_matrix_split[0];
if (!(is_keyboard_left()) && (limits.led_min_index < k_rgb_matrix_split[0])) limits.led_min_index = k_rgb_matrix_split[0];
# else
@ -409,9 +413,8 @@ struct rgb_matrix_limits_t rgb_matrix_get_limits(uint8_t iter) {
# endif
#else
# if defined(RGB_MATRIX_SPLIT)
limits.led_min_index = 0;
limits.led_max_index = RGB_MATRIX_LED_COUNT;
const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT;
limits.led_min_index = 0;
limits.led_max_index = RGB_MATRIX_LED_COUNT;
if (is_keyboard_left() && (limits.led_max_index > k_rgb_matrix_split[0])) limits.led_max_index = k_rgb_matrix_split[0];
if (!(is_keyboard_left()) && (limits.led_min_index < k_rgb_matrix_split[0])) limits.led_min_index = k_rgb_matrix_split[0];
# else