Merge pull request #4596 from Dschogo/patch-1

Fix wipe effect smoothness
This commit is contained in:
Blaž Kristan 2025-03-15 14:37:46 +01:00
parent a6d9a8220c
commit a70bfa0c89

View File

@ -229,8 +229,7 @@ uint16_t color_wipe(bool rev, bool useRandomColors) {
}
unsigned ledIndex = (prog * SEGLEN) >> 15;
unsigned rem = 0;
rem = (prog * SEGLEN) * 2; //mod 0xFFFF
uint16_t rem = (prog * SEGLEN) * 2; //mod 0xFFFF by truncating
rem /= (SEGMENT.intensity +1);
if (rem > 255) rem = 255;