Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed multi led patterns in pattern select #139

Merged
merged 52 commits into from
Dec 8, 2023
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
bc96d49
fixed multi led patterns in pattern select
Unreal-Dan Nov 17, 2023
d334449
restored these
Unreal-Dan Nov 17, 2023
f626b9e
minor fix
Unreal-Dan Nov 17, 2023
7389367
Changed saving to work off preview mode
LivingSynthesis Nov 17, 2023
a250fdf
Chaser pattern for orbit
LivingSynthesis Nov 17, 2023
a3e0281
Finished Dynamic Chaser Pattern
LivingSynthesis Nov 18, 2023
f937792
Ensures at least 1 Chaser for Chaser pattern
LivingSynthesis Nov 18, 2023
cfc76c2
Fixes to several patterns
LivingSynthesis Nov 18, 2023
c7c9f1d
Substituted Materia for Vortex, needs renaming
LivingSynthesis Nov 18, 2023
b5d50ea
Renamed Materia to Vortex
LivingSynthesis Nov 18, 2023
9c43498
Upated Materia to Vortex
LivingSynthesis Nov 18, 2023
b1d8b18
Small fixes to comments an types
LivingSynthesis Nov 19, 2023
344e449
fixed random function call ordering
Unreal-Dan Nov 22, 2023
e945187
added a comment
Unreal-Dan Nov 22, 2023
6641d42
minor fixes
Unreal-Dan Nov 22, 2023
2cbcb90
Explicit random call order
LivingSynthesis Nov 22, 2023
f8ceb45
Merge branch 'shane/core/random_call_ordering' into daniel/orbit/mult…
LivingSynthesis Nov 22, 2023
e66bfc1
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Nov 24, 2023
fb3c52d
fixed multi-led stuff and renamed materia to vortex
Unreal-Dan Nov 24, 2023
9ae30d7
fixed default mode on jest
Unreal-Dan Nov 24, 2023
e11d81d
how to solve vortex on other devices
Unreal-Dan Nov 24, 2023
28b5924
Dynamic version of Vortex Pattern for all devices
LivingSynthesis Nov 28, 2023
cc2ddc9
Merge branch 'daniel/core/multi_led_audit1' into daniel/orbit/multi_l…
LivingSynthesis Nov 29, 2023
bebaa9e
Mutliled pattern args for orbit
LivingSynthesis Nov 29, 2023
b1736fe
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
LivingSynthesis Nov 30, 2023
cbf7026
missed this before woops
LivingSynthesis Nov 30, 2023
82d1558
Orbit variants for some patterns
LivingSynthesis Nov 30, 2023
4b902a0
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Nov 30, 2023
34c0c50
recorded tests
Unreal-Dan Nov 30, 2023
b2035ed
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Nov 30, 2023
9aaecad
fixed sequenced patterns
Unreal-Dan Nov 30, 2023
72a02c1
sequencer fix
Unreal-Dan Nov 30, 2023
01eb151
Fixed deleted default
LivingSynthesis Nov 30, 2023
dce3797
Silly comma, tricks are for kids
LivingSynthesis Nov 30, 2023
6d930fc
adjusted led typing for ring even odd
Unreal-Dan Dec 1, 2023
568f805
Merge branch 'daniel/orbit/multi_led_pattern_select_fix' of https://g…
Unreal-Dan Dec 1, 2023
a33b5da
adjusted blend code
Unreal-Dan Dec 1, 2023
d8ed3b3
removed unused var
Unreal-Dan Dec 1, 2023
69877e1
began pattern expansion for multiled randomizer
LivingSynthesis Dec 1, 2023
751207c
Merge branch 'daniel/orbit/multi_led_pattern_select_fix' of https://g…
LivingSynthesis Dec 1, 2023
acedd21
Added colors to the multi randomize thingy
LivingSynthesis Dec 2, 2023
a4a5746
Finished MutliLed randomize and fixed a bug
LivingSynthesis Dec 5, 2023
9bfc4a6
Fixes for HueShift
LivingSynthesis Dec 5, 2023
3677f0f
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Dec 6, 2023
90975c4
Added support for 2nd button exit, orbit only
LivingSynthesis Dec 7, 2023
a843462
Merge branch 'daniel/orbit/multi_led_pattern_select_fix' of https://g…
LivingSynthesis Dec 7, 2023
6d50cbc
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Dec 8, 2023
f1eb7ad
Cleaned up HueShiftPattern
LivingSynthesis Dec 8, 2023
00b57fe
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Dec 8, 2023
9041103
Merge branch 'orbit' into daniel/orbit/multi_led_pattern_select_fix
Unreal-Dan Dec 8, 2023
faa9a7e
Reverted randomizer
Unreal-Dan Dec 8, 2023
f3b91f2
recorded tests
Unreal-Dan Dec 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes to several patterns
LivingSynthesis committed Nov 18, 2023
commit cfc76c2c377c18926d3cf0d28e85f1986c7d0df4
2 changes: 1 addition & 1 deletion VortexEngine/src/Patterns/Multi/CrossDopsPattern.cpp
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ void CrossDopsPattern::init()
{
BlinkStepPattern::init();
// Alternating evens and odds mapping of leds to turn on/off
m_ledMap = MAP_PAIR_EVENS;
m_ledMap = MAP_LINE_1;
// start colorset at index 0 so cur() works
m_colorset.setCurIndex(0);
}
6 changes: 3 additions & 3 deletions VortexEngine/src/Patterns/Multi/FillPattern.cpp
Original file line number Diff line number Diff line change
@@ -28,13 +28,13 @@ void FillPattern::init()

