Skip to content

Commit

Permalink
bugfix: avoid double blanking segments
Browse files Browse the repository at this point in the history
if both seg.reset and seg.needsBlank were set, this caused a second (unwanted) blanking in frame 1.
  • Loading branch information
softhack007 authored Dec 11, 2024
1 parent 2cc0848 commit 40bfe61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void Segment::resetIfRequired() {
next_time = 0; step = 0; call = 0; aux0 = 0; aux1 = 0;
reset = false; // setOption(SEG_OPTION_RESET, false);
startFrame(); // WLEDMM update cached propoerties
if (isActive() && !freeze) fill(BLACK); // WLEDMM start clean
if (isActive() && !freeze) { fill(BLACK); needsBlank = false; } // WLEDMM start clean
DEBUG_PRINTLN("Segment reset");
} else if (needsBlank) {
startFrame(); // WLEDMM update cached propoerties
Expand Down

0 comments on commit 40bfe61

Please sign in to comment.