From 28b59247c732a8f7309d252cb466ed89a0921a71 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Tue, 28 Nov 2023 15:23:40 -0800 Subject: [PATCH] Dynamic version of Vortex Pattern for all devices --- VortexEngine/src/Modes/DefaultModes.cpp | 2 +- VortexEngine/src/Patterns/Multi/VortexPattern.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VortexEngine/src/Modes/DefaultModes.cpp b/VortexEngine/src/Modes/DefaultModes.cpp index a0f4be8b7c..90ead4dfd2 100644 --- a/VortexEngine/src/Modes/DefaultModes.cpp +++ b/VortexEngine/src/Modes/DefaultModes.cpp @@ -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, diff --git a/VortexEngine/src/Patterns/Multi/VortexPattern.cpp b/VortexEngine/src/Patterns/Multi/VortexPattern.cpp index 75e61bc476..f35d7f7068 100644 --- a/VortexEngine/src/Patterns/Multi/VortexPattern.cpp +++ b/VortexEngine/src/Patterns/Multi/VortexPattern.cpp @@ -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(); + } }