Skip to content

Commit 8317c89

Browse files
committed
better transitions overspeed bugfix
when the user wants less than 42 fps, respect this limit during transitions.
1 parent d915385 commit 8317c89

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wled00/FX_fcn.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,9 @@ void WS2812FX::service() {
19321932

19331933
if (frameDelay < speedLimit) frameDelay = FRAMETIME; // WLEDMM limit effects that want to go faster than target FPS
19341934
if (seg.mode != FX_MODE_HALLOWEEN_EYES) seg.call++;
1935-
if (seg.transitional && frameDelay > FRAMETIME_FIXED) frameDelay = FRAMETIME_FIXED; // force faster updates during transition // WLEDMM only if effect requested very slow updates
1935+
1936+
if (seg.transitional && frameDelay > max(int(FRAMETIME), int(FRAMETIME_FIXED)))
1937+
frameDelay = max(int(FRAMETIME), int(FRAMETIME_FIXED)); // force faster updates during transition // WLEDMM only if effect requested very slow updates
19361938

19371939
seg.lastBri = seg.currentBri(seg.on ? seg.opacity:0); // WLEDMM remember for next time
19381940
seg.handleTransition();

0 commit comments

Comments
 (0)