mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-14 07:55:28 +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;
|
LED_TYPE *start_led;
|
||||||
uint16_t num_leds = clipping_num_leds;
|
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].r = 0;
|
||||||
led[i].g = 0;
|
led[i].g = 0;
|
||||||
led[i].b = 0;
|
led[i].b = 0;
|
||||||
|
@ -610,9 +610,12 @@ void rgblight_set(void) {
|
||||||
led[i].w = 0;
|
led[i].w = 0;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
# ifdef RGBW
|
||||||
|
else {
|
||||||
|
convert_rgb_to_rgbw(led[i]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ifdef RGBLIGHT_LED_MAP
|
# ifdef RGBLIGHT_LED_MAP
|
||||||
LED_TYPE led0[RGBLED_NUM];
|
LED_TYPE led0[RGBLED_NUM];
|
||||||
|
@ -623,12 +626,6 @@ void rgblight_set(void) {
|
||||||
# else
|
# else
|
||||||
start_led = led + clipping_start_pos;
|
start_led = led + clipping_start_pos;
|
||||||
# endif
|
# 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
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue