Incorrect mode params fix.

Variable eye width in Halloween Eyes.
This commit is contained in:
Blaz Kristan 2022-05-11 09:53:40 +02:00
parent 4484721a9f
commit 9ed14b6e8c
2 changed files with 5 additions and 5 deletions

View File

@ -2489,8 +2489,8 @@ uint16_t WS2812FX::mode_twinklecat()
//inspired by https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#LEDStripEffectBlinkingHalloweenEyes
#define HALLOWEEN_EYE_SPACE 3
#define HALLOWEEN_EYE_WIDTH 1
#define HALLOWEEN_EYE_SPACE (2*MAX(1,SEGLEN>>5))
#define HALLOWEEN_EYE_WIDTH MAX(1,SEGLEN>>5)
uint16_t WS2812FX::mode_halloween_eyes()
{
@ -2518,7 +2518,7 @@ uint16_t WS2812FX::mode_halloween_eyes()
if (fadestage > 255) fadestage = 255;
uint32_t c = color_blend(color_from_palette(SEGENV.aux1 & 0xFF, false, false, 0), SEGCOLOR(1), fadestage);
for (uint16_t i = 0; i < HALLOWEEN_EYE_WIDTH; i++) {
for (uint16_t i = 0; i < MAX(HALLOWEEN_EYE_WIDTH,SEGLEN>>5); i++) {
if (isMatrix) {
setPixelColorXY(startPos + i, SEGMENT.offset, c);
setPixelColorXY(start2ndEye + i, SEGMENT.offset, c);

View File

@ -1367,7 +1367,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Two Dots@!,Dot size;1,2,Bg;!",
"Fairy Twinkle",
"Running Dual",
"Halloween@Duration,Eye fade time;Fx,Bg,;!",
"Halloween",
"Chase 3@!,Size;1,2,3;0",
"Tri Wipe@!,Width;1,2,3;0",
"Tri Fade",
@ -1396,7 +1396,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Ripple",
"Twinklefox",
"Twinklecat",
"Halloween Eyes",
"Halloween Eyes@Duration,Eye fade time;Fx,Bg,;!",
"Solid Pattern@Fg size,Bg size;Fg,Bg,;!=0",
"Solid Pattern Tri@,Size;1,2,3;!=0",
"Spots@Spread,Width;!,!,;!",