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 committed by GitHub
commit 6e7fffefec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -183,8 +183,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;