mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-11 06:29:15 +00:00
Move where convert_rgb_to_rgbw is called
This commit is contained in:
parent
578bf44204
commit
cd7f17caf6
1 changed files with 8 additions and 11 deletions
|
@ -601,8 +601,8 @@ void rgblight_set(void) {
|
|||
LED_TYPE *start_led;
|
||||
uint16_t num_leds = clipping_num_leds;
|
||||
|
||||
if (!rgblight_config.enable) {
|
||||
for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) {
|
||||
for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) {
|
||||
if (!rgblight_config.enable) {
|
||||
led[i].r = 0;
|
||||
led[i].g = 0;
|
||||
led[i].b = 0;
|
||||
|
@ -610,10 +610,13 @@ void rgblight_set(void) {
|
|||
led[i].w = 0;
|
||||
# endif
|
||||
}
|
||||
# ifdef RGBW
|
||||
else {
|
||||
convert_rgb_to_rgbw(led[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
# ifdef RGBLIGHT_LED_MAP
|
||||
LED_TYPE led0[RGBLED_NUM];
|
||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||
|
@ -623,13 +626,7 @@ void rgblight_set(void) {
|
|||
# else
|
||||
start_led = led + clipping_start_pos;
|
||||
# endif
|
||||
|
||||
#ifdef RGBW
|
||||
for (uint8_t i = 0; i < num_leds; i++) {
|
||||
convert_rgb_to_rgbw(start_led[i]);
|
||||
}
|
||||
#endif
|
||||
ws2812_setleds(start_led, num_leds);
|
||||
ws2812_setleds(start_led, num_leds);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue