diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 5c351ed6..88e55be0 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -3565,6 +3565,7 @@ uint16_t WS2812FX::mode_chunchun(void) return FRAMETIME; } + typedef struct Spotlight { float speed; uint8_t colorIdx; @@ -3574,21 +3575,13 @@ typedef struct Spotlight { uint8_t type; } spotlight; -static const uint8_t SPOT_TYPE_SOLID = 0; -static const uint8_t SPOT_TYPE_GRADIENT = 1; -static const uint8_t SPOT_TYPE_2X_GRADIENT = 2; -static const uint8_t SPOT_TYPE_2X_DOT = 3; -static const uint8_t SPOT_TYPE_3X_DOT = 4; -static const uint8_t SPOT_TYPE_4X_DOT = 5; -static const uint8_t SPOT_TYPES_COUNT = 6; - -/* - * Blends the specified color with the existing pixel color. - */ -void WS2812FX::blendPixelColor(uint16_t n, uint32_t color, uint8_t blend) -{ - setPixelColor(n, color_blend(getPixelColor(n), color, blend)); -} +#define SPOT_TYPE_SOLID 0 +#define SPOT_TYPE_GRADIENT 1 +#define SPOT_TYPE_2X_GRADIENT 2 +#define SPOT_TYPE_2X_DOT 3 +#define SPOT_TYPE_3X_DOT 4 +#define SPOT_TYPE_4X_DOT 5 +#define SPOT_TYPES_COUNT 6 /* * Spotlights moving back and forth that cast dancing shadows. diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index f9c1fef9..5abe3790 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -597,6 +597,14 @@ void WS2812FX::fill(uint32_t c) { } } +/* + * Blends the specified color with the existing pixel color. + */ +void WS2812FX::blendPixelColor(uint16_t n, uint32_t color, uint8_t blend) +{ + setPixelColor(n, color_blend(getPixelColor(n), color, blend)); +} + /* * fade out function, higher rate = quicker fade */