WRGB Use correct multiplier (#6237)

This commit is contained in:
Marcel Hetzendorfer 2024-02-18 19:40:20 +01:00 committed by Jesse Hills
parent 61a45dcebe
commit 29ec40db5f
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -160,7 +160,7 @@ light::ESPColorView ESP32RMTLEDStripLightOutput::get_view_internal(int32_t index
b = 0; b = 0;
break; break;
} }
uint8_t multiplier = this->is_rgbw_ ? 4 : 3; uint8_t multiplier = this->is_rgbw_ || this->is_wrgb_ ? 4 : 3;
uint8_t white = this->is_wrgb_ ? 0 : 3; uint8_t white = this->is_wrgb_ ? 0 : 3;
return {this->buf_ + (index * multiplier) + r + this->is_wrgb_, return {this->buf_ + (index * multiplier) + r + this->is_wrgb_,