Daniel, There two issue with the code you posted.
1st) First this isn’t mirrored. This code will create two fire animation independently on each side.
2nd) I tried to run your Code and I found an error. When you setup the pointers for leftSide and rightSide, you should have the rightSide start at 0, else you will always try to fill in the flame starting at index 60 up to 119, vs wanting to go from 0 to 59. So you have to reverse the two cells.
I remove a lot of the comment i cut and past using the Fire_Pallet, but here my code that i got to run on my LED 116 LED infinity Mirror.
#include <FastLED.h>
#define LED_PIN 9
#define COLOR_ORDER GRB
#define CHIPSET WS2811
#define NUM_LEDS 116
#define NLPS 58
#define COOLING 55
#define SPARKING 120
#define BRIGHTNESS 100
#define FRAMES_PER_SECOND 60
CRGBPalette16 currentPalette;
// here’s your “normal” array
CRGB leds[NUM_LEDS];
// We’ve set up two “pointers” to the leds, rightSide, starting at 0, and leftSide, starting at 59.
CRGB *leftSide = leds + NLPS;
CRGB *rightSide = leds;
// Now we also want to track heat outside of the fire function
byte leftHeat[NLPS];
byte rightHeat[NLPS];
void setup() {
delay(3000); // sanity delay
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );
currentPalette = HeatColors_p;
}
void loop() {
Fire(leftSide, leftHeat, NLPS, -1);
Fire(rightSide, rightHeat, NLPS, 1);
FastLED.show(); // display this frame
FastLED.delay(1000 / FRAMES_PER_SECOND);
}
// direction: -1 means go from high to low, 1 means low to high
void Fire(CRGB *fireleds, byte *heat, int numLeds, int direction) {
// Step 1 - cool
for(int i = 0; i < numLeds; i++) {
heat[i] = qsub8( heat[i], random8(0, ((COOLING * 10) / numLeds) + 2));
}
for( int k= numLeds - 3; k > 0; k–) {
heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3;
}
if( random8() < SPARKING ) {
int y = random8(7);
heat[y] = qadd8( heat[y], random8(160,255) );
}
// Split out into two clauses to be extra clear about what is going on.
// If direction is less than 0, then our heat array will fill from high led down
// if direction is greater than or equal to 0, then our heat array will fill from low led on up
for( int j = 0; j < numLeds; j++) {
byte colorindex = scale8( heat[j], 240);
if(direction < 0) {
fireleds[(numLeds-1)-j] = ColorFromPalette( currentPalette, colorindex);
} else {
fireleds[j] = ColorFromPalette( currentPalette, colorindex);
}
}
}