animartrix bugfix: always paint in 2D mode

avoid "accidential" use of 1Dexpand mapping modes
This commit is contained in:
Frank
2026-01-18 17:21:08 +01:00
parent 9f1d68c529
commit 61a7d697dd

View File

@@ -140,7 +140,10 @@ class ANIMartRIXMod:public ANIMartRIX {
SEGMENT.setPixelColorXY(x, y, uint32_t(CRGB(pixel.red, pixel.green, pixel.blue)) & 0x00FFFFFF); SEGMENT.setPixelColorXY(x, y, uint32_t(CRGB(pixel.red, pixel.green, pixel.blue)) & 0x00FFFFFF);
} }
void setPixelColor(int index, rgb pixel) override { void setPixelColor(int index, rgb pixel) override {
SEGMENT.setPixelColor(index, uint32_t(CRGB(pixel.red, pixel.green, pixel.blue)) & 0x00FFFFFF); // get x and y, so we can us setPixelColorXY() - faster in WLEDMM
int x = index % num_x;
int y = index / num_x;
SEGMENT.setPixelColorXY(x,y, uint32_t(CRGB(pixel.red, pixel.green, pixel.blue)) & 0x00FFFFFF);
} }
// Add any extra custom effects not part of the ANIMartRIX libary here // Add any extra custom effects not part of the ANIMartRIX libary here