From 9e5c8c7086518cb54d7144211b2e43830c54bc14 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 24 Jul 2024 23:41:54 -0700 Subject: [PATCH 1/2] start of adding multis for other devices --- .../src/Patterns/Multi/BackStrobePattern.cpp | 19 ++++++++++++++++++- .../src/Patterns/Multi/BackStrobePattern.h | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp b/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp index 12ffdef229..1822436761 100644 --- a/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp +++ b/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp @@ -41,6 +41,23 @@ void BackStrobePattern::init() } void BackStrobePattern::play() +{ + switch (m_engine.leds().ledCount()) { + case 28: + playOrbit(); + break; + default: + playNormal(); + break; + } +} + +void BackStrobePattern::playOrbit() +{ + // orbit version +} + +void BackStrobePattern::playNormal() { if (m_stepTimer.alarm() == 0) { // switch which patterns are displayed @@ -52,4 +69,4 @@ void BackStrobePattern::play() m_switch ? &m_secondPatternArgs : &m_firstPatternArgs); } CompoundPattern::play(); -} \ No newline at end of file +} diff --git a/VortexEngine/src/Patterns/Multi/BackStrobePattern.h b/VortexEngine/src/Patterns/Multi/BackStrobePattern.h index 4a18f6df32..38c3c22080 100644 --- a/VortexEngine/src/Patterns/Multi/BackStrobePattern.h +++ b/VortexEngine/src/Patterns/Multi/BackStrobePattern.h @@ -17,6 +17,9 @@ class BackStrobePattern : public CompoundPattern virtual void play() override; private: + void playOrbit(); + void playNormal(); + // the speed for the step timer in x100 ms chunks, so a value of 10 // will be 1000ms uint8_t m_stepSpeed; From 5166bf946d86e954ab6ac12a56e05bb986f9d20a Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 24 Jul 2024 23:50:44 -0700 Subject: [PATCH 2/2] missing include --- VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp b/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp index 1822436761..594084faaf 100644 --- a/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp +++ b/VortexEngine/src/Patterns/Multi/BackStrobePattern.cpp @@ -1,5 +1,7 @@ #include "BackStrobePattern.h" +#include "../../VortexEngine.h" + BackStrobePattern::BackStrobePattern(VortexEngine &engine, const PatternArgs &args) : CompoundPattern(engine, args), m_stepSpeed(0),