diff --git a/wled00/led.cpp b/wled00/led.cpp index 9f887667..885b6369 100644 --- a/wled00/led.cpp +++ b/wled00/led.cpp @@ -101,7 +101,7 @@ void colorUpdated(int callMode) //Notifier: apply received FX to selected segments only if actually receiving FX if (someSel) strip.applyToAllSelected = receiveNotificationEffects; - bool fxChanged = strip.setEffectConfig(effectCurrent, effectSpeed, effectIntensity, effectPalette); + bool fxChanged = strip.setEffectConfig(effectCurrent, effectSpeed, effectIntensity, effectPalette) || effectChanged; bool colChanged = colorChanged(); //Notifier: apply received color to selected segments only if actually receiving color @@ -109,6 +109,7 @@ void colorUpdated(int callMode) if (fxChanged || colChanged) { + effectChanged = false; if (realtimeTimeout == UINT32_MAX) realtimeTimeout = 0; if (isPreset) {isPreset = false;} else {currentPreset = -1;} diff --git a/wled00/set.cpp b/wled00/set.cpp index e2bced2f..be745015 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -812,10 +812,22 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply) { WS2812FX::Segment& seg = strip.getSegment(i); if (!seg.isSelected()) continue; - if (effectCurrent != prevEffect) seg.mode = effectCurrent; - if (effectSpeed != prevSpeed) seg.speed = effectSpeed; - if (effectIntensity != prevIntensity) seg.intensity = effectIntensity; - if (effectPalette != prevPalette) seg.palette = effectPalette; + if (effectCurrent != prevEffect) { + seg.mode = effectCurrent; + effectChanged = true; + } + if (effectSpeed != prevSpeed) { + seg.speed = effectSpeed; + effectChanged = true; + } + if (effectIntensity != prevIntensity) { + seg.intensity = effectIntensity; + effectChanged = true; + } + if (effectPalette != prevPalette) { + seg.palette = effectPalette; + effectChanged = true; + } } if (col0Changed) { diff --git a/wled00/wled.h b/wled00/wled.h index c41b9079..a8c33e68 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -425,6 +425,7 @@ WLED_GLOBAL byte effectCurrent _INIT(0); WLED_GLOBAL byte effectSpeed _INIT(128); WLED_GLOBAL byte effectIntensity _INIT(128); WLED_GLOBAL byte effectPalette _INIT(0); +WLED_GLOBAL bool effectChanged _INIT(false); // network WLED_GLOBAL bool udpConnected _INIT(false), udp2Connected _INIT(false), udpRgbConnected _INIT(false);