Merge branch 'master' into merge-master

This commit is contained in:
Blaz Kristan
2022-02-20 22:24:11 +01:00
parent c895b76864
commit 41b6f3ffa7
45 changed files with 2184 additions and 2213 deletions

View File

@@ -44,7 +44,7 @@ void onAlexaChange(EspalexaDevice* dev)
if (bri == 0)
{
bri = briLast;
colorUpdated(CALL_MODE_ALEXA);
stateUpdated(CALL_MODE_ALEXA);
}
} else {
applyPreset(macroAlexaOn, CALL_MODE_ALEXA);
@@ -58,7 +58,7 @@ void onAlexaChange(EspalexaDevice* dev)
{
briLast = bri;
bri = 0;
colorUpdated(CALL_MODE_ALEXA);
stateUpdated(CALL_MODE_ALEXA);
}
} else {
applyPreset(macroAlexaOff, CALL_MODE_ALEXA);
@@ -67,7 +67,7 @@ void onAlexaChange(EspalexaDevice* dev)
} else if (m == EspalexaDeviceProperty::bri)
{
bri = espalexaDevice->getValue();
colorUpdated(CALL_MODE_ALEXA);
stateUpdated(CALL_MODE_ALEXA);
} else //color
{
if (espalexaDevice->getColorMode() == EspalexaColorMode::ct) //shade of white
@@ -79,9 +79,7 @@ void onAlexaChange(EspalexaDevice* dev)
if (strip.hasCCTBus()) {
uint8_t segid = strip.getMainSegmentId();
WS2812FX::Segment& seg = strip.getSegment(segid);
uint8_t cctPrev = seg.cct;
seg.setCCT(k, segid);
if (seg.cct != cctPrev) effectChanged = true; //send UDP
col[0]= 0; col[1]= 0; col[2]= 0; col[3]= 255;
} else if (strip.hasWhiteChannel()) {
switch (ct) { //these values empirically look good on RGBW