Cosmetic fixes.

This commit is contained in:
Blaz Kristan
2022-06-15 22:17:34 +02:00
parent e146a476bd
commit 477c9ef577
5 changed files with 63 additions and 55 deletions

View File

@@ -993,6 +993,13 @@ void WS2812FX::fade_out(uint8_t rate) {
}
}
// fades all pixels to black using nscale8()
void WS2812FX::fadeToBlackBy(uint8_t fadeBy) {
for (uint16_t i = 0; i < SEGLEN; i++) {
setPixelColor(i, col_to_crgb(getPixelColor(i)).nscale8(255-fadeBy));
}
}
/*
* blurs segment content, source: FastLED colorutils.cpp
*/