Skip to content

Commit

Permalink
Added 2 maps to defaults but doesnt work on multis
Browse files Browse the repository at this point in the history
  • Loading branch information
LivingSynthesis committed Jan 12, 2024
1 parent fd082a6 commit cb49059
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 31 deletions.
167 changes: 138 additions & 29 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,37 +23,70 @@ 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, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(110, 255, 170),
HSV(0, 0, 0)
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -56,7 +96,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(140, 255, 170),
HSV(0, 0, 0)
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -66,7 +113,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(170, 255, 170),
HSV(0, 0, 0)
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -76,7 +130,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(200, 255, 170),
HSV(0, 0, 0)
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -86,7 +147,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(230, 255, 170),
HSV(0, 0, 0)
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -96,7 +164,14 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_GHOSTCRUSH, 5, {
PATTERN_GHOSTCRUSH, MAP_LED_ALL, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
HSV(0, 255, 170),
HSV(0, 0, 0)
},
PATTERN_GHOSTCRUSH, MAP_LED_NONE, 5, {
HSV(0, 0, 255),
HSV(0, 0, 255),
HSV(0, 0, 0),
Expand All @@ -106,7 +181,17 @@ const default_mode_entry default_modes[MAX_MODES] = {
},

{
PATTERN_STROBE, 8, {
PATTERN_STROBE, MAP_LED_ALL, 8, {
0xD4002B,
RGB_OFF,
0x0056AA,
RGB_OFF,
0x8E711C,
RGB_OFF,
0x0056AA,
RGB_OFF
},
PATTERN_STROBE, MAP_LED_NONE, 8, {
0xD4002B,
RGB_OFF,
0x0056AA,
Expand All @@ -119,7 +204,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 +227,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 +248,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
8 changes: 6 additions & 2 deletions VortexEngine/src/Modes/Modes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,12 @@ 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);
Mode tempMode;
Colorset set1(def.numColors, def.cols);
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

0 comments on commit cb49059

Please sign in to comment.