Skip to content

Commit

Permalink
Renamed Materia to Vortex
Browse files Browse the repository at this point in the history
  • Loading branch information
LivingSynthesis committed Nov 18, 2023
1 parent c7c9f1d commit b5d50ea
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions VortexEngine/VortexEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<ClCompile Include="src\Patterns\Multi\HueShiftPattern.cpp" />
<ClCompile Include="src\Patterns\Multi\CompoundPattern.cpp" />
<ClCompile Include="src\Patterns\Multi\LighthousePattern.cpp" />
<ClCompile Include="src\Patterns\Multi\MateriaPattern.cpp" />
<ClCompile Include="src\Patterns\Multi\VortexPattern.cpp" />
<ClCompile Include="src\Patterns\Multi\MeteorPattern.cpp" />
<ClCompile Include="src\Patterns\Multi\MultiLedPattern.cpp" />
<ClCompile Include="src\Patterns\Multi\PulsishPattern.cpp" />
Expand Down Expand Up @@ -251,7 +251,7 @@
<ClInclude Include="src\Patterns\Multi\HueShiftPattern.h" />
<ClInclude Include="src\Patterns\Multi\CompoundPattern.h" />
<ClInclude Include="src\Patterns\Multi\LighthousePattern.h" />
<ClInclude Include="src\Patterns\Multi\MateriaPattern.h" />
<ClInclude Include="src\Patterns\Multi\VortexPattern.h" />
<ClInclude Include="src\Patterns\Multi\MeteorPattern.h" />
<ClInclude Include="src\Patterns\Multi\MultiLedPattern.h" />
<ClInclude Include="src\Patterns\Multi\PulsishPattern.h" />
Expand Down
4 changes: 2 additions & 2 deletions VortexEngine/VortexEngine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
<ClCompile Include="src\Patterns\Multi\LighthousePattern.cpp">
<Filter>Source Files\Patterns\Multi</Filter>
</ClCompile>
<ClCompile Include="src\Patterns\Multi\MateriaPattern.cpp">
<ClCompile Include="src\Patterns\Multi\VortexPattern.cpp">
<Filter>Source Files\Patterns\Multi</Filter>
</ClCompile>
<ClCompile Include="src\Patterns\Multi\MeteorPattern.cpp">
Expand Down Expand Up @@ -452,7 +452,7 @@
<ClInclude Include="src\Patterns\Multi\LighthousePattern.h">
<Filter>Header Files\Patterns\Multi</Filter>
</ClInclude>
<ClInclude Include="src\Patterns\Multi\MateriaPattern.h">
<ClInclude Include="src\Patterns\Multi\VortexPattern.h">
<Filter>Header Files\Patterns\Multi</Filter>
</ClInclude>
<ClInclude Include="src\Patterns\Multi\MeteorPattern.h">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#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)
{
m_patternID = PATTERN_VORTEXWIPE;
setArgs(args);
}

MateriaPattern::~MateriaPattern()
VortexPattern::~VortexPattern()
{
}

// init the pattern to initial state
void MateriaPattern::init()
void VortexPattern::init()
{
BlinkStepPattern::init();
// reset progress
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 3 additions & 3 deletions VortexEngine/src/Patterns/PatternBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VortexEngine/src/Patterns/Patterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ enum PatternID : int8_t
PATTERN_BOUNCE,
PATTERN_SPLITSTROBIE,
PATTERN_BACKSTROBE,
PATTERN_MATERIA,
PATTERN_VORTEX,

// ADD NEW MULTI LED PATTERNS HERE

Expand Down

0 comments on commit b5d50ea

Please sign in to comment.