bugfix #2 for switched-off segments

segments that are "off" were still rendered during transitions.
This commit is contained in:
Frank
2024-12-03 16:04:21 +01:00
parent 9922d2aa8d
commit 23d41e66c9
2 changed files with 4 additions and 0 deletions

View File

@@ -1935,6 +1935,7 @@ void WS2812FX::service() {
now = millis() + timebase;
#endif
seg.startFrame(); // WLEDMM
if (!_triggered && (seg.currentBri(seg.opacity) == 0) && (seg.lastBri == 0)) continue; // WLEDMM skip totally black segments
// effect blending (execute previous effect)
// actual code may be a bit more involved as effects have runtime data including allocated memory
//if (seg.transitional && seg._modeP) (*_mode[seg._modeP])(progress());
@@ -1944,6 +1945,7 @@ void WS2812FX::service() {
if (seg.mode != FX_MODE_HALLOWEEN_EYES) seg.call++;
if (seg.transitional && frameDelay > FRAMETIME) frameDelay = FRAMETIME; // force faster updates during transition
seg.lastBri = seg.currentBri(seg.on ? seg.opacity:0); // WLEDMM remember for next time
seg.handleTransition();
}