Reinstate global k_rgb_matrix_split
(#24388)
This commit is contained in:
parent
d48aac6a2c
commit
e84104fe8d
@ -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_min_index = LED_MATRIX_LED_PROCESS_LIMIT * (iter);
|
||||||
limits.led_max_index = limits.led_min_index + LED_MATRIX_LED_PROCESS_LIMIT;
|
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;
|
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_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];
|
if (!(is_keyboard_left()) && (limits.led_min_index < k_led_matrix_split[0])) limits.led_min_index = k_led_matrix_split[0];
|
||||||
# else
|
# else
|
||||||
@ -399,7 +398,6 @@ struct led_matrix_limits_t led_matrix_get_limits(uint8_t iter) {
|
|||||||
# if defined(LED_MATRIX_SPLIT)
|
# if defined(LED_MATRIX_SPLIT)
|
||||||
limits.led_min_index = 0;
|
limits.led_min_index = 0;
|
||||||
limits.led_max_index = LED_MATRIX_LED_COUNT;
|
limits.led_max_index = LED_MATRIX_LED_COUNT;
|
||||||
const 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_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];
|
if (!(is_keyboard_left()) && (limits.led_min_index < k_led_matrix_split[0])) limits.led_min_index = k_led_matrix_split[0];
|
||||||
# else
|
# else
|
||||||
|
@ -83,6 +83,11 @@ static uint32_t rgb_timer_buffer;
|
|||||||
static last_hit_t last_hit_buffer;
|
static last_hit_t last_hit_buffer;
|
||||||
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
|
#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);
|
EECONFIG_DEBOUNCE_HELPER(rgb_matrix, EECONFIG_RGB_MATRIX, rgb_matrix_config);
|
||||||
|
|
||||||
void eeconfig_update_rgb_matrix(void) {
|
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_min_index = RGB_MATRIX_LED_PROCESS_LIMIT * (iter);
|
||||||
limits.led_max_index = limits.led_min_index + RGB_MATRIX_LED_PROCESS_LIMIT;
|
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;
|
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_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];
|
if (!(is_keyboard_left()) && (limits.led_min_index < k_rgb_matrix_split[0])) limits.led_min_index = k_rgb_matrix_split[0];
|
||||||
# else
|
# else
|
||||||
@ -411,7 +415,6 @@ struct rgb_matrix_limits_t rgb_matrix_get_limits(uint8_t iter) {
|
|||||||
# if defined(RGB_MATRIX_SPLIT)
|
# if defined(RGB_MATRIX_SPLIT)
|
||||||
limits.led_min_index = 0;
|
limits.led_min_index = 0;
|
||||||
limits.led_max_index = RGB_MATRIX_LED_COUNT;
|
limits.led_max_index = RGB_MATRIX_LED_COUNT;
|
||||||
const 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_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];
|
if (!(is_keyboard_left()) && (limits.led_min_index < k_rgb_matrix_split[0])) limits.led_min_index = k_rgb_matrix_split[0];
|
||||||
# else
|
# else
|
||||||
|
Loading…
Reference in New Issue
Block a user