kopia lustrzana https://github.com/Aircoookie/WLED
Update usermods/rgb-rotary-encoder/rgb-rotary-encoder.cpp
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>pull/3777/head
rodzic
3dc45b80ba
commit
c80c9bd8b9
|
@ -54,7 +54,11 @@ class RgbRotaryEncoderUsermod : public Usermod
|
|||
|
||||
void initLedBus()
|
||||
{
|
||||
byte _pins[OUTPUT_MAX_PINS] = {(byte)ledIo, 255, 255, 255, 255};
|
||||
// Initialize all pins to the sentinel value first…
|
||||
byte _pins[OUTPUT_MAX_PINS];
|
||||
std::fill(std::begin(_pins), std::end(_pins), 255);
|
||||
// …then set only the LED pin
|
||||
_pins[0] = static_cast<byte>(ledIo);
|
||||
BusConfig busCfg = BusConfig(TYPE_WS2812_RGB, _pins, 0, numLeds, COL_ORDER_GRB, false, 0);
|
||||
|
||||
ledBus = new BusDigital(busCfg, WLED_MAX_BUSSES - 1);
|
||||
|
|
Ładowanie…
Reference in New Issue