Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
162 changes: 60 additions & 102 deletions VortexEngine/src/Modes/DefaultModes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,109 +2,67 @@

#include "../Colors/ColorTypes.h"

// all the different colorsets used in defaults defined separately from the default list
// so we can save space instead of using fixed sized arrays in the DefaultModeEntry for colors
const uint32_t rgbCols[] = { RGB_RED, RGB_GREEN, RGB_BLUE, };
const uint32_t pat2TipCols = 0x97709F;
const uint32_t pat2TopCols = 0x4D00B2;
const uint32_t pat4TipCols[] = { 0xC4003B, 0x700000, 0x000000, 0x0017E9, 0x22004E, 0x000000, };
const uint32_t pat4TopCols[] = { 0xC4003B, 0x4D00B2, 0x0017E9 };
const uint32_t pat5TipCols[] = { 0xFFC600, 0x235500, 0x00FF66, 0x004355, 0x0600FF, 0x480055, 0xFF0057 };
const uint32_t pat5TopCols[] = { 0xFFC600, 0x235500, 0x00FF66, 0x004355, 0x0600FF, 0x480055, 0xFF0057 };
const uint32_t pat6Cols[] = { 0x9FFF00, 0x00FF66, 0x009FFF, 0x5A00FF, 0xFF009F };
const uint32_t pat7Cols[] = { 0x00AA90, 0x00B1FF, 0x300055, 0xFF002D, 0x541B00 };
const uint32_t pat8TipCols[] = { 0x0000FF, 0x400055, 0x54000B, 0x525400, 0x26AA00 };
const uint32_t pat8TopCols[] = { 0xFFC600, 0x235500, 0x00FF66, 0x004355, 0x0600FF, 0x480055, 0xFF0057 };
const uint32_t pat9Cols[] = { 0xFFF600, 0x000880 };

// Here is the array of 'default modes' that are assigned to
// the gloveset upon factory reset
const DefaultModeEntry defaultModes[MAX_MODES] = {
{
{
{
PATTERN_STROBEGAP, 3, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
}
},
{
PATTERN_STROBEGAP, 3, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
}
}
}
},
{
{
{
PATTERN_COMPLEMENTARY_BLEND, 3, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
}
},
{
PATTERN_BLEND, 3, {
RGB_RED,
RGB_GREEN,
RGB_BLUE,
}
}
}
},
{
{
{
PATTERN_STROBE, 1, {
0x97709F,
}
},
{
PATTERN_HYPERGAP, 1, {
0x4D00B2,
}
}
}
},
{
{
{
PATTERN_STROBE, 6, {
0xC4003B,
0x700000,
0x000000,
0x0017E9,
0x22004E,
0x000000,
}
},
{
PATTERN_STROBIE, 3, {
0xC4003B,
0x4D00B2,
0x0017E9,
}
}
}
},

{
{
{
PATTERN_DOUBLEDOPS, 8, {
0xFFC600,
0x235500,
0x00FF66,
0x004355,
0x0600FF,
0x480055,
0xFF0057,
0x552C00,
}
},
{
PATTERN_DOUBLEDOPS, 8, {
0xFFC600,
0x235500,
0x00FF66,
0x004355,
0x0600FF,
0x480055,
0xFF0057,
0x552C00,
}
}
}
},


// mode 1
{{
{ PATTERN_STROBEGAP, 3, rgbCols }, // tip
{ PATTERN_STROBEGAP, 3, rgbCols } // top
}},
// mode 2
{{
{ PATTERN_COMPLEMENTARY_BLEND, 3, rgbCols },
{ PATTERN_BLEND, 3, rgbCols }
}},
// mode 3
{{
{ PATTERN_STROBE, 1, &pat2TipCols },
{ PATTERN_HYPERGAP, 1, &pat2TopCols }
}},
// mode 4
{{
{ PATTERN_STROBE, 6, pat4TipCols },
{ PATTERN_STROBIE, 3, pat4TopCols }
}},
// mode 5
{{
{ PATTERN_DOUBLEDOPS, 7, pat5TipCols },
{ PATTERN_DOUBLEDOPS, 7, pat5TopCols }
}},
// mode 6
{{
{ PATTERN_GHOSTCRUSH, 5, pat6Cols },
{ PATTERN_GHOSTCRUSH, 5, pat6Cols }
}},
// mode 7
{{
{ PATTERN_ULTRADOPS, 5, pat7Cols },
{ PATTERN_ULTRADOPS, 5, pat7Cols }
}},
// mode 8
{{
{ PATTERN_PICOGAP, 5, pat8TipCols },
{ PATTERN_PICOGAP, 7, pat8TopCols }
}},
// mode 9
{{
{ PATTERN_DOPS, 2, pat9Cols },
{ PATTERN_HYPERSTROBE, 2, pat9Cols }
}},
};
2 changes: 1 addition & 1 deletion VortexEngine/src/Modes/DefaultModes.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct DefaultLedEntry
{
PatternID patternID;
uint8_t numColors;
uint32_t cols[MAX_COLOR_SLOTS];
const uint32_t *cols;
};

struct DefaultModeEntry
Expand Down
2 changes: 1 addition & 1 deletion VortexEngine/src/VortexConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
// This should not be set to 0, it should be a specific maximum for
// each separate device
//
#define MAX_MODES 5
#define MAX_MODES 9

// Default Tickrate in Ticks Per Second (TPS)
//
Expand Down
Binary file modified VortexEngine/tests/tests_general.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion avrsize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ ! -z "$2" ] && [ "$(printf '%d' $2)" -lt "$(printf '%d' $PROGRAM_STORAGE_US
echo "---------"
echo "Failure! Program space: 0x$(printf '%x' $PROGRAM_STORAGE_USED) larger than allowed: 0x$(printf '%x' $2)"
echo "Reduce program size within 0x$(printf '%x' $2), or reduce flash storage space then adjust BOOTEND in the Makefile"
#exit 1
exit 1
fi

# Display the results
Expand Down
Loading