Skip to content

Commit 4902d7f

Browse files
committed
Fix for wled#4193 (twinkle fox & cat)
1 parent a873ca6 commit 4902d7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wled00/FX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,8 +2565,8 @@ static CRGB twinklefox_one_twinkle(uint32_t ms, uint8_t salt, bool cat)
25652565
{
25662566
// Overall twinkle speed (changed)
25672567
unsigned ticks = ms / SEGENV.aux0;
2568-
unsigned fastcycle8 = ticks;
2569-
unsigned slowcycle16 = (ticks >> 8) + salt;
2568+
unsigned fastcycle8 = uint8_t(ticks);
2569+
unsigned slowcycle16 = uint16_t((ticks >> 8) + salt);
25702570
slowcycle16 += sin8_t(slowcycle16);
25712571
slowcycle16 = (slowcycle16 * 2053) + 1384;
25722572
unsigned slowcycle8 = (slowcycle16 & 0xFF) + (slowcycle16 >> 8);

0 commit comments

Comments
 (0)