Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Indicator LED issues with md_rgb_matrix.c #12097

Merged
merged 1 commit into from
Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions keyboards/massdrop/ctrl/config_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ led_config_t g_led_config = { {


#ifdef USB_LED_INDICATOR_ENABLE
void rgb_matrix_indicators_kb(void)
{
md_rgb_matrix_indicators();
void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
md_rgb_matrix_indicators_advanced(led_min, led_max);
}
#endif // USB_LED_INDICATOR_ENABLE

Expand Down
4 changes: 2 additions & 2 deletions tmk_core/protocol/arm_atsam/md_rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ static void flush(void) {
i2c_led_q_run();
}

void md_rgb_matrix_indicators(void) {
void md_rgb_matrix_indicators_advanced(uint8_t led_min, uint8_t led_max) {
uint8_t kbled = keyboard_leds();
if (kbled && rgb_matrix_config.enable) {
for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) {
for (uint8_t i = led_min; i < led_max; i++) {
if (
# if USB_LED_NUM_LOCK_SCANCODE != 255
(led_map[i].scan == USB_LED_NUM_LOCK_SCANCODE && (kbled & (1 << USB_LED_NUM_LOCK))) ||
Expand Down
2 changes: 1 addition & 1 deletion tmk_core/protocol/arm_atsam/md_rgb_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extern uint8_t gcr_actual_last;

void gcr_compute(void);

void md_rgb_matrix_indicators(void);
void md_rgb_matrix_indicators_advanced(uint8_t led_min, uint8_t led_max);

/*------------------------- Legacy Lighting Support ------------------------*/

Expand Down