From e82336f35523ab31d783a984b300fd36e6281768 Mon Sep 17 00:00:00 2001 From: ewowi Date: Thu, 14 Jul 2022 17:22:37 +0200 Subject: [PATCH] Small bugfixes --- wled00/FX_fcn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index fd60cdd59..6afc7f482 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -208,8 +208,8 @@ void IRAM_ATTR Segment::setPixelColor(int i, uint32_t col) // expand in circular fashion from center for (int degrees = 0; degrees <= 360; degrees += 180 / (i+1)) { // this may prove too many iterations on larger matrices // may want to try float version as well (with or without antialiasing) - unsigned int x = roundf(roundf((sin_t(degrees*DEG_TO_RAD) * i + vW / 2.0f) * 10)/10); // sin_t is Aircoookie's implementation that uses less RAM - unsigned int y = roundf(roundf((cos_t(degrees*DEG_TO_RAD) * i + vH / 2.0f) * 10)/10); // cos_t is Aircoookie's implementation that uses less RAM + int x = (int)roundf(roundf((sin_t(degrees*DEG_TO_RAD) * i + vW / 2.0f) * 10)/10); // sin_t is Aircoookie's implementation that uses less RAM + int y = (int)roundf(roundf((cos_t(degrees*DEG_TO_RAD) * i + vH / 2.0f) * 10)/10); // cos_t is Aircoookie's implementation that uses less RAM setPixelColorXY(x, y, col); } break; @@ -325,7 +325,7 @@ uint32_t Segment::getPixelColor(uint16_t i) } #endif - if (getOption(SEG_OPTION_REVERSED)) i = strip.virtualLength() - i - 1; + if (getOption(SEG_OPTION_REVERSED)) i = virtualLength() - i - 1; i *= groupLength(); i += start; /* offset/phase */