Skip to content

Commit

Permalink
Fix id67 RGB Matrix (qmk#16916)
Browse files Browse the repository at this point in the history
  • Loading branch information
waffle87 authored and zykrah committed Jul 2, 2022
1 parent e2dd3ce commit 7111a04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion keyboards/idobao/id67/id67.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ led_config_t g_led_config = { {
__attribute__ ((weak))
void rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, 0xFF, 0xFF, 0xFF);
rgb_matrix_set_color(23, 0xFF, 0xFF, 0xFF);
}
}
8 changes: 4 additions & 4 deletions keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {

if (host_keyboard_led_state().caps_lock) {
if (isRGBOff) {
rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, v, v, v); // white
rgb_matrix_set_color(23, v, v, v); // white
} else {
// Caps Lock key/LED
if (timer_elapsed(recording_timer) > 500) {
isCapsBlink = !isCapsBlink;
recording_timer = timer_read();
}
if (isCapsBlink) {
rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, v, v, v); // white
rgb_matrix_set_color(23, v, v, v); // white
}

// Alpha keys/LEDs
Expand All @@ -144,15 +144,15 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t g = 0;
uint8_t b = 0;

if ((g_led_config.flags[ID67_CAPS_LOCK_KEY_INDEX] & LED_FLAG_LAYER_IND) != 0) {
if ((g_led_config.flags[23] & LED_FLAG_LAYER_IND) != 0) {
switch (current_layer) {
case LAYER_1: b = v; break; // blue
case LAYER_2: g = v; break; // green
case LAYER_3: r = v; break; // red
}
}

rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, r, g, b); // off
rgb_matrix_set_color(23, r, g, b); // off
}

// Layer indicator stuff
Expand Down

0 comments on commit 7111a04

Please sign in to comment.