void FillPattern::blinkOn()
{
Leds::setQuadrants(QUADRANT_FIRST, (Quadrant)m_progress, m_colorset.peekNext());
Leds::setQuadrants((Quadrant)m_progress, QUADRANT_LAST, m_colorset.cur());
Leds::setRange(LED_FIRST, LedPos(m_progress * (LED_COUNT / 4)), m_colorset.peekNext());
Leds::setRange(LedPos(LED_COUNT / 4), LED_LAST, m_colorset.cur());
}

void FillPattern::poststep()
{
m_progress = (m_progress + 1) % PAIR_COUNT;
m_progress = (m_progress + 1) % 4;
if (m_progress == 0) {
m_colorset.getNext();
}
10 changes: 6 additions & 4 deletions VortexEngine/src/Patterns/Multi/MeteorPattern.cpp
Original file line number Diff line number Diff line change
@@ -34,8 +34,10 @@ void MeteorPattern::blinkOff()

void MeteorPattern::poststep()
{
// when a new meteor is created it is incerted into the stash so the blinking pattern is not interrupted
LedPos target = (LedPos)m_randCtx.next8(LED_FIRST, LED_LAST);
RGBColor col = m_colorset.getNext();
m_stash.setIndex(target, col);
for (int meteorCount = 0; meteorCount < (LED_COUNT / 2); ++meteorCount) {
// when a new meteor is created it is incerted into the stash so the blinking pattern is not interrupted
LedPos target = (LedPos)m_randCtx.next8(LED_FIRST, LED_LAST);
RGBColor col = m_colorset.getNext();
m_stash.setIndex(target, col);
}
}
4 changes: 2 additions & 2 deletions VortexEngine/src/Patterns/Multi/Sequencer/ChaserPattern.cpp
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ ChaserPattern::ChaserPattern(const PatternArgs &args) :
setArgs(args);

// Makes sure there is at least 1 chaser
uint8_t numChasers = LED_COUNT / CHASER_RATIO;
uint32_t numChasers = LED_COUNT / CHASER_RATIO;
if (!numChasers) {
numChasers = 1;
}
@@ -33,7 +33,7 @@ ChaserPattern::ChaserPattern(const PatternArgs &args) :
// 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 = 0;
LedMap overrideLeds = MAP_LED_NONE;
// This creates an led map with 1 chaser per CHASER_RATIO (default 7) leds in LED_COUNT
for (int chaserCount = 0; chaserCount < numChasers; ++chaserCount) {
overrideLeds |= MAP_LED((i + (chaserCount * CHASER_RATIO)) % LED_COUNT);
21 changes: 2 additions & 19 deletions VortexEngine/src/Patterns/Multi/ZigzagPattern.cpp
Original file line number Diff line number Diff line change
@@ -4,25 +4,8 @@
#include "../../Leds/Leds.h"
#include "../../Log/Log.h"

// Mapping of LED positions to steps.
// The lights runs across evens, then back across odds.
// Index this array with m_step in order to get correct LedPos
const LedPos ZigzagPattern::ledStepPositions[] = {
LED_1,
LED_3,
LED_5,
LED_7,
LED_9,

LED_8,
LED_6,
LED_4,
LED_2,
LED_0,
};

// There just happens to be LED_COUNT steps in the pattern
#define NUM_ZIGZAG_STEPS (sizeof(ledStepPositions) / sizeof(ledStepPositions[0]))
#define NUM_ZIGZAG_STEPS LED_COUNT
#define HALF_ZIGZAG_STEPS (NUM_ZIGZAG_STEPS / 2)

ZigzagPattern::ZigzagPattern(const PatternArgs &args) :
@@ -159,7 +142,7 @@ void ZigzagPattern::Snake::drawSnake()
col.adjustBrightness(m_fadeAmount * segment);
}
// lookup the target in the step positions array and turn it on with given color/brightness
Leds::setIndex(ledStepPositions[segment_position], col);
Leds::setIndex((LedPos)segment_position, col);
// if this segment is on the step where the color changes
if (segment_position == m_changeBoundary) {
// then decrement the color index for the rest of the snake so that the
4 changes: 0 additions & 4 deletions VortexEngine/src/Patterns/Multi/ZigzagPattern.h
Original file line number Diff line number Diff line change
@@ -39,10 +39,6 @@ class ZigzagPattern : public MultiLedPattern
uint8_t m_fadeAmount;
uint8_t m_changeBoundary;
};

// path for leds to take, index this with m_step up to LED_COUNT steps
static const LedPos ledStepPositions[];

// blink on duration
uint8_t m_onDuration;
// blink off duration