Skip to content

Commit

Permalink
Update rgb_underglow.c
Browse files Browse the repository at this point in the history
Support for LED indicators for 50 layers.
  • Loading branch information
oselvaraj authored Mar 8, 2024
1 parent a48af67 commit ef93bb4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/src/rgb_underglow.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,14 @@ int left_right_rgb_decimals[] = {0, 63, 9, 18, 27, 36, 45, 54, 57, 58, 59, 60, 6
(led_data.indicators & ZMK_LED_SCROLLLOCK_BIT) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
// set third led as layer
if(led_data.layer > 49) {
pixels[2].r = 0;
pixels[2].g = 0;
pixels[2].b = 0;
pixels[0].r = 0;
pixels[0].g = 0;
pixels[0].b = 0;
}
else {
pixels[2].r = ((left_right_rgb_decimals[led_data.layer]>>2)&1) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
pixels[2].g = ((left_right_rgb_decimals[led_data.layer]>>1)&1) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
pixels[2].b = ((left_right_rgb_decimals[led_data.layer]>>0)&1) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
pixels[0].r = ((left_right_rgb_decimals[led_data.layer]>>2)&1) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
pixels[0].g = ((left_right_rgb_decimals[led_data.layer]>>1)&1) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
pixels[0].b = ((left_right_rgb_decimals[led_data.layer]>>0)&1) * CONFIG_ZMK_RGB_UNDERGLOW_BRT_SCALE;
}

/*switch (led_data.layer) {
Expand Down

0 comments on commit ef93bb4

Please sign in to comment.