Skip to content

Commit

Permalink
Shane/orbit/added 2 maps to defaults (#214)
Browse files Browse the repository at this point in the history
* Finished defaults
* Rerecorded tests

---------

Co-authored-by: Shane Aronson <[email protected]>
  • Loading branch information
Unreal-Dan and LivingSynthesis authored Jan 18, 2024
1 parent 1059d4d commit 5d80510
Show file tree
Hide file tree
Showing 95 changed files with 140,460 additions and 140,338 deletions.
176 changes: 142 additions & 34 deletions VortexEngine/src/Modes/DefaultModes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
// the gloveset upon factory reset
const default_mode_entry default_modes[MAX_MODES] = {
{
PATTERN_VORTEX, 5, {
PATTERN_VORTEX, MAP_LED_ALL, 5, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
0xABAA00,
0x5500AB
},
PATTERN_VORTEX, MAP_LED_NONE, 5, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
Expand All @@ -16,47 +23,91 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(30, 255, 170),
HSV(0, 0, 0)
PATTERN_GAPCYCLE, MAP_LED_ALL, 4, {
0x00553A,
0x00CFFF,
0x55001D,
0x551200
},
PATTERN_GAPCYCLE, MAP_LED_NONE, 4, {
HSV(114, 255, 43),
HSV(159, 255, 128),
HSV(240, 255, 43),
HSV(9, 255, 43)
}
},

{
PATTERN_GHOSTCRUSH, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(50, 255, 170),
HSV(0, 0, 0)
PATTERN_TRACER, MAP_RINGS_EVEN, 3, {
0x62007F,
0x62007F,
0x33FE00
},
PATTERN_BLENDSTROBE, MAP_RINGS_ODD, 8, {
0xFF0019,
0x553600,
0xABFF00,
0x005502,
0x00FFBA,
0x003155,
0x1E00FF,
0x460055
}
},

{
PATTERN_GHOSTCRUSH, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(80, 255, 170),
HSV(0, 0, 0)
PATTERN_BLENDSTROBEGAP, MAP_LINE_1, 8, {
0xFFAE00,
0x3D5500,
0x1BFF00,
0x00552A,
0x00E7FF,
0x001955,
0x4E00FF,
0x4e0055
},
PATTERN_GHOSTCRUSH, MAP_LINE_2, 8, {
0xFFAE00,
0x3D5500,
0x1BFF00,
0x00552A,
0x00E7FF,
0x001955,
0x4E00FF,
0x4e0055
}
},

{
PATTERN_GHOSTCRUSH, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(110, 255, 170),
HSV(0, 0, 0)
PATTERN_BLENDSTROBE, MAP_RINGS_EVEN, 6, {
0x554A00,
0x554A00,
0x00AA90,
0x00AA90,
0xD200FF,
0xD200FF
},
PATTERN_DOUBLEDOPS, MAP_RINGS_ODD, 8, {
0xFF0033,
0xFF0033,
0xDB2F00,
0xB76B00,
0x938D00,
0x4A6F00,
0x164B00,
0x002702
}
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_CHASER, MAP_LED_ALL, 5, {
0x9FFF00,
0x00FF66,
0x009FFF,
0x5A00FF,
0xFF009F
},
PATTERN_CHASER, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -66,7 +117,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_METEOR, MAP_LED_ALL, 5, {
0x00AA90,
0x00B1FF,
0x300055,
0xFF002D,
0x541B00
},
PATTERN_METEOR, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -76,7 +134,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_DRIP, MAP_LED_ALL, 5, {
0x0000FF,
0x400055,
0x54000B,
0x525400,
0x26AA00
},
PATTERN_DRIP, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -86,7 +151,11 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_HYPERSTROBE, MAP_LED_ALL, 2, {
0xFFF600,
0x000880
},
PATTERN_HYPERSTROBE, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -96,7 +165,15 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_SPARKLETRACE, MAP_LED_ALL, 6, {
0x003755,
0x003755,
0xAA0072,
0xAA0072,
0xA5FF00,
0xA5FF00
},
PATTERN_SPARKLETRACE, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -106,7 +183,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_STROBE, 8, {
PATTERN_DASHDOPS, MAP_LED_ALL, 5, {
0xE2E7FF,
0x010015,
0x13090E,
0x010015,
0xE2E7FF
},
PATTERN_DASHDOPS, MAP_LED_NONE, 8, {
0xD4002B,
RGB_OFF,
0x0056AA,
Expand All @@ -119,7 +203,17 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_ULTRADOPS, 8, {
PATTERN_ULTRADOPS, MAP_LED_ALL, 8, {
0x1C0000,
0x4B2600,
0xABAA00,
0x001C00,
0x00130A,
0x00001C,
0x26004B,
0x13000A
},
PATTERN_ULTRADOPS, MAP_LED_NONE, 8, {
0x1C0000,
0x4B2600,
0xABAA00,
Expand All @@ -132,7 +226,16 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 7, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 7, {
0x26004B,
RGB_OFF,
RGB_GREEN,
RGB_WHITE,
RGB_GREEN,
RGB_OFF,
0x26004B,
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 7, {
0x26004B,
RGB_OFF,
RGB_GREEN,
Expand All @@ -144,7 +247,12 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_COMPLEMENTARY_BLEND, 3, {
PATTERN_COMPLEMENTARY_BLEND, MAP_LED_ALL, 3, {
RGB_RED,
RGB_GREEN,
RGB_BLUE
},
PATTERN_COMPLEMENTARY_BLEND, MAP_LED_NONE, 3, {
RGB_RED,
RGB_GREEN,
RGB_BLUE
Expand Down
6 changes: 6 additions & 0 deletions VortexEngine/src/Modes/DefaultModes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@

#include "../Patterns/Patterns.h"
#include "../VortexConfig.h"
#include "../Leds/LedTypes.h"

// structure of the entries in the default modes array
struct default_mode_entry
{
PatternID patternID;
LedMap map;
uint8_t numColors;
uint32_t cols[MAX_COLOR_SLOTS];
PatternID patternID2;
LedMap map2;
uint8_t numColors2;
uint32_t cols2[MAX_COLOR_SLOTS];
};

// exposed global array of default modes
Expand Down
12 changes: 10 additions & 2 deletions VortexEngine/src/Modes/Modes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,16 @@ bool Modes::setDefaults()
// add each default mode with each of the given colors
for (uint8_t i = 0; i < num_default_modes; ++i) {
const default_mode_entry &def = default_modes[i];
Colorset set(def.numColors, def.cols);
addMode(def.patternID, nullptr, &set);
Colorset set1(def.numColors, def.cols);
if (isMultiLedPatternID(def.patternID)) {
addMode(def.patternID, nullptr, &set1);
} else {
Mode tempMode;
tempMode.setPatternMap(def.map, def.patternID, nullptr, &set1);
Colorset set2(def.numColors2, def.cols2);
tempMode.setPatternMap(def.map2, def.patternID2, nullptr, &set2);
addMode(&tempMode);
}
}
#endif
return true;
Expand Down
Loading

0 comments on commit 5d80510

Please sign in to comment.