diff --git a/wled00/ir.cpp b/wled00/ir.cpp index 321b72bc2..6a8cd9199 100644 --- a/wled00/ir.cpp +++ b/wled00/ir.cpp @@ -194,52 +194,55 @@ void decodeIR(uint32_t code) } void applyRepeatActions(){ - - if (lastRepeatableAction == ACTION_BRIGHT_UP) - { - incBrightness(); colorUpdated(CALL_MODE_BUTTON); - } - else if (lastRepeatableAction == ACTION_BRIGHT_DOWN ) - { - decBrightness(); colorUpdated(CALL_MODE_BUTTON); - } - if (lastRepeatableAction == ACTION_SPEED_UP) - { - changeEffectSpeed(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); - } - else if (lastRepeatableAction == ACTION_SPEED_DOWN ) - { - changeEffectSpeed(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); - } - - if (lastRepeatableAction == ACTION_INTENSITY_UP) - { - changeEffectIntensity(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); - } - else if (lastRepeatableAction == ACTION_INTENSITY_DOWN ) - { - changeEffectIntensity(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); - } - - if (lastValidCode == IR40_WPLUS) - { - relativeChangeWhite(10); colorUpdated(CALL_MODE_BUTTON); - } - else if (lastValidCode == IR40_WMINUS) - { - relativeChangeWhite(-10, 5); colorUpdated(CALL_MODE_BUTTON); - } - else if ((lastValidCode == IR24_ON || lastValidCode == IR40_ON) && irTimesRepeated > 7 ) - { - nightlightActive = true; - nightlightStartTime = millis(); - colorUpdated(CALL_MODE_BUTTON); - } - else if (irEnabled == 8) + if (irEnabled == 8) { decodeIRJson(lastValidCode); } + else + { + if (lastRepeatableAction == ACTION_BRIGHT_UP) + { + incBrightness(); colorUpdated(CALL_MODE_BUTTON); + } + else if (lastRepeatableAction == ACTION_BRIGHT_DOWN ) + { + decBrightness(); colorUpdated(CALL_MODE_BUTTON); + } + + if (lastRepeatableAction == ACTION_SPEED_UP) + { + changeEffectSpeed(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); + } + else if (lastRepeatableAction == ACTION_SPEED_DOWN ) + { + changeEffectSpeed(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); + } + + if (lastRepeatableAction == ACTION_INTENSITY_UP) + { + changeEffectIntensity(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); + } + else if (lastRepeatableAction == ACTION_INTENSITY_DOWN ) + { + changeEffectIntensity(lastRepeatableValue); colorUpdated(CALL_MODE_BUTTON); + } + + if (lastValidCode == IR40_WPLUS) + { + relativeChangeWhite(10); colorUpdated(CALL_MODE_BUTTON); + } + else if (lastValidCode == IR40_WMINUS) + { + relativeChangeWhite(-10, 5); colorUpdated(CALL_MODE_BUTTON); + } + else if ((lastValidCode == IR24_ON || lastValidCode == IR40_ON) && irTimesRepeated > 7 ) + { + nightlightActive = true; + nightlightStartTime = millis(); + colorUpdated(CALL_MODE_BUTTON); + } + } } void decodeIR24(uint32_t code) diff --git a/wled00/set.cpp b/wled00/set.cpp index ff1652144..8ab7205f3 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -720,11 +720,13 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply) updateVal(&req, "&B=", &col[2]); updateVal(&req, "&W=", &col[3]); for (byte i=0; i<4; i++) if (prevCol[i]!=col[i]) col0Changed = colorChanged = true; + if (col0Changed) selseg.setColor(0, RGBW32(col[0], col[1], col[2], col[3]), selectedSeg); updateVal(&req, "R2=", &colSec[0]); updateVal(&req, "G2=", &colSec[1]); updateVal(&req, "B2=", &colSec[2]); updateVal(&req, "W2=", &colSec[3]); for (byte i=0; i<4; i++) if (prevColSec[i]!=colSec[i]) col1Changed = colorChanged = true; + if (col1Changed) selseg.setColor(1, RGBW32(colSec[0], colSec[1], colSec[2], colSec[3]), selectedSeg); #ifdef WLED_ENABLE_LOXONE //lox parser