After a brief period of confusion I’ve determined that my P2 128x64 panel uses RBG colour order. For instance, scrollingLayer.setColor({0x00, 0xff, 0x00}); gives blue text, not green.
Is there a way to configure SmartMatrix to send RBG, to remove the overhead of rearranging the colour-order manually before swapping buffers?
for (uint16_t i = 0; i < kMatrixWidth * kMatrixHeight; i++)
buffer[i] = rgb24(buffer[i].red, buffer[i].blue, buffer[i].green);
I modified MatrixHardware_Teensy4_ShieldV5.h to wrap each of the pin definitions in an #ifndef block. That works fine if I declare the regular pin mapping in my sketch before including SmartMatrix. But when I swap the pins G0 & B0 and/or G1 & B1 I get a corrupted display.
I should read more carefully. I found the colour-order config just above the code I modified. That works perfectly. Thanks for causing me to re-read it.