diff --git a/usermods/pixels_dice_tray/led_effects.h b/usermods/pixels_dice_tray/led_effects.h index 373f8e8bc..542d86c29 100644 --- a/usermods/pixels_dice_tray/led_effects.h +++ b/usermods/pixels_dice_tray/led_effects.h @@ -40,7 +40,7 @@ static pixels::RollEvent GetLastRollForSegment() { * Alternating pixels running function (copied static function). */ // paletteBlend: 0 - wrap when moving, 1 - always wrap, 2 - never wrap, 3 - none (undefined) -#define PALETTE_SOLID_WRAP (strip.paletteBlend == 1 || strip.paletteBlend == 3) +#define PALETTE_SOLID_WRAP (paletteBlend == 1 || paletteBlend == 3) static void running_copy(uint32_t color1, uint32_t color2, bool theatre = false) { int width = (theatre ? 3 : 1) + (SEGMENT.intensity >> 4); // window uint32_t cycleTime = 50 + (255 - SEGMENT.speed); diff --git a/usermods/user_fx/user_fx.cpp b/usermods/user_fx/user_fx.cpp index e01c319fd..2258b8ad4 100644 --- a/usermods/user_fx/user_fx.cpp +++ b/usermods/user_fx/user_fx.cpp @@ -3,7 +3,7 @@ // for information how FX metadata strings work see https://kno.wled.ge/interfaces/json-api/#effect-metadata // paletteBlend: 0 - wrap when moving, 1 - always wrap, 2 - never wrap, 3 - none (undefined) -#define PALETTE_SOLID_WRAP (strip.paletteBlend == 1 || strip.paletteBlend == 3) +#define PALETTE_SOLID_WRAP (paletteBlend == 1 || paletteBlend == 3) #define indexToVStrip(index, stripNr) ((index) | (int((stripNr)+1)<<16)) @@ -874,7 +874,7 @@ static void handleBoundary(Ant& ant, float& position, bool gatherFood, bool atSt // Helper function to calculate ant color static uint32_t getAntColor(int antIndex, int numAnts, bool usePalette) { if (usePalette) - return SEGMENT.color_from_palette(antIndex * 255 / numAnts, false, (strip.paletteBlend == 1 || strip.paletteBlend == 3), 255); + return SEGMENT.color_from_palette(antIndex * 255 / numAnts, false, (paletteBlend == 1 || paletteBlend == 3), 255); // Alternate between two colors for default palette return (antIndex % 3 == 1) ? SEGCOLOR(0) : SEGCOLOR(2); } diff --git a/wled00/FX.cpp b/wled00/FX.cpp index a6caa471f..0b5ecdda9 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -65,8 +65,8 @@ #define IBN 5100 // paletteBlend: 0 - wrap when moving, 1 - always wrap, 2 - never wrap, 3 - none (undefined) -#define PALETTE_SOLID_WRAP (strip.paletteBlend == 1 || strip.paletteBlend == 3) -#define PALETTE_MOVING_WRAP !(strip.paletteBlend == 2 || (strip.paletteBlend == 0 && SEGMENT.speed == 0)) +#define PALETTE_SOLID_WRAP (paletteBlend == 1 || paletteBlend == 3) +#define PALETTE_MOVING_WRAP !(paletteBlend == 2 || (paletteBlend == 0 && SEGMENT.speed == 0)) #define indexToVStrip(index, stripNr) ((index) | (int((stripNr)+1)<<16)) @@ -3398,7 +3398,7 @@ void mode_glitter() counter = counter >> 8; } - bool noWrap = (strip.paletteBlend == 2 || (strip.paletteBlend == 0 && SEGMENT.speed == 0)); + bool noWrap = (paletteBlend == 2 || (paletteBlend == 0 && SEGMENT.speed == 0)); for (unsigned i = 0; i < SEGLEN; i++) { unsigned colorIndex = (i * 255 / SEGLEN) - counter; if (noWrap) colorIndex = map(colorIndex, 0, 255, 0, 240); //cut off blend at palette "end" diff --git a/wled00/FX.h b/wled00/FX.h index 0919f8e8d..ce7a22223 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -834,7 +834,6 @@ class WS2812FX { public: WS2812FX() : - paletteBlend(0), now(millis()), timebase(0), isMatrix(false), @@ -936,7 +935,7 @@ class WS2812FX { inline bool isSuspended() const { return _suspend; } // returns true if strip.service() execution is suspended inline bool needsUpdate() const { return _triggered; } // returns true if strip received a trigger() request - uint8_t paletteBlend; + // uint8_t paletteBlend; // obsolete - use global paletteBlend instead of strip.paletteBlend uint8_t getActiveSegmentsNum() const; uint8_t getFirstSelectedSegId() const; uint8_t getLastActiveSegmentId() const;