I have a set of six 144 LED strips and ONE of them is

I have a set of six 144 LED strips and ONE of them is brighter than the rest (and it’s not a voltage issue, it’s in between two dimmer ones, power is injected every 3rd and it’s a middle one). Is there any way in FastLED to apply color correction to only one or a range of LEDs, rather than the whole set? Or do I need to do it on my own in the CRGB buffer ahead of time?

Yes injecting more often would be nice but isn’t the question (or answer).

I don’t believe you can do a CC on just a portion of a strip using .setCorrection on your addLeds line.

You’ll probably need to make your own subroutine that you call right before any FastLED.show() that does a slight brightness correction on only that range of pixels.

in code, subtract a constant amount of brightness from the pixles of the brighter strip.

assuming the range of pixel addresses of brightstrip is between 287 and 431

then we would run this right before updating the strip

for (int n=287; n<431; n++)

leds[n].subtractFromRGB(20);

where 20 can be adjusted to take the brightness down to match the others.

Thanks, yes, I know the how part, but I don’t know the when. I can’t modify the real user buffer because I’d then have to “fix” it. Is there any chance to hook or modify the point where FastLED has take it’s COPY of the buffer so I can modify THAT instead?

Whatever is in the leds array (or whatever you named your array for your pixels) is what gets pulled and sent to the pixels. Any master CC or brightness adjusts are applied as the data is sent out.

Can you rephrase what you’re wanting to do, maybe I’m not understanding what you’re asking?

@Dave_Plummer i was suggesting to apply this right before you ask the processor to update the led strip. I assume it is updated periodically in your code. if not, then simply apply this right before you run the command to send the pixels to the strip the first time. you must have some function like this

FastLED.show();

or

leds.show();

or similar to send the data to the strip (exact prefix to ".show " depends on how you set up your code.

so, add the adjustment code right before this appears in your code.

@Mark_Estes But let’s say LED’s 80-90 get this adjustment. They’d get it EVERY time you called show(), and that’s the problem. Effects like the typical Meteor don’t redraw the whole strip every frame so you can’t tinker with the original buffer, and I don’t know where the opportunity is to swap in a copy.

If you have enough memory you could try using two CRGB arrays. One as your working array that you operate on, and then copy that data to an array that gets adjusted and displayed.

CRGB leds[NUM_LEDS]; //not displayed
CRGB display[NUM_LEDS]; //adjusted and displayed

Probably don’t need to duplicate the entire arrary, but only the section that need to be adjusted.

Copy pixel data for bright strip to temp array
Run adjustment on leds for the bright range.
Call FastLED.show().
Copy temp data back to leds.

Would that work?

Now I’m more curious as to WHY that one strip is brighter? What’s different?

@Dave_Plummer you are right. sorry. I was doing this to a copy of the main array and overlooked that you were not.