diff --git a/VortexEngine/src/Menus/MenuList/GlobalBrightness.cpp b/VortexEngine/src/Menus/MenuList/GlobalBrightness.cpp index 68853295b0..96b186498e 100644 --- a/VortexEngine/src/Menus/MenuList/GlobalBrightness.cpp +++ b/VortexEngine/src/Menus/MenuList/GlobalBrightness.cpp @@ -113,12 +113,14 @@ void GlobalBrightness::showBrightnessSelection() // ==================== KEYCHAIN_MODE STUFF ==================== -// don't worry about this stuff +// The general timer for keychain mode to remain active #define KEYCHAIN_MODE_TIMER_MS 2100 #define KEYCHAIN_MODE_TIMER_TICKS MS_TO_TICKS(KEYCHAIN_MODE_TIMER_MS) +// the number of clicks needed to exit keychain mode #define KEYCHAIN_MODE_EXIT_CLICKS 8 -#define KEYCHAIN_MODE_SLEEP_S 10 -#define KEYCHAIN_MODE_SLEEP_TICKS SEC_TO_TICKS(KEYCHAIN_MODE_SLEEP_S) +// This is the duration of idle time on blank before it will auto-sleep +// give a solid 300 seconds (5 minutes) before it goes to sleep +#define KEYCHAIN_MODE_SLEEP_TICKS SEC_TO_TICKS(300) // bonus simulate keychain_mode in this menu Menu::MenuAction GlobalBrightness::runKeychainMode() diff --git a/VortexEngine/src/Modes/Modes.cpp b/VortexEngine/src/Modes/Modes.cpp index 1413790a00..759f0f7b0f 100644 --- a/VortexEngine/src/Modes/Modes.cpp +++ b/VortexEngine/src/Modes/Modes.cpp @@ -104,17 +104,7 @@ void Modes::play() // full save/load to/from buffer bool Modes::saveToBuffer(ByteStream &modesBuffer) { - if (!serializeSaveHeader(modesBuffer)) { - return false; - } - // serialize all modes data into the modesBuffer - if (!serialize(modesBuffer)) { - return false; - } - DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size()); - if (!modesBuffer.compress()) { - return false; - } + // This API is removed for the DUO return true; } @@ -145,20 +135,6 @@ bool Modes::saveHeader() if (!serializeSaveHeader(headerBuffer)) { return false; } - // the number of modes - if (!headerBuffer.serialize8(m_numModes)) { - return false; - } - // only on the duo just save some extra stuff to the header slot -#ifdef VORTEX_EMBEDDED - // Duo also saves the build number to the save header so the chromalink can - // read it out, other devices just have the version hardcoded into their - // editor connection hello message. Don't do this in VortexLib because - // it will alter the savefile format and break compatibility - if (!headerBuffer.serialize8((uint8_t)VORTEX_BUILD_NUMBER)) { - return false; - } -#endif if (!Storage::write(0, headerBuffer)) { return false; } @@ -287,6 +263,20 @@ bool Modes::serializeSaveHeader(ByteStream &saveBuffer) if (!saveBuffer.serialize8((uint8_t)Leds::getBrightness())) { return false; } + // the number of modes + if (!saveBuffer.serialize8(m_numModes)) { + return false; + } + // only on the duo just save some extra stuff to the header slot +#ifdef VORTEX_EMBEDDED + // Duo also saves the build number to the save header so the chromalink can + // read it out, other devices just have the version hardcoded into their + // editor connection hello message. Don't do this in VortexLib because + // it will alter the savefile format and break compatibility + if (!saveBuffer.serialize8((uint8_t)VORTEX_BUILD_NUMBER)) { + return false; + } +#endif DEBUG_LOGF("Serialized all modes, uncompressed size: %u", saveBuffer.size()); return true; } diff --git a/VortexEngine/tests/tests_general.tar.gz b/VortexEngine/tests/tests_general.tar.gz index 27a4d80bd6..74aa0fcb05 100644 Binary files a/VortexEngine/tests/tests_general.tar.gz and b/VortexEngine/tests/tests_general.tar.gz differ