Removed unnecessary set call.

Fixed incorrect colorUpdated call.
Fixed white +/- in IR40 remote.
This commit is contained in:
Blaz Kristan
2022-02-27 16:18:37 +01:00
parent 5b84acebbc
commit 4d10c9de95
5 changed files with 46 additions and 46 deletions

View File

@@ -10,16 +10,6 @@ void setRandomColor(byte* rgb)
colorHStoRGB(lastRandomIndex*256,255,rgb);
}
//relatively change white brightness, minumum A=5
void relativeChangeWhite(int8_t amount, byte lowerBoundary)
{
int16_t new_val = (int16_t) col[3] + amount;
if (new_val > 0xFF) new_val = 0xFF;
else if (new_val < lowerBoundary) new_val = lowerBoundary;
col[3] = new_val;
stateChanged = true;
}
void colorHStoRGB(uint16_t hue, byte sat, byte* rgb) //hue, sat to rgb
{
float h = ((float)hue)/65535.0;