mirror of
https://github.com/wled/WLED.git
synced 2025-07-12 21:36:32 +00:00
Bus length fix
This commit is contained in:
parent
e789a18553
commit
c600c6da63
@ -1290,7 +1290,7 @@ void WS2812FX::finalizeInit() {
|
|||||||
// if we have less counts than pins and they do not align, use last known count to set current count
|
// if we have less counts than pins and they do not align, use last known count to set current count
|
||||||
unsigned count = defCounts[(i < defNumCounts) ? i : defNumCounts -1];
|
unsigned count = defCounts[(i < defNumCounts) ? i : defNumCounts -1];
|
||||||
// analog always has length 1
|
// analog always has length 1
|
||||||
if (Bus::isPWM(dataType)) count = 1;
|
if (Bus::isPWM(dataType) || Bus::isOnOff(dataType)) count = 1;
|
||||||
prevLen += count;
|
prevLen += count;
|
||||||
BusConfig defCfg = BusConfig(dataType, defPin, start, count, DEFAULT_LED_COLOR_ORDER, false, 0, RGBW_MODE_MANUAL_ONLY, 0, useGlobalLedBuffer);
|
BusConfig defCfg = BusConfig(dataType, defPin, start, count, DEFAULT_LED_COLOR_ORDER, false, 0, RGBW_MODE_MANUAL_ONLY, 0, useGlobalLedBuffer);
|
||||||
if (BusManager::add(defCfg) == -1) break;
|
if (BusManager::add(defCfg) == -1) break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user