Skip to content

Commit

Permalink
Dynamic version of Vortex Pattern for all devices
Browse files Browse the repository at this point in the history
  • Loading branch information
LivingSynthesis committed Nov 28, 2023
1 parent e11d81d commit 28b5924
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VortexEngine/src/Modes/DefaultModes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// the gloveset upon factory reset
const default_mode_entry default_modes[MAX_MODES] = {
{
PATTERN_DOPS, 5, {
PATTERN_VORTEX, 5, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
Expand Down
14 changes: 7 additions & 7 deletions VortexEngine/src/Patterns/Multi/VortexPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ void VortexPattern::init()

void VortexPattern::blinkOn()
{
// TODO:
//Leds::setRing((Ring)(RING_LAST - m_progress), m_colorset.peekNext());
// Sets an LED at opposite ends of the strip and progresses towards the center
Leds::setIndex((LedPos)m_progress, m_colorset.peekNext());
Leds::setIndex((LedPos)(LED_LAST - m_progress), m_colorset.peekNext());
}

void VortexPattern::poststep()
{
// TODO:
//m_progress = (m_progress + 1) % RING_COUNT;
//if (RING_COUNT - m_progress == RING_LAST) {
// m_colorset.getNext();
//}
m_progress = (m_progress + 1) % (LED_COUNT/2);
if (m_progress == 0) {
m_colorset.getNext();
}
}

0 comments on commit 28b5924

Please sign in to comment.