From e5c92a1e06f65b3adbbd11f2591c76153c2b29c8 Mon Sep 17 00:00:00 2001 From: Dmitry Blinov Date: Tue, 19 Dec 2023 12:05:50 +0200 Subject: [PATCH] garland: tune anim comets --- code/espurna/garland/animations/anim_comets.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/espurna/garland/animations/anim_comets.h b/code/espurna/garland/animations/anim_comets.h index d0d6cec1..962f1eca 100644 --- a/code/espurna/garland/animations/anim_comets.h +++ b/code/espurna/garland/animations/anim_comets.h @@ -18,7 +18,7 @@ class AnimComets : public Anim { c = {palette, numLeds}; } } else { - for (auto i = 0; i < 4; ++i) { + for (auto i = 0; i < 5; ++i) { comets.emplace_back(palette, numLeds); } } @@ -47,12 +47,12 @@ class AnimComets : public Anim { private: struct Comet { int dir = randDir(); - int len = secureRandom(10, 20); - float speed = ((float)secureRandom(4, 10)) / 10; + int len = secureRandom(10, 30); + float speed = ((float)secureRandom(4, 20)) / 10; float head; Color color; std::unique_ptr points; - Comet(Palette* pal, uint16_t numLeds) : head(dir ? secureRandom(0, numLeds / 2) : secureRandom(numLeds / 2, numLeds)), color(pal->getRndInterpColor()) { + Comet(Palette* pal, uint16_t numLeds) : head(dir > 0 ? secureRandom(0, numLeds / 2) : secureRandom(numLeds / 2, numLeds)), color(pal->getRndInterpColor()) { // DEBUG_MSG_P(PSTR("[GARLAND] Comet created head = %d len = %d speed = %g cr = %d cg = %d cb = %d\n"), head, len, speed, color.r, color.g, color.b); points.reset(new Color[len]);