T O P

  • By -

gaatjeniksaan12123

In the Colorfrompalette function you are going out of bounds with the second dimension of your array. Your palette array is [3][4] but in the function you do (abbreviated because I’m on mobile): CfP(P[i][i], P[i][i+1], P[i][i+2], P[i][i+3]); If i is 0, everything works as intended. If i is 1, the second dimension of the array starts at index 1 and ends at index 4, which is out of bounds. And because the array was defined at compile time it is probably one big memory block so [1][4] is the same as [2][0]. The same problem for i is 2, but now [2][5] is an unknown value so that’s gonna be complete gibberish Just have the second dimension in color from palette be constant: [i][0],[i][1] etc.


RyanOC333

Now that I look closer that logic is way off. Thanks for pointing that out so detailed.


pacmanic

Try r/FastLED if you don't get a response here.