I don’t know why you deleted the last comment you made on here, that was actually part of what I was looking for - when you had
"I’ve defined it as follows:
struct CRGB leds[NUM_STRIPS][LED_COUNT];
Since LED_COUNT=22, and the above function uses LED_COUNT2 = 120, it looks like this is the problem."
yes, you were absolutely overflowing leds - and this is the kind of thing that would’ve taken me about 15 seconds to spot if you had uploaded the code initially when I asked, the first time.
There’s a couple of ways to fix this. One is the way you looked at, having two separate leds arrays:
CRGB leds1[LED_COUNT];
CRGB leds2[LED_COUNT2];
The other is to have one array with all of them:
CRGB leds[LED_COUNT + LED_COUNT2];
in that case, you would change your addLeds lines to:
LEDS.addLeds<WS2801,LED_CK,LED_DT>(leds,LED_COUNT);
LEDS.addLeds<WS2811,LED_PIN>(leds + LED_COUNT, LED_COUNT2);
Which basically says “The first LED_COUNT leds are for the WS2801 and the next LED_COUNT2 leds are for the WS2811.”
If you want an array of arrays, you can do:
CRGB leds[NUM_STRIPS][LED_COUNT2];
this will waste some memory, as if leds[0] is for the WS2801, obviously anything you write to leds[0] after leds[0][LED_COUNT-1] will be ignored. However, that would completely take care of the overflow issues you were having.