diff --git a/wled00/FX.h b/wled00/FX.h index 59faf9247..3f2ea7d02 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -612,7 +612,7 @@ class WS2812FX { // 96 bytes public: // FastLED array, so we can refer to leds[i] instead of getPixel() and setPixel() - CRGB *leds = nullptr ; //See FX_fcn.cpp for init (wip). + uint32_t *leds = nullptr ; //See FX_fcn.cpp for init (wip). WS2812FX() : gammaCorrectBri(false), diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index d9c2715a2..db89dbbb9 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -443,7 +443,7 @@ void IRAM_ATTR Segment::setPixelColor(int i, uint32_t col) #endif if (strip.useLedsArray) - strip.leds[start + i] = col; //ewowi: is this right? + strip.leds[start + i] = col; uint16_t len = length(); uint8_t _bri_t = currentBri(getOption(SEG_OPTION_ON) ? opacity : 0); @@ -536,8 +536,7 @@ uint32_t Segment::getPixelColor(uint16_t i) #endif if (strip.useLedsArray) { - CRGB led = strip.leds[start + i]; - return RGBW32(led.r, led.g, led.b, 0); + return strip.leds[start + i]; } if (getOption(SEG_OPTION_REVERSED)) i = virtualLength() - i - 1; @@ -859,7 +858,7 @@ void WS2812FX::service() { leds = (CRGB*) ps_malloc(sizeof(CRGB) * _length); else #endif - leds = (CRGB*) malloc(sizeof(CRGB) * _length); + leds = (uint32_t*) malloc(sizeof(uint32_t) * _length); } // }