Skip to content

Commit d8f1519

Browse files
authored
Update leds.h
1 parent 64102db commit d8f1519

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

include/leds.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ class NeopixelParallel
417417
NeopixelParallel(NeopixelSubtype _type, size_t pixelSize, uint64_t _resetTime, int _ledsNumber, int _pin):
418418
myLaneMask(1 << (instances++))
419419
{
420-
maxLeds = std::max(maxLeds, _ledsNumber);
420+
int stripLEDCounts[] = {5, 7, 15}; // LED count per strip
421+
maxLeds = stripLEDCounts[instances]; // Assign per segment
422+
421423

422424
delete muxer;
423425
muxer = new Neopixel(_type, instances, _resetTime, maxLeds, _pin, maxLeds * 8 * pixelSize );
@@ -461,7 +463,10 @@ class NeopixelParallelType : public NeopixelParallel
461463

462464
public:
463465

464-
NeopixelParallelType(int _ledsNumber, int _basePinForLanes) :
466+
NeopixelParallelType(int _basePinForLanes)
467+
: NeopixelParallel(_type, sizeof(colorData), RESET_TIME,
468+
stripLEDCounts[instances], _basePinForLanes)
469+
465470
NeopixelParallel(_type, sizeof(colorData), RESET_TIME, _ledsNumber, _basePinForLanes)
466471
{
467472
for (uint8_t a = 0; a < 16; a++)

0 commit comments

Comments
 (0)