Merge pull request #4878 from willmmiles/fix-pwm

Fix operation of length 1 strips, such as PWM LEDs
copilot/fix-4879
netmindz 2025-08-28 06:31:39 +01:00 zatwierdzone przez GitHub
commit c92f0a9d90
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 0 dodań i 5 usunięć

Wyświetl plik

@ -1340,11 +1340,6 @@ void WS2812FX::blendSegment(const Segment &topSegment) const {
uint8_t opacity = topSegment.currentBri(); // returns transitioned opacity for style FADE
uint8_t cct = topSegment.currentCCT();
if (length == 1) {
// Can't blend only a single pixel, prevents crash when bus init fails
return;
}
Segment::setClippingRect(0, 0); // disable clipping by default
const unsigned dw = (blendingStyle==BLEND_STYLE_OUTSIDE_IN ? progInv : progress) * width / 0xFFFFU + 1;