Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638)

This commit is contained in:
Nick Brassel 2020-10-23 14:39:03 +11:00 committed by James Young
parent daea43debf
commit de4cbe34ff
No known key found for this signature in database
GPG key ID: 8E1085BF6FCFBD74
16 changed files with 20 additions and 16 deletions

View file

@ -123,9 +123,11 @@ void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) {
rgblight_ranges.effect_num_leds = num_leds;
}
__attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); }
void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
HSV hsv = {hue, sat, val};
RGB rgb = hsv_to_rgb(hsv);
RGB rgb = rgblight_hsv_to_rgb(hsv);
setrgb(rgb.r, rgb.g, rgb.b, led1);
}