diff --git a/VortexEngine/src/Menus/MenuList/PatternSelect.cpp b/VortexEngine/src/Menus/MenuList/PatternSelect.cpp index b30f2b80d8..6f52fb9c78 100644 --- a/VortexEngine/src/Menus/MenuList/PatternSelect.cpp +++ b/VortexEngine/src/Menus/MenuList/PatternSelect.cpp @@ -15,8 +15,8 @@ PatternSelect::PatternSelect(const RGBColor &col, bool advanced) : Menu(col, advanced), + m_newPatternID(PATTERN_FIRST), m_srcLed(LED_FIRST), - m_argIndex(0), m_started(false) { } @@ -43,7 +43,7 @@ Menu::MenuAction PatternSelect::run() // run the current mode m_previewMode.play(); // show dimmer selections in advanced mode - Menus::showSelection(m_advanced ? RGB_GREEN0 : RGB_WHITE5); + Menus::showSelection(RGB_WHITE5); return MENU_CONTINUE; } @@ -54,46 +54,6 @@ void PatternSelect::onLedSelected() void PatternSelect::onShortClick() { - if (m_advanced) { - // double click = skip 10 - bool doSkip = g_pButton->onConsecutivePresses(2); - MAP_FOREACH_LED(m_targetLeds) { - Pattern *pat = m_previewMode.getPattern(pos); - if (!pat || pat->getNumArgs() <= m_argIndex) { - continue; - } - uint8_t &arg = pat->argRef(m_argIndex); - if (doSkip) { - arg += 10 - (arg % 10); - } else { - arg++; - } - // on/off/gap/dash duration max 100 - uint8_t max = 100; - if (m_argIndex == 6) { - // blend number of numflips - max = 4; - } else if (m_argIndex > 3) { - // group size, solid index, blendspeed - max = 20; - } - if (arg > max) { - // red flash indicates reaching end - Leds::holdAll(RGB_RED); - arg %= (max + 1); - } - // do not let argument0 be reset to 0 - if (!m_argIndex && !arg) { - arg = 1; - } - } - m_previewMode.init(); - if (doSkip) { - // hold white for a moment to show they are skipping 25 - Leds::holdAll(RGB_YELLOW1); - } - return; - } nextPattern(); } @@ -144,14 +104,6 @@ void PatternSelect::nextPattern() void PatternSelect::onLongClick() { bool needsSave = false; - if (m_advanced) { - m_argIndex++; - if (m_argIndex < m_previewMode.getPattern(m_srcLed)->getNumArgs()) { - // if we haven't reached number of args yet then just return and kee pgoing - return; - } - Leds::holdAll(m_menuColor); - } Mode *cur = Modes::curMode(); needsSave = !cur->equals(&m_previewMode); if (needsSave) { diff --git a/VortexEngine/src/Menus/MenuList/PatternSelect.h b/VortexEngine/src/Menus/MenuList/PatternSelect.h index 2b1b0616af..5355b65e61 100644 --- a/VortexEngine/src/Menus/MenuList/PatternSelect.h +++ b/VortexEngine/src/Menus/MenuList/PatternSelect.h @@ -32,9 +32,6 @@ class PatternSelect : public Menu // helpful member LedPos m_srcLed; - // used for adv pat select - uint8_t m_argIndex; - // the pat select starts by showing the current pattern // then the first click begin cycling the list of pats bool m_started; diff --git a/VortexEngine/tests/tests_general.tar.gz b/VortexEngine/tests/tests_general.tar.gz index 07b0b97de0..38f6ab4d8f 100644 Binary files a/VortexEngine/tests/tests_general.tar.gz and b/VortexEngine/tests/tests_general.tar.gz differ