Minor tweaks.
This commit is contained in:
parent
84d0c17c4b
commit
81bafa00ac
@ -47,10 +47,8 @@ void relativeChangeWhite(int8_t amount, byte lowerBoundary)
|
||||
col[3] = new_val;
|
||||
}
|
||||
|
||||
void colorHSVtoRGB(float hue, float saturation, float value, byte& red, byte& green, byte& blue)
|
||||
void colorHSVtoRGB(float hue, float saturation, float value, byte& r, byte& g, byte& b)
|
||||
{
|
||||
float r = red, g = green, b = blue;
|
||||
|
||||
uint8_t i = hue * 6.0;
|
||||
float f = hue * 6.0 - i;
|
||||
value *= 255.0;
|
||||
@ -66,10 +64,6 @@ void colorHSVtoRGB(float hue, float saturation, float value, byte& red, byte& gr
|
||||
case 4: r = t, g = p, b = value; break;
|
||||
case 5: r = value, g = p, b = q; break;
|
||||
}
|
||||
|
||||
red = r;
|
||||
green = g;
|
||||
blue = b;
|
||||
}
|
||||
|
||||
void colorRGBtoHSV(byte red, byte green, byte blue, float& hue, float& saturation, float& value)
|
||||
@ -100,7 +94,7 @@ void colorRGBtoHSV(byte red, byte green, byte blue, float& hue, float& saturatio
|
||||
//this feature might cause slowdowns with large LED counts
|
||||
void correctColors(byte r, byte g, byte b, byte* rgb) {
|
||||
float hsv[3] = { 0,0,0 };
|
||||
colorRGBtoHSV(r, g,b , hsv[0], hsv[1], hsv[2]);
|
||||
colorRGBtoHSV(r, g, b, hsv[0], hsv[1], hsv[2]);
|
||||
float saturated = hsv[1] > SATURATION_THRESHOLD ?
|
||||
hsv[1] * ((float)liveHSVSaturation / 10) : hsv[1];
|
||||
float saturation = saturated < MAX_HSV_SATURATION ? saturated : MAX_HSV_SATURATION;
|
||||
|
@ -294,6 +294,7 @@ function showToast(text, error = false)
|
||||
clearTimeout(timeout);
|
||||
x.style.animation = 'none';
|
||||
timeout = setTimeout(function(){ x.className = x.className.replace("show", ""); }, 2900);
|
||||
if (error) console.log(text);
|
||||
}
|
||||
|
||||
function showErrorToast()
|
||||
|
1412
wled00/html_ui.h
1412
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user