Skip to content

Commit a70bfa0

Browse files
committed
Merge pull request wled#4596 from Dschogo/patch-1
Fix wipe effect smoothness
1 parent a6d9a82 commit a70bfa0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

wled00/FX.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ uint16_t color_wipe(bool rev, bool useRandomColors) {
229229
}
230230

231231
unsigned ledIndex = (prog * SEGLEN) >> 15;
232-
unsigned rem = 0;
233-
rem = (prog * SEGLEN) * 2; //mod 0xFFFF
232+
uint16_t rem = (prog * SEGLEN) * 2; //mod 0xFFFF by truncating
234233
rem /= (SEGMENT.intensity +1);
235234
if (rem > 255) rem = 255;
236235

0 commit comments

Comments
 (0)