From 7b9efa135724cdb06bfa0377410f9218785661df Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Mon, 27 May 2019 18:01:20 +0200 Subject: [PATCH] Added Effect TwirlEffect (WIP). --- effects.h | 16 ++++++++++++++++ pitrix.ino | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/effects.h b/effects.h index b943c7a..c5df912 100644 --- a/effects.h +++ b/effects.h @@ -413,3 +413,19 @@ class CycleEffect : public Effect { } } }; + +class TwirlEffect : public Effect { + private: + uint8_t angleOffset = 0; + double center_x = 8; + double center_y = 8; + public: + void loop() { + for (int x=0; x* cycle_effects; #include "effects.h" -#define NUM_EFFECTS 11 +#define NUM_EFFECTS 12 //EffectEntry effects[NUM_EFFECTS]; Sinematrix3 sinematrix3; BigClock big_clock; @@ -66,6 +66,7 @@ SingleDynamic single_dynamic; MultiDynamic multi_dynamic; MatrixEffect matrix; CycleEffect effect_cycle; +TwirlEffect effect_twirl; EffectEntry effects[NUM_EFFECTS] = { {"sinematrix3", (Effect *)&sinematrix3}, @@ -79,6 +80,7 @@ EffectEntry effects[NUM_EFFECTS] = { {"multi_dynamic", (Effect *)&multi_dynamic}, {"matrix", (Effect *)&matrix}, {"cycle", (Effect *)&effect_cycle}, + {"twirl", (Effect *)&effect_twirl}, }; void setup_cycle_effects() {