While trying to help someone with a similar problem, something occurred to me that may be helpful ...
So with FastLED we use something like this to set a LED:
leds[i].setRGB(255, 130, 0); // Amber
We could create a function for this to flip direction, for example:
void setLED(int aLED, CRGB aColor, bool doReverse)
{
 if(doReverse)Â
 {
leds[NUM_LEDS - 1 - aLED] = aColor;
}
else
{
leds[aLED] = aColor;
}
}
So instead ofÂ
leds[i].setRGB(255, 130, 0); // Amber
We now say, for the normal direction:
setLED( i, CRGB(255, 130, 0), false ); // Amber
and for the reverse direction:
setLED( i, CRGB(255, 130, 0), true ); // Amber
Since we're talking about turn lights and DRL, I'd assume the option that only half the strip is used (turn signal), so we can even expand on this function by implementing something like "left", "right" and "both", and we can even implement a mirror effect here.
Something like this (this may be overkill):
#define LEDS_NORMAL 0
#define LEDS_REVERSE 1
#define LEDS_ONLY_LEFT 2
#define LEDS_ONLY_RIGHT 3
#define LEDS_MIRROR 4
....
void setLED(int aLED, CRGB aColor, byte flowDirection)
{
if(flowDirection == LEDS_NORMAL)Â // Normal strip use
 {
  leds[aLED] = aColor;
  }
else if(flowDirection == LEDS_REVERSE) // reverse order
 {
  leds[NUM_LEDS - 1 - aLED] = aColor;
 }
else if(flowDirection == LEDS_ONLY_LEFT) // count from left, max = NUM_LEDS/2
 {
 if(aLED < (NUM_LEDS/2) )
{
leds[aLED] = aColor;
}
 }
 else if(flowDirection == LEDS_ONLY_RIGHT) // count from right, max = NUM_LEDS/2
 {
if(aLED < (NUM_LEDS/2) )
{
 leds[NUM_LEDS - 1 - aLED] = aColor;
}
 }
else if(flowDirection == LEDS_MIRROR) // mirror both sides, max = NUM_LEDS/2
 {
if(aLED < (NUM_LEDS/2) )
{
 leds[NUM_LEDS - 1 - aLED] = aColor;
 leds[aLED] = aColor;
}
 }
}
Note :
- when using only LEFT, RIGHT or MIRROR, your LED range will of course be half of the usual range (NUM_LEDS/2). So in the calling function you will need to consider this.
- The LEFT and RIGHT function may need a little refinement.
Right now it only makes sure it stays in their own half, and flips the order when needed.
- Also not: instead of separate red, green, blue, I've used the data type "CRGB" (FastLED specific).
There is a function, also called CRGB that converts red, green and blue into this CRGB datatype.
This also allows you to assign the color directly, and you can do things like this:
setLED( i, CRGB::DarkOrange, true ); // (similar to) Amber
A list of color names can be found here: FastLED predefined colors.