From 3600a7093a31aa08755498a2917e3ba488596db2 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 9 Dec 2023 18:20:03 -0800 Subject: [PATCH] chaser comments aren't right anymore --- .../Multi/Sequencer/ChaserPattern.cpp | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/VortexEngine/src/Patterns/Multi/Sequencer/ChaserPattern.cpp b/VortexEngine/src/Patterns/Multi/Sequencer/ChaserPattern.cpp index 2ccb29025b..2868c09e97 100644 --- a/VortexEngine/src/Patterns/Multi/Sequencer/ChaserPattern.cpp +++ b/VortexEngine/src/Patterns/Multi/Sequencer/ChaserPattern.cpp @@ -11,41 +11,15 @@ ChaserPattern::ChaserPattern(const PatternArgs &args) : SequencedPattern(args) { setArgs(args); - - // Makes sure there is at least 1 chaser uint32_t numChasers = LED_COUNT / CHASER_RATIO; if (!numChasers) { numChasers = 1; } - // set the pattern ID - //m_patternID = PATTERN_CHASER; - // There are LED_COUNT steps in the chaser, so iterate LED_COUNT times and generate - // a pattern map for each step. A colorset map can also be applied - // to override certain colors for specific steps, but that's not - // what is being done here for (uint8_t i = 0; i < (LED_COUNT / numChasers); ++i) { - // Each step all LEDs are dops except for one, so start with a - // Pattern Map that has dops on all LEDs. A Pattern Map will map - // a Pattern ID to each LED on the device, then we will override a - // different entry each step with the Pattern ID for Solid0. PatternMap patMap(PATTERN_DOPS); - // Override a single LED in the pattern map with the Solid0 pattern - // which will use the 0th color from the colorset as the solid color. - // An LedMap is a bitmap that indicates which leds are turned on or off - // at any given time. This will generate an Led Map based on the current - LedMap overrideLeds = MAP_LED_NONE; - // This creates an led map with 1 chaser per CHASER_RATIO (default 7) leds in LED_COUNT for (uint8_t chaserCount = 0; chaserCount < numChasers; ++chaserCount) { - // Then this API is used to override specific positions in the Pattern Map - // with a different pattern ID, we use the Led Map generated above to tell - // setPatternAt() which indices to override with Solid0 patMap.setPatternAt(PATTERN_SOLID, MAP_LED((i + (chaserCount * CHASER_RATIO)) % LED_COUNT)); } - // Then finally we add this pattern mapping to the sequence in a new step - // that will last 300ms, this means all LED_COUNT steps will be 300ms each. - // The last parameter of addStep() is omitted, that parameter could be used - // to override the colorset for specific Leds on any given step. Since it - // is omitted that means this pattern will use whichever colorset is chosen m_sequence.addStep(150, patMap); } }