I'm using nblend() to cross fade between CRGB arrays: CRGB & nblend (CRGB &existing,

I’m using nblend() to cross fade between CRGB arrays:

CRGB & nblend (CRGB &existing, const CRGB &overlay, fract8 amountOfOverlay)

I’ve filled overlay with what I want to crossfade to from whatever is in existing, and existing is the CRGB array that was passed to FastLED.addLeds. The overlay array is just another CRGB array of the same size as existing. I’m calling nblend and then FastLED.show().

I have two questions:

  1. Sometimes not only do I have different LED values in the overlay, but I want the end result of the blend to be brighter or dimmer… how do I account for the change in brightness? If I understand FastLED.setBrightness correctly it gets applied when FastLED.show is called.

  2. Is there anyway to tell when the existing array is the same as the overlay? Or when has the cross fade completed? I’ve tried doing a memcmp() but i’ve had cases where is never returns 0 (no difference).

Thanks!