From b5d50ea824faf27b825c66cdf29a49198a7511d5 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Fri, 17 Nov 2023 20:21:12 -0800 Subject: [PATCH] Renamed Materia to Vortex --- VortexEngine/VortexEngine.vcxproj | 4 ++-- VortexEngine/VortexEngine.vcxproj.filters | 4 ++-- .../{MateriaPattern.cpp => VortexPattern.cpp} | 14 +++++++------- .../Multi/{MateriaPattern.h => VortexPattern.h} | 10 +++++----- VortexEngine/src/Patterns/PatternBuilder.cpp | 6 +++--- VortexEngine/src/Patterns/Patterns.h | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) rename VortexEngine/src/Patterns/Multi/{MateriaPattern.cpp => VortexPattern.cpp} (65%) rename VortexEngine/src/Patterns/Multi/{MateriaPattern.h => VortexPattern.h} (64%) diff --git a/VortexEngine/VortexEngine.vcxproj b/VortexEngine/VortexEngine.vcxproj index 4190dac366..5a5b577cca 100644 --- a/VortexEngine/VortexEngine.vcxproj +++ b/VortexEngine/VortexEngine.vcxproj @@ -179,7 +179,7 @@ - + @@ -251,7 +251,7 @@ - + diff --git a/VortexEngine/VortexEngine.vcxproj.filters b/VortexEngine/VortexEngine.vcxproj.filters index 913b0d84e7..9bbf08e6d4 100644 --- a/VortexEngine/VortexEngine.vcxproj.filters +++ b/VortexEngine/VortexEngine.vcxproj.filters @@ -240,7 +240,7 @@ Source Files\Patterns\Multi - + Source Files\Patterns\Multi @@ -452,7 +452,7 @@ Header Files\Patterns\Multi - + Header Files\Patterns\Multi diff --git a/VortexEngine/src/Patterns/Multi/MateriaPattern.cpp b/VortexEngine/src/Patterns/Multi/VortexPattern.cpp similarity index 65% rename from VortexEngine/src/Patterns/Multi/MateriaPattern.cpp rename to VortexEngine/src/Patterns/Multi/VortexPattern.cpp index 79b0b9df0c..29567f9d13 100644 --- a/VortexEngine/src/Patterns/Multi/MateriaPattern.cpp +++ b/VortexEngine/src/Patterns/Multi/VortexPattern.cpp @@ -1,11 +1,11 @@ -#include "MateriaPattern.h" +#include "VortexPattern.h" #include "../../Serial/ByteStream.h" #include "../../Time/TimeControl.h" #include "../../Leds/Leds.h" #include "../../Log/Log.h" -MateriaPattern::MateriaPattern(const PatternArgs& args) : +VortexPattern::VortexPattern(const PatternArgs& args) : BlinkStepPattern(args), m_progress(0) { @@ -13,12 +13,12 @@ MateriaPattern::MateriaPattern(const PatternArgs& args) : setArgs(args); } -MateriaPattern::~MateriaPattern() +VortexPattern::~VortexPattern() { } // init the pattern to initial state -void MateriaPattern::init() +void VortexPattern::init() { BlinkStepPattern::init(); // reset progress @@ -27,12 +27,12 @@ void MateriaPattern::init() m_colorset.setCurIndex(0); } -void MateriaPattern::blinkOn() +void VortexPattern::blinkOn() { - Leds::setRing((Ring)(RING_COUNT - m_progress), m_colorset.peekNext()); + Leds::setRing((Ring)(RING_LAST - m_progress), m_colorset.peekNext()); } -void MateriaPattern::poststep() +void VortexPattern::poststep() { m_progress = (m_progress + 1) % RING_COUNT; if (RING_COUNT - m_progress == RING_LAST) { diff --git a/VortexEngine/src/Patterns/Multi/MateriaPattern.h b/VortexEngine/src/Patterns/Multi/VortexPattern.h similarity index 64% rename from VortexEngine/src/Patterns/Multi/MateriaPattern.h rename to VortexEngine/src/Patterns/Multi/VortexPattern.h index d69fd7d36d..38b261c8ab 100644 --- a/VortexEngine/src/Patterns/Multi/MateriaPattern.h +++ b/VortexEngine/src/Patterns/Multi/VortexPattern.h @@ -1,15 +1,15 @@ -#ifndef MATERIA_PATTERN_H -#define MATERIA_PATTERN_H +#ifndef VORTEX_PATTERN_H +#define VORTEX_PATTERN_H #include "BlinkStepPattern.h" #include "../../Time/Timings.h" -class MateriaPattern : public BlinkStepPattern +class VortexPattern : public BlinkStepPattern { public: - MateriaPattern(const PatternArgs& args); - virtual ~MateriaPattern(); + VortexPattern(const PatternArgs& args); + virtual ~VortexPattern(); // init the pattern to initial state virtual void init() override; diff --git a/VortexEngine/src/Patterns/PatternBuilder.cpp b/VortexEngine/src/Patterns/PatternBuilder.cpp index 2781d1cbe1..8579af9880 100644 --- a/VortexEngine/src/Patterns/PatternBuilder.cpp +++ b/VortexEngine/src/Patterns/PatternBuilder.cpp @@ -27,7 +27,7 @@ #include "Multi/PulsishPattern.h" #include "Multi/BouncePattern.h" #include "Multi/BackStrobePattern.h" -#include "Multi/MateriaPattern.h" +#include "Multi/VortexPattern.h" #include "Single/SingleLedPattern.h" #include "Single/BasicPattern.h" @@ -185,7 +185,7 @@ PatternArgs PatternBuilder::getDefaultArgs(PatternID id) case PATTERN_BOUNCE: return PatternArgs(DOPS_ON_DURATION, DOPS_OFF_DURATION, 200, 10); case PATTERN_SPLITSTROBIE: return PatternArgs(DOPS_ON_DURATION, DOPS_OFF_DURATION, 0, 16, 3, 10, PATTERN_DOPS, PATTERN_STROBIE); case PATTERN_BACKSTROBE: return PatternArgs(DOPS_ON_DURATION, DOPS_OFF_DURATION, 0, HYPERSTROBE_ON_DURATION, HYPERSTROBE_OFF_DURATION, 10, PATTERN_DOPS, PATTERN_HYPERSTROBE); - case PATTERN_MATERIA: return PatternArgs(STROBE_ON_DURATION, STROBE_OFF_DURATION, 130); + case PATTERN_VORTEX: return PatternArgs(STROBE_ON_DURATION, STROBE_OFF_DURATION, 130); case PATTERN_NONE: break; default: break; #else @@ -273,7 +273,7 @@ Pattern *PatternBuilder::generate(PatternID id, const PatternArgs *userArgs) case PATTERN_BOUNCE: return new BouncePattern(args); case PATTERN_SPLITSTROBIE: case PATTERN_BACKSTROBE: return new BackStrobePattern(args); - case PATTERN_MATERIA: return new MateriaPattern(args); + case PATTERN_VORTEX: return new VortexPattern(args); case PATTERN_NONE: return nullptr; #else // in vortex slim just use basic pattern for all multi led diff --git a/VortexEngine/src/Patterns/Patterns.h b/VortexEngine/src/Patterns/Patterns.h index e9af6d8c8a..65f3b90bb7 100644 --- a/VortexEngine/src/Patterns/Patterns.h +++ b/VortexEngine/src/Patterns/Patterns.h @@ -89,7 +89,7 @@ enum PatternID : int8_t PATTERN_BOUNCE, PATTERN_SPLITSTROBIE, PATTERN_BACKSTROBE, - PATTERN_MATERIA, + PATTERN_VORTEX, // ADD NEW MULTI LED PATTERNS HERE