From 3110b0a4769e3f8206258f0a8e2511b03773809e Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Sun, 29 Sep 2024 18:02:39 +0200 Subject: [PATCH] fix for XL builds some usermod still seems to used sPC(float, float, c). > Linking .pio/build/esp32_4MB_XL/firmware.elf .pio/build/esp32_4MB_XL/src/usermods_list.cpp.o:(.literal._ZN7Frame3DD5Ev[Frame3D::~Frame3D()]+0x4): undefined reference to `Segment::setPixelColorXY(float, float, unsigned int, bool, bool)' --- wled00/FX_2Dfcn.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index a277c521..42865933 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -413,7 +413,6 @@ void IRAM_ATTR_YN Segment::setPixelColorXY(int x, int y, uint32_t col) //WLEDMM: } } -#if 0 // WLEDMM setPixelColorXY(float x, float y, uint32_t col, ..) is depricated. use wu_pixel(x,y,col) instead. // anti-aliased version of setPixelColorXY() void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast) // WLEDMM some speedups due to fast int and faster sqrt16 @@ -421,6 +420,7 @@ void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast if (Segment::maxHeight==1) return; // not a matrix set-up if (x<0.0f || x>1.0f || y<0.0f || y>1.0f) return; // not normalized +#if 0 // depricated const uint_fast16_t cols = virtualWidth(); const uint_fast16_t rows = virtualHeight(); @@ -464,8 +464,13 @@ void Segment::setPixelColorXY(float x, float y, uint32_t col, bool aa, bool fast } else { setPixelColorXY(uint16_t(roundf(fX)), uint16_t(roundf(fY)), col); } -} + +#else // replacement using wu_pixel + unsigned px = x * (virtualWidth() <<8); + unsigned py = y * (virtualHeight() <<8); + wu_pixel(px, py, CRGB(col)); #endif +} // returns RGBW values of pixel uint32_t IRAM_ATTR_YN Segment::getPixelColorXY(int x, int y) const {