From cb49059f75412f0e7ee9e75fa92665679512e270 Mon Sep 17 00:00:00 2001 From: Shane Aronson Date: Thu, 11 Jan 2024 18:59:46 -0800 Subject: [PATCH] Added 2 maps to defaults but doesnt work on multis --- VortexEngine/src/Modes/DefaultModes.cpp | 167 ++++++++++++++++++++---- VortexEngine/src/Modes/DefaultModes.h | 6 + VortexEngine/src/Modes/Modes.cpp | 8 +- 3 files changed, 150 insertions(+), 31 deletions(-) diff --git a/VortexEngine/src/Modes/DefaultModes.cpp b/VortexEngine/src/Modes/DefaultModes.cpp index 89e54ea345..735f3d3610 100644 --- a/VortexEngine/src/Modes/DefaultModes.cpp +++ b/VortexEngine/src/Modes/DefaultModes.cpp @@ -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, @@ -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), @@ -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), @@ -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), @@ -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), @@ -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), @@ -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), @@ -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, @@ -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, @@ -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, @@ -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 diff --git a/VortexEngine/src/Modes/DefaultModes.h b/VortexEngine/src/Modes/DefaultModes.h index 888e4fb7bf..a854ed65b6 100644 --- a/VortexEngine/src/Modes/DefaultModes.h +++ b/VortexEngine/src/Modes/DefaultModes.h @@ -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 diff --git a/VortexEngine/src/Modes/Modes.cpp b/VortexEngine/src/Modes/Modes.cpp index 0d3c05ec17..1f43b7f08e 100644 --- a/VortexEngine/src/Modes/Modes.cpp +++ b/VortexEngine/src/Modes/Modes.cpp @@ -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;