I have a question about mirroring LEDs,

(Dylan Lovinger) #1

I have a question about mirroring LEDs, or reversing the order and pattern direction of LEDs that are already written to. Specifically with CRGBset.

I’m referencing an old post about CRGBset (https://plus.google.com/102282558639672545743/posts/a3VeZVhRnqG) where Daniel mentions mirroring with a simple -sign: e.g. leds(10,19) = -leds(0,9); This feature seems to have never been fully implemented, as it’s not working at all (the post states it’s alpha, after all).

I’m wondering if there is an easy was to reverse or mirror a section of LEDs? Ideally I’d like to write a pattern to the full strip, then reverse the direction of a section: leds(0,n_section) = -leds(0,n_section).
Attempting to reverse via leds(0,n_section) = leds(n_section,0) creates a kind of center-in/out pattern, reversing half of the section rather than the full section.

Any ideas on how to tackle this problem in an elegant way with CRGBset?