From 4482ba8153aae0a879d6a9d0df34acda4db3d352 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 7 Sep 2023 17:32:22 -0700 Subject: [PATCH] updated docs --- docs/core/BlendPattern_8cpp_source.html | 4 +- docs/core/Buttons_8h_source.html | 2 +- docs/core/ColorSelect_8cpp_source.html | 4 +- docs/core/ColorSelect_8h_source.html | 16 +- docs/core/ColorTypes_8cpp.html | 2 +- docs/core/ColorTypes_8cpp_source.html | 2 +- docs/core/ColorTypes_8h.html | 2 +- docs/core/DefaultModes_8cpp.html | 18 +- docs/core/DefaultModes_8cpp.js | 2 +- docs/core/DefaultModes_8cpp_source.html | 7 +- docs/core/DefaultModes_8h.html | 14 +- docs/core/DefaultModes_8h.js | 2 +- docs/core/DefaultModes_8h_source.html | 5 +- docs/core/EditorConnection_8cpp_source.html | 30 +- docs/core/FactoryReset_8cpp_source.html | 12 +- docs/core/GlobalBrightness_8h_source.html | 8 +- docs/core/Log_8h_source.html | 2 +- docs/core/Memory_8cpp_source.html | 2 +- docs/core/Menu_8cpp_source.html | 6 +- docs/core/Menus_8cpp.html | 16 +- docs/core/Menus_8cpp__incl.md5 | 2 +- docs/core/Menus_8cpp__incl.svg | 502 +++-- docs/core/Menus_8cpp__incl_org.svg | 504 +++-- docs/core/Menus_8cpp_source.html | 16 +- docs/core/ModeSharing_8cpp_source.html | 4 +- docs/core/Modes_8cpp_source.html | 1905 +++++++++-------- docs/core/Modes_8h_source.html | 245 +-- docs/core/PatternBuilder_8cpp_source.html | 12 +- docs/core/PatternSelect_8cpp__incl.md5 | 2 +- docs/core/PatternSelect_8cpp__incl.svg | 484 +++-- docs/core/PatternSelect_8cpp__incl_org.svg | 486 +++-- docs/core/PatternSelect_8cpp_source.html | 8 +- docs/core/PatternSelect_8h.html | 3 +- docs/core/PatternSelect_8h__incl.md5 | 2 +- docs/core/PatternSelect_8h__incl.svg | 152 +- docs/core/PatternSelect_8h_source.html | 71 +- docs/core/Patterns_8h__dep__incl.md5 | 2 +- docs/core/Patterns_8h__dep__incl.svg | 1244 ++++++----- docs/core/Patterns_8h__dep__incl_org.svg | 1246 ++++++----- docs/core/Randomizer_8cpp_source.html | 4 +- docs/core/Storage_8cpp.html | 5 +- docs/core/Storage_8cpp__incl.md5 | 2 +- docs/core/Storage_8cpp__incl.svg | 139 +- docs/core/Storage_8cpp__incl_org.svg | 141 +- docs/core/Storage_8cpp_source.html | 294 +-- docs/core/Storage_8h_source.html | 16 +- docs/core/TimeControl_8cpp_source.html | 4 +- docs/core/Timings_8h_source.html | 22 +- docs/core/VortexConfig_8h.html | 162 +- docs/core/VortexConfig_8h.js | 2 + docs/core/VortexConfig_8h_source.html | 851 ++++---- docs/core/VortexEngine_8cpp_source.html | 26 +- docs/core/classBlendPattern.html | 4 +- docs/core/classByteStream.html | 26 +- docs/core/classColorSelect.html | 26 +- docs/core/classColorset.html | 2 +- docs/core/classEditorConnection.html | 40 +- docs/core/classFactoryReset.html | 16 +- docs/core/classGlobalBrightness.html | 8 +- docs/core/classLeds.html | 6 +- docs/core/classMenu.html | 12 +- docs/core/classMode.html | 12 +- docs/core/classModeSharing.html | 12 +- docs/core/classModes-members.html | 24 +- docs/core/classModes.html | 1409 ++++++------ docs/core/classModes.js | 2 + docs/core/classModes_1_1ModeLink.html | 426 ++-- docs/core/classPatternBuilder.html | 12 +- docs/core/classPatternSelect.html | 22 +- docs/core/classRandomizer.html | 8 +- docs/core/classStorage-members.html | 4 +- docs/core/classStorage.html | 288 +-- docs/core/classStorage.js | 4 +- docs/core/classTime.html | 10 +- docs/core/classVortexEngine.html | 28 +- docs/core/dir_000007_000010.html | 2 +- docs/core/dir_000008_000010.html | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.svg | 4 +- ...b4510cba155c652ac883383ddf0b92_dep_org.svg | 4 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.svg | 4 +- ...4d93e079ad601e0006c23ac3d37255_dep_org.svg | 4 +- ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.svg | 4 +- ...02266255841645c523fab960c9ed1d_dep_org.svg | 4 +- docs/core/functions_func_r.html | 2 +- docs/core/functions_func_s.html | 3 + docs/core/functions_func_u.html | 3 + docs/core/functions_func_w.html | 2 +- docs/core/functions_r.html | 2 +- docs/core/functions_s.html | 3 + docs/core/functions_u.html | 3 + docs/core/functions_w.html | 2 +- docs/core/globals_d.html | 4 +- docs/core/globals_defs_m.html | 3 + docs/core/globals_defs_n.html | 3 + docs/core/globals_m.html | 3 + docs/core/globals_n.html | 3 + docs/core/globals_vars.html | 4 +- .../latex/BackStrobePattern_8cpp__incl.pdf | Bin 19609 -> 19609 bytes .../latex/BackStrobePattern_8h__dep__incl.pdf | Bin 8990 -> 8990 bytes .../core/latex/BackStrobePattern_8h__incl.pdf | Bin 19199 -> 19199 bytes docs/core/latex/BasicPattern_8cpp__incl.pdf | Bin 18474 -> 18474 bytes .../core/latex/BasicPattern_8h__dep__incl.pdf | Bin 10268 -> 10268 bytes docs/core/latex/BasicPattern_8h__incl.pdf | Bin 16696 -> 16696 bytes docs/core/latex/BitStream_8cpp__incl.pdf | Bin 14960 -> 14960 bytes docs/core/latex/BitStream_8h__dep__incl.pdf | Bin 14607 -> 14607 bytes docs/core/latex/BitStream_8h__incl.pdf | Bin 7839 -> 7839 bytes docs/core/latex/BlendPattern_8cpp__incl.pdf | Bin 19506 -> 19506 bytes .../core/latex/BlendPattern_8h__dep__incl.pdf | Bin 8479 -> 8479 bytes docs/core/latex/BlendPattern_8h__incl.pdf | Bin 18611 -> 18611 bytes .../latex/BlinkStepPattern_8cpp__incl.pdf | Bin 20727 -> 20727 bytes .../latex/BlinkStepPattern_8h__dep__incl.pdf | Bin 22184 -> 22184 bytes docs/core/latex/BlinkStepPattern_8h__incl.pdf | Bin 17291 -> 17291 bytes docs/core/latex/BouncePattern_8cpp__incl.pdf | Bin 22194 -> 22194 bytes .../latex/BouncePattern_8h__dep__incl.pdf | Bin 8495 -> 8495 bytes docs/core/latex/BouncePattern_8h__incl.pdf | Bin 18897 -> 18897 bytes docs/core/latex/Button_8cpp__incl.pdf | Bin 15741 -> 15741 bytes docs/core/latex/Button_8h__dep__incl.pdf | Bin 14055 -> 14055 bytes docs/core/latex/Button_8h__incl.pdf | Bin 7272 -> 7272 bytes docs/core/latex/Buttons_8cpp__incl.pdf | Bin 14843 -> 14843 bytes docs/core/latex/Buttons_8h__dep__incl.pdf | Bin 8434 -> 8434 bytes docs/core/latex/Buttons_8h__incl.pdf | Bin 7755 -> 7755 bytes docs/core/latex/ByteStream_8cpp__incl.pdf | Bin 16492 -> 16492 bytes docs/core/latex/ByteStream_8h__dep__incl.pdf | Bin 29726 -> 29726 bytes docs/core/latex/ByteStream_8h__incl.pdf | Bin 13600 -> 13600 bytes docs/core/latex/ChaserPattern_8cpp__incl.pdf | Bin 19369 -> 19369 bytes .../latex/ChaserPattern_8h__dep__incl.pdf | Bin 8941 -> 8941 bytes docs/core/latex/ChaserPattern_8h__incl.pdf | Bin 18940 -> 18940 bytes .../latex/ColorConstants_8h__dep__incl.pdf | Bin 46598 -> 46598 bytes docs/core/latex/ColorSelect_8cpp__incl.pdf | Bin 23981 -> 23981 bytes docs/core/latex/ColorSelect_8h__dep__incl.pdf | Bin 8219 -> 8219 bytes docs/core/latex/ColorSelect_8h__incl.pdf | Bin 15983 -> 15983 bytes docs/core/latex/ColorTypes_8cpp.tex | 2 +- docs/core/latex/ColorTypes_8cpp__incl.pdf | Bin 14907 -> 14907 bytes docs/core/latex/ColorTypes_8h.tex | 2 +- docs/core/latex/ColorTypes_8h__dep__incl.pdf | Bin 35389 -> 35389 bytes docs/core/latex/ColorTypes_8h__incl.pdf | Bin 11798 -> 11798 bytes docs/core/latex/Colorset_8cpp__incl.pdf | Bin 17016 -> 17016 bytes docs/core/latex/Colorset_8h__dep__incl.pdf | Bin 35033 -> 35033 bytes docs/core/latex/Colorset_8h__incl.pdf | Bin 12266 -> 12266 bytes .../core/latex/CompoundPattern_8cpp__incl.pdf | Bin 17934 -> 17934 bytes .../latex/CompoundPattern_8h__dep__incl.pdf | Bin 12017 -> 12017 bytes docs/core/latex/CompoundPattern_8h__incl.pdf | Bin 16042 -> 16042 bytes docs/core/latex/Compression_8cpp__incl.pdf | Bin 14103 -> 14103 bytes docs/core/latex/Compression_8h__dep__incl.pdf | Bin 8797 -> 8797 bytes docs/core/latex/Compression_8h__incl.pdf | Bin 12355 -> 12355 bytes .../latex/CrossDopsPattern_8cpp__incl.pdf | Bin 20407 -> 20407 bytes .../latex/CrossDopsPattern_8h__dep__incl.pdf | Bin 8754 -> 8754 bytes docs/core/latex/CrossDopsPattern_8h__incl.pdf | Bin 18991 -> 18991 bytes docs/core/latex/DefaultModes_8cpp.tex | 10 +- docs/core/latex/DefaultModes_8cpp__incl.pdf | Bin 14003 -> 14003 bytes docs/core/latex/DefaultModes_8h.tex | 6 +- .../core/latex/DefaultModes_8h__dep__incl.pdf | Bin 9608 -> 9608 bytes docs/core/latex/DefaultModes_8h__incl.pdf | Bin 12757 -> 12757 bytes .../latex/DoubleStrobePattern_8cpp__incl.pdf | Bin 21717 -> 21717 bytes .../DoubleStrobePattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../latex/DoubleStrobePattern_8h__incl.pdf | Bin 19095 -> 19095 bytes .../latex/DripMorphPattern_8cpp__incl.pdf | Bin 21194 -> 21194 bytes .../latex/DripMorphPattern_8h__dep__incl.pdf | Bin 8620 -> 8620 bytes docs/core/latex/DripMorphPattern_8h__incl.pdf | Bin 18245 -> 18245 bytes docs/core/latex/DripPattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/core/latex/DripPattern_8h__dep__incl.pdf | Bin 8601 -> 8601 bytes docs/core/latex/DripPattern_8h__incl.pdf | Bin 18995 -> 18995 bytes .../latex/EditorConnection_8cpp__incl.pdf | Bin 22985 -> 22985 bytes .../latex/EditorConnection_8h__dep__incl.pdf | Bin 8095 -> 8095 bytes docs/core/latex/EditorConnection_8h__incl.pdf | Bin 17750 -> 17750 bytes docs/core/latex/ErrorBlinker_8cpp__incl.pdf | Bin 12414 -> 12414 bytes .../core/latex/ErrorBlinker_8h__dep__incl.pdf | Bin 35521 -> 35521 bytes docs/core/latex/ErrorBlinker_8h__incl.pdf | Bin 12008 -> 12008 bytes docs/core/latex/FactoryReset_8cpp__incl.pdf | Bin 24953 -> 24953 bytes .../core/latex/FactoryReset_8h__dep__incl.pdf | Bin 8784 -> 8784 bytes docs/core/latex/FactoryReset_8h__incl.pdf | Bin 15519 -> 15519 bytes docs/core/latex/FillPattern_8cpp__incl.pdf | Bin 22244 -> 22244 bytes docs/core/latex/FillPattern_8h__dep__incl.pdf | Bin 8558 -> 8558 bytes docs/core/latex/FillPattern_8h__incl.pdf | Bin 18959 -> 18959 bytes .../latex/GlobalBrightness_8cpp__incl.pdf | Bin 20697 -> 20697 bytes .../latex/GlobalBrightness_8h__dep__incl.pdf | Bin 8577 -> 8577 bytes docs/core/latex/GlobalBrightness_8h__incl.pdf | Bin 15625 -> 15625 bytes .../core/latex/HueShiftPattern_8cpp__incl.pdf | Bin 21424 -> 21424 bytes .../latex/HueShiftPattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes docs/core/latex/HueShiftPattern_8h__incl.pdf | Bin 18557 -> 18557 bytes docs/core/latex/IRConfig_8h__dep__incl.pdf | Bin 14606 -> 14606 bytes docs/core/latex/IRReceiver_8cpp__incl.pdf | Bin 19199 -> 19199 bytes docs/core/latex/IRReceiver_8h__dep__incl.pdf | Bin 9765 -> 9765 bytes docs/core/latex/IRReceiver_8h__incl.pdf | Bin 13067 -> 13067 bytes docs/core/latex/IRSender_8cpp__incl.pdf | Bin 18740 -> 18740 bytes docs/core/latex/IRSender_8h__dep__incl.pdf | Bin 9531 -> 9531 bytes docs/core/latex/IRSender_8h__incl.pdf | Bin 15496 -> 15496 bytes docs/core/latex/LedStash_8cpp__incl.pdf | Bin 13558 -> 13558 bytes docs/core/latex/LedStash_8h__dep__incl.pdf | Bin 10881 -> 10881 bytes docs/core/latex/LedStash_8h__incl.pdf | Bin 13161 -> 13161 bytes docs/core/latex/LedTypes_8h__dep__incl.pdf | Bin 39462 -> 39462 bytes docs/core/latex/LedTypes_8h__incl.pdf | Bin 11941 -> 11941 bytes docs/core/latex/Leds_8cpp__incl.pdf | Bin 18869 -> 18869 bytes docs/core/latex/Leds_8h__dep__incl.pdf | Bin 29540 -> 29540 bytes docs/core/latex/Leds_8h__incl.pdf | Bin 13061 -> 13061 bytes .../latex/LighthousePattern_8cpp__incl.pdf | Bin 22952 -> 22952 bytes .../latex/LighthousePattern_8h__dep__incl.pdf | Bin 8578 -> 8578 bytes .../core/latex/LighthousePattern_8h__incl.pdf | Bin 20015 -> 20015 bytes docs/core/latex/Log_8cpp__incl.pdf | Bin 15587 -> 15587 bytes docs/core/latex/Log_8h__dep__incl.pdf | Bin 36492 -> 36492 bytes docs/core/latex/Log_8h__incl.pdf | Bin 12688 -> 12688 bytes docs/core/latex/MateriaPattern_8cpp__incl.pdf | Bin 21360 -> 21360 bytes .../latex/MateriaPattern_8h__dep__incl.pdf | Bin 8499 -> 8499 bytes docs/core/latex/MateriaPattern_8h__incl.pdf | Bin 17935 -> 17935 bytes docs/core/latex/Memory_8cpp__incl.pdf | Bin 14354 -> 14354 bytes docs/core/latex/Memory_8h__dep__incl.pdf | Bin 14350 -> 14350 bytes docs/core/latex/Memory_8h__incl.pdf | Bin 12212 -> 12212 bytes docs/core/latex/Menu_8cpp__incl.pdf | Bin 21451 -> 21451 bytes docs/core/latex/Menu_8h__dep__incl.pdf | Bin 16349 -> 16349 bytes docs/core/latex/Menu_8h__incl.pdf | Bin 14755 -> 14755 bytes docs/core/latex/Menus_8cpp__incl.md5 | 2 +- docs/core/latex/Menus_8cpp__incl.pdf | Bin 28474 -> 28202 bytes docs/core/latex/Menus_8h__dep__incl.pdf | Bin 11751 -> 11751 bytes docs/core/latex/Menus_8h__incl.pdf | Bin 14760 -> 14760 bytes docs/core/latex/MeteorPattern_8cpp__incl.pdf | Bin 22534 -> 22534 bytes .../latex/MeteorPattern_8h__dep__incl.pdf | Bin 8493 -> 8493 bytes docs/core/latex/MeteorPattern_8h__incl.pdf | Bin 20141 -> 20141 bytes docs/core/latex/ModeSharing_8cpp__incl.pdf | Bin 25714 -> 25714 bytes docs/core/latex/ModeSharing_8h__dep__incl.pdf | Bin 8409 -> 8409 bytes docs/core/latex/ModeSharing_8h__incl.pdf | Bin 15397 -> 15397 bytes docs/core/latex/Mode_8cpp__incl.pdf | Bin 23012 -> 23012 bytes docs/core/latex/Mode_8h__dep__incl.pdf | Bin 22138 -> 22138 bytes docs/core/latex/Mode_8h__incl.pdf | Bin 13260 -> 13260 bytes docs/core/latex/Modes_8cpp__incl.pdf | Bin 24409 -> 24409 bytes docs/core/latex/Modes_8h__dep__incl.pdf | Bin 14402 -> 14402 bytes docs/core/latex/Modes_8h__incl.pdf | Bin 17165 -> 17165 bytes .../core/latex/MultiLedPattern_8cpp__incl.pdf | Bin 15879 -> 15879 bytes .../latex/MultiLedPattern_8h__dep__incl.pdf | Bin 32353 -> 32353 bytes docs/core/latex/MultiLedPattern_8h__incl.pdf | Bin 15504 -> 15504 bytes docs/core/latex/PatternArgs_8cpp__incl.pdf | Bin 14799 -> 14799 bytes docs/core/latex/PatternArgs_8h__dep__incl.pdf | Bin 34027 -> 34027 bytes docs/core/latex/PatternArgs_8h__incl.pdf | Bin 7593 -> 7593 bytes docs/core/latex/PatternBuilder_8cpp__incl.pdf | Bin 41365 -> 41365 bytes .../latex/PatternBuilder_8h__dep__incl.pdf | Bin 11726 -> 11726 bytes docs/core/latex/PatternBuilder_8h__incl.pdf | Bin 8291 -> 8291 bytes docs/core/latex/PatternSelect_8cpp__incl.md5 | 2 +- docs/core/latex/PatternSelect_8cpp__incl.pdf | Bin 26176 -> 25774 bytes docs/core/latex/PatternSelect_8h.tex | 1 - .../latex/PatternSelect_8h__dep__incl.pdf | Bin 8459 -> 8459 bytes docs/core/latex/PatternSelect_8h__incl.md5 | 2 +- docs/core/latex/PatternSelect_8h__incl.pdf | Bin 15922 -> 16045 bytes docs/core/latex/Pattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/core/latex/Pattern_8h__dep__incl.pdf | Bin 33795 -> 33795 bytes docs/core/latex/Pattern_8h__incl.pdf | Bin 14778 -> 14778 bytes docs/core/latex/Patterns_8h__dep__incl.md5 | 2 +- docs/core/latex/Patterns_8h__dep__incl.pdf | Bin 36710 -> 36563 bytes docs/core/latex/Patterns_8h__incl.pdf | Bin 7396 -> 7396 bytes docs/core/latex/PulsishPattern_8cpp__incl.pdf | Bin 18966 -> 18966 bytes .../latex/PulsishPattern_8h__dep__incl.pdf | Bin 8502 -> 8502 bytes docs/core/latex/PulsishPattern_8h__incl.pdf | Bin 18154 -> 18154 bytes docs/core/latex/Random_8cpp__incl.pdf | Bin 7878 -> 7878 bytes docs/core/latex/Random_8h__dep__incl.pdf | Bin 13633 -> 13633 bytes docs/core/latex/Random_8h__incl.pdf | Bin 7285 -> 7285 bytes docs/core/latex/Randomizer_8cpp__incl.pdf | Bin 26121 -> 26121 bytes docs/core/latex/Randomizer_8h__dep__incl.pdf | Bin 8783 -> 8783 bytes docs/core/latex/Randomizer_8h__incl.pdf | Bin 16400 -> 16400 bytes docs/core/latex/Sequence_8cpp__incl.pdf | Bin 19446 -> 19446 bytes docs/core/latex/Sequence_8h__dep__incl.pdf | Bin 10764 -> 10764 bytes docs/core/latex/Sequence_8h__incl.pdf | Bin 15466 -> 15466 bytes .../latex/SequencedPattern_8cpp__incl.pdf | Bin 22416 -> 22416 bytes .../latex/SequencedPattern_8h__dep__incl.pdf | Bin 9845 -> 9845 bytes docs/core/latex/SequencedPattern_8h__incl.pdf | Bin 18493 -> 18493 bytes docs/core/latex/Serial_8cpp__incl.pdf | Bin 17047 -> 17047 bytes docs/core/latex/Serial_8h__dep__incl.pdf | Bin 10309 -> 10309 bytes docs/core/latex/Serial_8h__incl.pdf | Bin 7505 -> 7505 bytes .../latex/SingleLedPattern_8cpp__incl.pdf | Bin 16663 -> 16663 bytes .../latex/SingleLedPattern_8h__dep__incl.pdf | Bin 13276 -> 13276 bytes docs/core/latex/SingleLedPattern_8h__incl.pdf | Bin 15365 -> 15365 bytes .../core/latex/SnowballPattern_8cpp__incl.pdf | Bin 20814 -> 20814 bytes .../latex/SnowballPattern_8h__dep__incl.pdf | Bin 9226 -> 9226 bytes docs/core/latex/SnowballPattern_8h__incl.pdf | Bin 19421 -> 19421 bytes docs/core/latex/SolidPattern_8cpp__incl.pdf | Bin 18999 -> 18999 bytes .../core/latex/SolidPattern_8h__dep__incl.pdf | Bin 8476 -> 8476 bytes docs/core/latex/SolidPattern_8h__incl.pdf | Bin 18606 -> 18606 bytes .../latex/SparkleTracePattern_8cpp__incl.pdf | Bin 21304 -> 21304 bytes .../SparkleTracePattern_8h__dep__incl.pdf | Bin 9019 -> 9019 bytes .../latex/SparkleTracePattern_8h__incl.pdf | Bin 18507 -> 18507 bytes docs/core/latex/Storage_8cpp.tex | 5 +- docs/core/latex/Storage_8cpp__incl.md5 | 2 +- docs/core/latex/Storage_8cpp__incl.pdf | Bin 16051 -> 15822 bytes docs/core/latex/Storage_8h__dep__incl.pdf | Bin 9398 -> 9398 bytes docs/core/latex/Storage_8h__incl.pdf | Bin 7462 -> 7462 bytes .../latex/TheaterChasePattern_8cpp__incl.pdf | Bin 20340 -> 20340 bytes .../TheaterChasePattern_8h__dep__incl.pdf | Bin 8766 -> 8766 bytes .../latex/TheaterChasePattern_8h__incl.pdf | Bin 18888 -> 18888 bytes docs/core/latex/TimeControl_8cpp__incl.pdf | Bin 17716 -> 17716 bytes docs/core/latex/TimeControl_8h__dep__incl.pdf | Bin 33673 -> 33673 bytes docs/core/latex/TimeControl_8h__incl.pdf | Bin 12706 -> 12706 bytes docs/core/latex/Timer_8cpp__incl.pdf | Bin 16198 -> 16198 bytes docs/core/latex/Timer_8h__dep__incl.pdf | Bin 32947 -> 32947 bytes docs/core/latex/Timer_8h__incl.pdf | Bin 12621 -> 12621 bytes docs/core/latex/Timings_8h__dep__incl.pdf | Bin 32873 -> 32873 bytes docs/core/latex/Timings_8h__incl.pdf | Bin 13184 -> 13184 bytes docs/core/latex/VLConfig_8h__dep__incl.pdf | Bin 14282 -> 14282 bytes docs/core/latex/VLConfig_8h__incl.pdf | Bin 11380 -> 11380 bytes docs/core/latex/VLReceiver_8cpp__incl.pdf | Bin 21081 -> 21081 bytes docs/core/latex/VLReceiver_8h__dep__incl.pdf | Bin 8422 -> 8422 bytes docs/core/latex/VLReceiver_8h__incl.pdf | Bin 13865 -> 13865 bytes docs/core/latex/VLSender_8cpp__incl.pdf | Bin 19835 -> 19835 bytes docs/core/latex/VLSender_8h__dep__incl.pdf | Bin 9239 -> 9239 bytes docs/core/latex/VLSender_8h__incl.pdf | Bin 15366 -> 15366 bytes docs/core/latex/VortexConfig_8h.tex | 150 +- .../core/latex/VortexConfig_8h__dep__incl.pdf | Bin 44216 -> 44216 bytes docs/core/latex/VortexConfig_8h__incl.pdf | Bin 10535 -> 10535 bytes docs/core/latex/VortexEngine_8cpp__incl.pdf | Bin 27342 -> 27342 bytes .../core/latex/VortexEngine_8h__dep__incl.pdf | Bin 10749 -> 10749 bytes docs/core/latex/VortexEngine_8h__incl.pdf | Bin 11553 -> 11553 bytes .../latex/VortexWipePattern_8cpp__incl.pdf | Bin 22508 -> 22508 bytes .../latex/VortexWipePattern_8h__dep__incl.pdf | Bin 8865 -> 8865 bytes .../core/latex/VortexWipePattern_8h__incl.pdf | Bin 19226 -> 19226 bytes docs/core/latex/WarpPattern_8cpp__incl.pdf | Bin 22532 -> 22532 bytes docs/core/latex/WarpPattern_8h__dep__incl.pdf | Bin 8847 -> 8847 bytes docs/core/latex/WarpPattern_8h__incl.pdf | Bin 19244 -> 19244 bytes .../core/latex/WarpWormPattern_8cpp__incl.pdf | Bin 22522 -> 22522 bytes .../latex/WarpWormPattern_8h__dep__incl.pdf | Bin 9016 -> 9016 bytes docs/core/latex/WarpWormPattern_8h__incl.pdf | Bin 19238 -> 19238 bytes docs/core/latex/ZigzagPattern_8cpp__incl.pdf | Bin 20748 -> 20748 bytes .../latex/ZigzagPattern_8h__dep__incl.pdf | Bin 8811 -> 8811 bytes docs/core/latex/ZigzagPattern_8h__incl.pdf | Bin 18450 -> 18450 bytes .../classBackStrobePattern__coll__graph.pdf | Bin 15115 -> 15115 bytes ...classBackStrobePattern__inherit__graph.pdf | Bin 8397 -> 8397 bytes .../latex/classBasicPattern__coll__graph.pdf | Bin 9987 -> 9987 bytes .../classBasicPattern__inherit__graph.pdf | Bin 8228 -> 8228 bytes docs/core/latex/classBlendPattern.tex | 4 +- .../latex/classBlendPattern__coll__graph.pdf | Bin 11011 -> 11011 bytes .../classBlendPattern__inherit__graph.pdf | Bin 7680 -> 7680 bytes .../classBlinkStepPattern__coll__graph.pdf | Bin 10148 -> 10148 bytes .../classBlinkStepPattern__inherit__graph.pdf | Bin 15604 -> 15604 bytes .../latex/classBouncePattern__coll__graph.pdf | Bin 10530 -> 10530 bytes .../classBouncePattern__inherit__graph.pdf | Bin 8009 -> 8009 bytes docs/core/latex/classButtons__coll__graph.pdf | Bin 6040 -> 6040 bytes docs/core/latex/classByteStream.tex | 12 +- .../latex/classByteStream__coll__graph.pdf | Bin 10774 -> 10774 bytes .../latex/classChaserPattern__coll__graph.pdf | Bin 13345 -> 13345 bytes .../classChaserPattern__inherit__graph.pdf | Bin 8726 -> 8726 bytes docs/core/latex/classColorSelect.tex | 2 +- .../latex/classColorSelect__coll__graph.pdf | Bin 11626 -> 11626 bytes .../classColorSelect__inherit__graph.pdf | Bin 6229 -> 6229 bytes .../latex/classColorsetMap__coll__graph.pdf | Bin 7737 -> 7737 bytes .../core/latex/classColorset__coll__graph.pdf | Bin 6977 -> 6977 bytes .../classCompoundPattern__coll__graph.pdf | Bin 9983 -> 9983 bytes .../classCompoundPattern__inherit__graph.pdf | Bin 9618 -> 9618 bytes .../classCrossDopsPattern__coll__graph.pdf | Bin 10648 -> 10648 bytes .../classCrossDopsPattern__inherit__graph.pdf | Bin 8388 -> 8388 bytes .../classDoubleStrobePattern__coll__graph.pdf | Bin 10665 -> 10665 bytes ...assDoubleStrobePattern__inherit__graph.pdf | Bin 8083 -> 8083 bytes .../classDripMorphPattern__coll__graph.pdf | Bin 11304 -> 11304 bytes .../classDripMorphPattern__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../latex/classDripPattern__coll__graph.pdf | Bin 10656 -> 10656 bytes .../classDripPattern__inherit__graph.pdf | Bin 7861 -> 7861 bytes .../classEditorConnection__coll__graph.pdf | Bin 15474 -> 15474 bytes .../classEditorConnection__inherit__graph.pdf | Bin 6250 -> 6250 bytes docs/core/latex/classFactoryReset.tex | 2 +- .../latex/classFactoryReset__coll__graph.pdf | Bin 11019 -> 11019 bytes .../classFactoryReset__inherit__graph.pdf | Bin 7117 -> 7117 bytes .../latex/classFillPattern__coll__graph.pdf | Bin 10631 -> 10631 bytes .../classFillPattern__inherit__graph.pdf | Bin 7827 -> 7827 bytes .../classGlobalBrightness__coll__graph.pdf | Bin 10723 -> 10723 bytes .../classGlobalBrightness__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../classHueShiftPattern__coll__graph.pdf | Bin 11328 -> 11328 bytes .../classHueShiftPattern__inherit__graph.pdf | Bin 7136 -> 7136 bytes .../latex/classIRReceiver__coll__graph.pdf | Bin 6921 -> 6921 bytes .../core/latex/classIRSender__coll__graph.pdf | Bin 12566 -> 12566 bytes .../core/latex/classLedStash__coll__graph.pdf | Bin 7343 -> 7343 bytes docs/core/latex/classLeds.tex | 4 +- docs/core/latex/classLeds__coll__graph.pdf | Bin 6656 -> 6656 bytes .../classLighthousePattern__coll__graph.pdf | Bin 11679 -> 11679 bytes ...classLighthousePattern__inherit__graph.pdf | Bin 8398 -> 8398 bytes .../classMateriaPattern__coll__graph.pdf | Bin 10309 -> 10309 bytes .../classMateriaPattern__inherit__graph.pdf | Bin 6645 -> 6645 bytes docs/core/latex/classMenu__coll__graph.pdf | Bin 10137 -> 10137 bytes docs/core/latex/classMenu__inherit__graph.pdf | Bin 11407 -> 11407 bytes docs/core/latex/classMenus__coll__graph.pdf | Bin 10539 -> 10539 bytes .../latex/classMeteorPattern__coll__graph.pdf | Bin 12013 -> 12013 bytes .../classMeteorPattern__inherit__graph.pdf | Bin 7893 -> 7893 bytes docs/core/latex/classMode.tex | 2 +- .../latex/classModeSharing__coll__graph.pdf | Bin 10774 -> 10774 bytes .../classModeSharing__inherit__graph.pdf | Bin 6489 -> 6489 bytes docs/core/latex/classMode__coll__graph.pdf | Bin 8792 -> 8792 bytes docs/core/latex/classModes.tex | 1189 +++++----- docs/core/latex/classModes_1_1ModeLink.tex | 362 ++-- .../classModes_1_1ModeLink__coll__graph.pdf | Bin 15477 -> 15477 bytes docs/core/latex/classModes__coll__graph.pdf | Bin 15895 -> 15895 bytes .../classMultiLedPattern__coll__graph.pdf | Bin 8682 -> 8682 bytes .../classMultiLedPattern__inherit__graph.pdf | Bin 20017 -> 20017 bytes docs/core/latex/classPatternBuilder.tex | 12 +- docs/core/latex/classPatternSelect.tex | 8 +- .../latex/classPatternSelect__coll__graph.pdf | Bin 10741 -> 10741 bytes .../classPatternSelect__inherit__graph.pdf | Bin 6358 -> 6358 bytes docs/core/latex/classPattern__coll__graph.pdf | Bin 7703 -> 7703 bytes .../latex/classPattern__inherit__graph.pdf | Bin 21698 -> 21698 bytes .../classPulsishPattern__coll__graph.pdf | Bin 10243 -> 10243 bytes .../classPulsishPattern__inherit__graph.pdf | Bin 7002 -> 7002 bytes .../latex/classRandomizer__coll__graph.pdf | Bin 11469 -> 11469 bytes .../latex/classRandomizer__inherit__graph.pdf | Bin 6628 -> 6628 bytes .../latex/classSequenceStep__coll__graph.pdf | Bin 9239 -> 9239 bytes .../core/latex/classSequence__coll__graph.pdf | Bin 9644 -> 9644 bytes .../classSequencedPattern__coll__graph.pdf | Bin 12890 -> 12890 bytes .../classSequencedPattern__inherit__graph.pdf | Bin 8736 -> 8736 bytes .../classSingleLedPattern__coll__graph.pdf | Bin 8743 -> 8743 bytes .../classSingleLedPattern__inherit__graph.pdf | Bin 8203 -> 8203 bytes .../classSnowballPattern__coll__graph.pdf | Bin 11021 -> 11021 bytes .../classSnowballPattern__inherit__graph.pdf | Bin 8451 -> 8451 bytes .../latex/classSolidPattern__coll__graph.pdf | Bin 10367 -> 10367 bytes .../classSolidPattern__inherit__graph.pdf | Bin 7803 -> 7803 bytes .../classSparkleTracePattern__coll__graph.pdf | Bin 11327 -> 11327 bytes ...assSparkleTracePattern__inherit__graph.pdf | Bin 7993 -> 7993 bytes docs/core/latex/classStorage.tex | 243 ++- .../classTheaterChasePattern__coll__graph.pdf | Bin 10604 -> 10604 bytes ...assTheaterChasePattern__inherit__graph.pdf | Bin 8301 -> 8301 bytes docs/core/latex/classTime.tex | 2 +- .../latex/classVLReceiver__coll__graph.pdf | Bin 7155 -> 7155 bytes .../core/latex/classVLSender__coll__graph.pdf | Bin 12742 -> 12742 bytes docs/core/latex/classVortexEngine.tex | 6 +- .../classVortexWipePattern__coll__graph.pdf | Bin 11406 -> 11406 bytes ...classVortexWipePattern__inherit__graph.pdf | Bin 8734 -> 8734 bytes .../latex/classWarpPattern__coll__graph.pdf | Bin 10898 -> 10898 bytes .../classWarpPattern__inherit__graph.pdf | Bin 8087 -> 8087 bytes .../classWarpWormPattern__coll__graph.pdf | Bin 10904 -> 10904 bytes .../classWarpWormPattern__inherit__graph.pdf | Bin 8404 -> 8404 bytes ...assZigzagPattern_1_1Snake__coll__graph.pdf | Bin 9467 -> 9467 bytes .../latex/classZigzagPattern__coll__graph.pdf | Bin 11786 -> 11786 bytes .../classZigzagPattern__inherit__graph.pdf | Bin 7152 -> 7152 bytes ...r_1d79b4615f725ce6e1b38311d89b4d4f_dep.pdf | Bin 17959 -> 17959 bytes ...r_47fec278782816999705227d1066c7a6_dep.pdf | Bin 27862 -> 27862 bytes ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.pdf | Bin 29165 -> 29165 bytes ...r_60d51ee7315d72413f26211ac43a217e_dep.pdf | Bin 11746 -> 11746 bytes ...r_61b212e579fd471c490a116dc3a4c8cf_dep.pdf | Bin 12349 -> 12349 bytes ...r_63ce3ba067bdf35a8f7c780ac03d51a3_dep.pdf | Bin 11519 -> 11519 bytes ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.pdf | Bin 39990 -> 39824 bytes ...r_7e29431de6169dbb5f5ee7a990ed2b16_dep.pdf | Bin 7812 -> 7812 bytes ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.pdf | Bin 41198 -> 41028 bytes ...r_938e62fdb5540a46e6e0c12f6b77804d_dep.pdf | Bin 11867 -> 11867 bytes ...r_9a5c88f87170865d940dc95c76676edb_dep.pdf | Bin 10349 -> 10349 bytes ...r_cabf3d63e98569a74ecb960b83c4a15b_dep.pdf | Bin 13013 -> 13013 bytes ...r_ce91f970b513fb5ff406625265505b14_dep.pdf | Bin 13870 -> 13870 bytes ...r_cfa97f0e2c08f470d5e70542e8b74b9a_dep.pdf | Bin 6963 -> 6963 bytes ...r_d3731d706719beb3d6001df5dcff2644_dep.pdf | Bin 25827 -> 25827 bytes ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.pdf | Bin 41028 -> 41029 bytes ...r_fa5f32c9390e3ea098144f298be2a395_dep.pdf | Bin 22633 -> 22633 bytes ...r_ff5a4dc0324506fcdfb8f8f681f9dae7_dep.pdf | Bin 9962 -> 9962 bytes ...tLZ4__stream__t__internal__coll__graph.pdf | Bin 6930 -> 6930 bytes .../latex/structMenuEntry__coll__graph.pdf | Bin 11124 -> 11124 bytes ...unionLZ4__streamDecode__u__coll__graph.pdf | Bin 7287 -> 7287 bytes .../unionLZ4__stream__u__coll__graph.pdf | Bin 7730 -> 7730 bytes docs/core/navtreedata.js | 12 +- docs/core/navtreeindex1.js | 4 +- docs/core/navtreeindex3.js | 74 +- docs/core/navtreeindex4.js | 6 +- docs/core/navtreeindex5.js | 6 +- docs/core/navtreeindex6.js | 46 +- docs/core/navtreeindex7.js | 14 +- docs/core/navtreeindex8.js | 14 +- docs/core/navtreeindex9.js | 4 + docs/core/search/all_10.js | 2 +- docs/core/search/all_11.js | 340 +-- docs/core/search/all_12.js | 311 +-- docs/core/search/all_13.js | 64 +- docs/core/search/all_14.js | 37 +- docs/core/search/all_15.js | 138 +- docs/core/search/all_16.js | 30 +- docs/core/search/all_17.js | 6 +- docs/core/search/all_18.js | 90 +- docs/core/search/all_4.js | 2 +- docs/core/search/all_c.js | 102 +- docs/core/search/all_d.js | 17 +- docs/core/search/all_e.js | 70 +- docs/core/search/all_f.js | 232 +- docs/core/search/classes_0.js | 18 +- docs/core/search/classes_1.js | 12 +- docs/core/search/classes_10.js | 2 +- docs/core/search/classes_2.js | 8 +- docs/core/search/classes_3.js | 2 +- docs/core/search/classes_4.js | 4 +- docs/core/search/classes_5.js | 2 +- docs/core/search/classes_6.js | 4 +- docs/core/search/classes_7.js | 4 +- docs/core/search/classes_8.js | 14 +- docs/core/search/classes_9.js | 20 +- docs/core/search/classes_a.js | 12 +- docs/core/search/classes_b.js | 8 +- docs/core/search/classes_c.js | 20 +- docs/core/search/classes_d.js | 6 +- docs/core/search/classes_e.js | 8 +- docs/core/search/classes_f.js | 4 +- docs/core/search/defines_0.js | 48 +- docs/core/search/defines_1.js | 22 +- docs/core/search/defines_10.js | 24 +- docs/core/search/defines_11.js | 6 +- docs/core/search/defines_12.js | 84 +- docs/core/search/defines_13.js | 4 +- docs/core/search/defines_2.js | 16 +- docs/core/search/defines_3.js | 30 +- docs/core/search/defines_4.js | 54 +- docs/core/search/defines_5.js | 12 +- docs/core/search/defines_6.js | 2 +- docs/core/search/defines_7.js | 48 +- docs/core/search/defines_8.js | 60 +- docs/core/search/defines_9.js | 2 +- docs/core/search/defines_a.js | 60 +- docs/core/search/defines_b.js | 91 +- docs/core/search/defines_c.js | 11 +- docs/core/search/defines_d.js | 14 +- docs/core/search/defines_e.js | 206 +- docs/core/search/defines_f.js | 40 +- docs/core/search/enums_0.js | 6 +- docs/core/search/enums_1.js | 4 +- docs/core/search/enums_2.js | 6 +- docs/core/search/enums_3.js | 2 +- docs/core/search/enums_4.js | 4 +- docs/core/search/enums_5.js | 8 +- docs/core/search/enums_6.js | 6 +- docs/core/search/enums_7.js | 4 +- docs/core/search/enums_8.js | 2 +- docs/core/search/enums_9.js | 4 +- docs/core/search/enumvalues_0.js | 6 +- docs/core/search/enumvalues_1.js | 2 +- docs/core/search/enumvalues_10.js | 16 +- docs/core/search/enumvalues_11.js | 6 +- docs/core/search/enumvalues_2.js | 6 +- docs/core/search/enumvalues_3.js | 6 +- docs/core/search/enumvalues_4.js | 2 +- docs/core/search/enumvalues_5.js | 22 +- docs/core/search/enumvalues_6.js | 4 +- docs/core/search/enumvalues_7.js | 38 +- docs/core/search/enumvalues_8.js | 34 +- docs/core/search/enumvalues_9.js | 6 +- docs/core/search/enumvalues_a.js | 2 +- docs/core/search/enumvalues_b.js | 146 +- docs/core/search/enumvalues_c.js | 12 +- docs/core/search/enumvalues_d.js | 66 +- docs/core/search/enumvalues_e.js | 4 +- docs/core/search/enumvalues_f.js | 4 +- docs/core/search/files_0.js | 36 +- docs/core/search/files_1.js | 30 +- docs/core/search/files_10.js | 4 +- docs/core/search/files_2.js | 16 +- docs/core/search/files_3.js | 8 +- docs/core/search/files_4.js | 8 +- docs/core/search/files_5.js | 4 +- docs/core/search/files_6.js | 4 +- docs/core/search/files_7.js | 10 +- docs/core/search/files_8.js | 18 +- docs/core/search/files_9.js | 36 +- docs/core/search/files_a.js | 22 +- docs/core/search/files_b.js | 8 +- docs/core/search/files_c.js | 32 +- docs/core/search/files_d.js | 14 +- docs/core/search/files_e.js | 20 +- docs/core/search/files_f.js | 8 +- docs/core/search/functions_0.js | 4 +- docs/core/search/functions_1.js | 38 +- docs/core/search/functions_10.js | 2 +- docs/core/search/functions_11.js | 106 +- docs/core/search/functions_12.js | 163 +- docs/core/search/functions_13.js | 14 +- docs/core/search/functions_14.js | 19 +- docs/core/search/functions_15.js | 10 +- docs/core/search/functions_16.js | 12 +- docs/core/search/functions_17.js | 2 +- docs/core/search/functions_18.js | 90 +- docs/core/search/functions_2.js | 68 +- docs/core/search/functions_3.js | 98 +- docs/core/search/functions_4.js | 30 +- docs/core/search/functions_5.js | 14 +- docs/core/search/functions_6.js | 10 +- docs/core/search/functions_7.js | 52 +- docs/core/search/functions_8.js | 32 +- docs/core/search/functions_9.js | 42 +- docs/core/search/functions_a.js | 2 +- docs/core/search/functions_b.js | 98 +- docs/core/search/functions_c.js | 38 +- docs/core/search/functions_d.js | 24 +- docs/core/search/functions_e.js | 64 +- docs/core/search/functions_f.js | 36 +- docs/core/search/related_0.js | 2 +- docs/core/search/related_1.js | 2 +- docs/core/search/related_2.js | 2 +- docs/core/search/typedefs_0.js | 4 +- docs/core/search/typedefs_1.js | 2 +- docs/core/search/typedefs_2.js | 2 +- docs/core/search/typedefs_3.js | 16 +- docs/core/search/typedefs_4.js | 2 +- docs/core/search/typedefs_5.js | 2 +- docs/core/search/typedefs_6.js | 2 +- docs/core/search/typedefs_7.js | 8 +- docs/core/search/variables_0.js | 18 +- docs/core/search/variables_1.js | 10 +- docs/core/search/variables_10.js | 6 +- docs/core/search/variables_11.js | 4 +- docs/core/search/variables_2.js | 10 +- docs/core/search/variables_3.js | 12 +- docs/core/search/variables_4.js | 4 +- docs/core/search/variables_5.js | 2 +- docs/core/search/variables_6.js | 10 +- docs/core/search/variables_7.js | 4 +- docs/core/search/variables_8.js | 8 +- docs/core/search/variables_9.js | 8 +- docs/core/search/variables_a.js | 312 +-- docs/core/search/variables_b.js | 8 +- docs/core/search/variables_c.js | 4 +- docs/core/search/variables_d.js | 6 +- docs/core/search/variables_e.js | 2 +- docs/core/search/variables_f.js | 10 +- docs/core/structdefault__mode__entry.html | 6 +- docs/duo/BlendPattern_8cpp_source.html | 4 +- docs/duo/Buttons_8h_source.html | 2 +- docs/duo/ColorConstants_8h__dep__incl.md5 | 2 +- docs/duo/ColorConstants_8h__dep__incl.svg | 1772 ++++++++------- docs/duo/ColorConstants_8h__dep__incl_org.svg | 1774 ++++++++------- docs/duo/ColorSelect_8h_source.html | 16 +- docs/duo/ColorTypes_8cpp.html | 2 +- docs/duo/ColorTypes_8cpp_source.html | 2 +- docs/duo/ColorTypes_8h.html | 2 +- docs/duo/ColorTypes_8h__dep__incl.md5 | 2 +- docs/duo/ColorTypes_8h__dep__incl.svg | 72 +- docs/duo/ColorTypes_8h__dep__incl_org.svg | 72 +- docs/duo/DefaultModes_8cpp.html | 10 +- docs/duo/DefaultModes_8cpp.js | 2 +- docs/duo/DefaultModes_8cpp_source.html | 104 +- docs/duo/DefaultModes_8h_source.html | 2 +- docs/duo/EditorConnection_8cpp_source.html | 24 +- docs/duo/FactoryReset_8cpp_source.html | 4 +- docs/duo/GlobalBrightness_8h_source.html | 8 +- docs/duo/IRReceiver_8cpp_source.html | 2 +- docs/duo/LedTypes_8h__dep__incl.md5 | 2 +- docs/duo/LedTypes_8h__dep__incl.svg | 352 +-- docs/duo/LedTypes_8h__dep__incl_org.svg | 352 +-- docs/duo/Leds_8cpp_source.html | 2 +- docs/duo/Leds_8h__dep__incl.md5 | 2 +- docs/duo/Leds_8h__dep__incl.svg | 212 +- docs/duo/Leds_8h__dep__incl_org.svg | 214 +- docs/duo/Log_8h_source.html | 2 +- docs/duo/Memory_8cpp_source.html | 2 +- docs/duo/Menus_8cpp.html | 12 +- docs/duo/Menus_8cpp_source.html | 14 +- docs/duo/Modes_8cpp_source.html | 14 +- docs/duo/PatternBuilder_8cpp_source.html | 12 +- docs/duo/Randomizer_8cpp_source.html | 201 +- docs/duo/Randomizer_8h_source.html | 12 +- docs/duo/Storage_8cpp.html | 7 +- docs/duo/Storage_8cpp__incl.md5 | 2 +- docs/duo/Storage_8cpp__incl.svg | 317 +-- docs/duo/Storage_8cpp__incl_org.svg | 319 +-- docs/duo/Storage_8cpp_source.html | 416 ++-- docs/duo/Storage_8h_source.html | 16 +- docs/duo/TimeControl_8cpp.html | 86 +- docs/duo/TimeControl_8cpp_source.html | 649 +++--- docs/duo/TimeControl_8h_source.html | 18 +- docs/duo/Timer_8cpp_source.html | 2 +- docs/duo/Timings_8h.html | 8 +- docs/duo/Timings_8h_source.html | 4 +- docs/duo/VLReceiver_8cpp_source.html | 2 +- docs/duo/VortexConfig_8h.html | 158 +- docs/duo/VortexConfig_8h.js | 2 + docs/duo/VortexConfig_8h__dep__incl.md5 | 2 +- docs/duo/VortexConfig_8h__dep__incl.svg | 1648 +++++++------- docs/duo/VortexConfig_8h__dep__incl_org.svg | 1650 +++++++------- docs/duo/VortexConfig_8h_source.html | 853 ++++---- docs/duo/VortexEngine_8cpp_source.html | 14 +- docs/duo/classBlendPattern.html | 4 +- docs/duo/classByteStream.html | 16 +- docs/duo/classColorSelect.html | 16 +- docs/duo/classEditorConnection.html | 30 +- docs/duo/classFactoryReset.html | 4 +- docs/duo/classGlobalBrightness.html | 8 +- docs/duo/classLeds.html | 4 +- docs/duo/classMenu.html | 6 +- docs/duo/classMode.html | 6 +- docs/duo/classModes.html | 28 +- docs/duo/classPatternArgs.html | 2 +- docs/duo/classPatternBuilder.html | 12 +- docs/duo/classRandom.html | 2 +- docs/duo/classRandomizer.html | 207 +- docs/duo/classStorage.html | 341 +-- docs/duo/classTime-members.html | 2 +- docs/duo/classTime.html | 325 ++- docs/duo/classTime.js | 2 +- docs/duo/classVLReceiver.html | 4 +- docs/duo/classVortexEngine.html | 16 +- docs/duo/dir_000016_000004.html | 96 - ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.md5 | 2 +- ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.svg | 364 ++-- ...7f8bf987ecca6ad9438e8e8937cf95_dep_org.svg | 364 ++-- .../dir_61b212e579fd471c490a116dc3a4c8cf.html | 2 +- ...r_61b212e579fd471c490a116dc3a4c8cf_dep.md5 | 2 +- ...r_61b212e579fd471c490a116dc3a4c8cf_dep.svg | 121 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.svg | 548 +++-- ...b4510cba155c652ac883383ddf0b92_dep_org.svg | 550 +++-- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.svg | 562 +++-- ...4d93e079ad601e0006c23ac3d37255_dep_org.svg | 564 +++-- ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.svg | 544 +++-- ...02266255841645c523fab960c9ed1d_dep_org.svg | 544 +++-- docs/duo/functions_func_i.html | 2 +- docs/duo/functions_i.html | 2 +- docs/duo/globals_d.html | 2 +- docs/duo/globals_defs_m.html | 3 + docs/duo/globals_defs_n.html | 3 + docs/duo/globals_h.html | 4 +- docs/duo/globals_m.html | 3 + docs/duo/globals_n.html | 3 + docs/duo/globals_vars.html | 2 +- .../latex/BackStrobePattern_8cpp__incl.pdf | Bin 19609 -> 19609 bytes .../latex/BackStrobePattern_8h__dep__incl.pdf | Bin 8990 -> 8990 bytes docs/duo/latex/BackStrobePattern_8h__incl.pdf | Bin 19199 -> 19199 bytes docs/duo/latex/BasicPattern_8cpp__incl.pdf | Bin 18474 -> 18474 bytes docs/duo/latex/BasicPattern_8h__dep__incl.pdf | Bin 10268 -> 10268 bytes docs/duo/latex/BasicPattern_8h__incl.pdf | Bin 16696 -> 16696 bytes docs/duo/latex/BitStream_8cpp__incl.pdf | Bin 14960 -> 14960 bytes docs/duo/latex/BitStream_8h__dep__incl.pdf | Bin 14478 -> 14478 bytes docs/duo/latex/BitStream_8h__incl.pdf | Bin 7839 -> 7839 bytes docs/duo/latex/BlendPattern_8cpp__incl.pdf | Bin 19506 -> 19506 bytes docs/duo/latex/BlendPattern_8h__dep__incl.pdf | Bin 8479 -> 8479 bytes docs/duo/latex/BlendPattern_8h__incl.pdf | Bin 18611 -> 18611 bytes .../duo/latex/BlinkStepPattern_8cpp__incl.pdf | Bin 20727 -> 20727 bytes .../latex/BlinkStepPattern_8h__dep__incl.pdf | Bin 22184 -> 22184 bytes docs/duo/latex/BlinkStepPattern_8h__incl.pdf | Bin 17291 -> 17291 bytes docs/duo/latex/BouncePattern_8cpp__incl.pdf | Bin 22194 -> 22194 bytes .../duo/latex/BouncePattern_8h__dep__incl.pdf | Bin 8495 -> 8495 bytes docs/duo/latex/BouncePattern_8h__incl.pdf | Bin 18897 -> 18897 bytes docs/duo/latex/Button_8cpp__incl.pdf | Bin 17024 -> 17024 bytes docs/duo/latex/Button_8h__dep__incl.pdf | Bin 14786 -> 14786 bytes docs/duo/latex/Button_8h__incl.pdf | Bin 11844 -> 11844 bytes docs/duo/latex/Buttons_8cpp__incl.pdf | Bin 14858 -> 14858 bytes docs/duo/latex/Buttons_8h__dep__incl.pdf | Bin 8434 -> 8434 bytes docs/duo/latex/Buttons_8h__incl.pdf | Bin 12235 -> 12235 bytes docs/duo/latex/ByteStream_8cpp__incl.pdf | Bin 16388 -> 16388 bytes docs/duo/latex/ByteStream_8h__dep__incl.pdf | Bin 29684 -> 29684 bytes docs/duo/latex/ByteStream_8h__incl.pdf | Bin 13600 -> 13600 bytes docs/duo/latex/ChaserPattern_8cpp__incl.pdf | Bin 19369 -> 19369 bytes .../duo/latex/ChaserPattern_8h__dep__incl.pdf | Bin 8941 -> 8941 bytes docs/duo/latex/ChaserPattern_8h__incl.pdf | Bin 18940 -> 18940 bytes .../latex/ColorConstants_8h__dep__incl.md5 | 2 +- .../latex/ColorConstants_8h__dep__incl.pdf | Bin 46929 -> 46485 bytes docs/duo/latex/ColorSelect_8cpp__incl.pdf | Bin 26944 -> 26944 bytes docs/duo/latex/ColorSelect_8h__dep__incl.pdf | Bin 8219 -> 8219 bytes docs/duo/latex/ColorSelect_8h__incl.pdf | Bin 16967 -> 16967 bytes docs/duo/latex/ColorTypes_8cpp.tex | 2 +- docs/duo/latex/ColorTypes_8cpp__incl.pdf | Bin 14907 -> 14907 bytes docs/duo/latex/ColorTypes_8h.tex | 2 +- docs/duo/latex/ColorTypes_8h__dep__incl.md5 | 2 +- docs/duo/latex/ColorTypes_8h__dep__incl.pdf | Bin 36662 -> 36662 bytes docs/duo/latex/ColorTypes_8h__incl.pdf | Bin 11798 -> 11798 bytes docs/duo/latex/Colorset_8cpp__incl.pdf | Bin 17016 -> 17016 bytes docs/duo/latex/Colorset_8h__dep__incl.pdf | Bin 35219 -> 35219 bytes docs/duo/latex/Colorset_8h__incl.pdf | Bin 12266 -> 12266 bytes docs/duo/latex/CompoundPattern_8cpp__incl.pdf | Bin 17934 -> 17934 bytes .../latex/CompoundPattern_8h__dep__incl.pdf | Bin 12017 -> 12017 bytes docs/duo/latex/CompoundPattern_8h__incl.pdf | Bin 16042 -> 16042 bytes docs/duo/latex/Compression_8cpp__incl.pdf | Bin 14045 -> 14045 bytes docs/duo/latex/Compression_8h__dep__incl.pdf | Bin 8797 -> 8797 bytes docs/duo/latex/Compression_8h__incl.pdf | Bin 12254 -> 12254 bytes .../duo/latex/CrossDopsPattern_8cpp__incl.pdf | Bin 20407 -> 20407 bytes .../latex/CrossDopsPattern_8h__dep__incl.pdf | Bin 8754 -> 8754 bytes docs/duo/latex/CrossDopsPattern_8h__incl.pdf | Bin 18991 -> 18991 bytes docs/duo/latex/DefaultModes_8cpp.tex | 6 +- docs/duo/latex/DefaultModes_8cpp__incl.pdf | Bin 14857 -> 14857 bytes docs/duo/latex/DefaultModes_8h__dep__incl.pdf | Bin 23435 -> 23435 bytes docs/duo/latex/DefaultModes_8h__incl.pdf | Bin 13616 -> 13616 bytes .../latex/DoubleStrobePattern_8cpp__incl.pdf | Bin 21717 -> 21717 bytes .../DoubleStrobePattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../latex/DoubleStrobePattern_8h__incl.pdf | Bin 19095 -> 19095 bytes .../duo/latex/DripMorphPattern_8cpp__incl.pdf | Bin 21194 -> 21194 bytes .../latex/DripMorphPattern_8h__dep__incl.pdf | Bin 8620 -> 8620 bytes docs/duo/latex/DripMorphPattern_8h__incl.pdf | Bin 18245 -> 18245 bytes docs/duo/latex/DripPattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/duo/latex/DripPattern_8h__dep__incl.pdf | Bin 8601 -> 8601 bytes docs/duo/latex/DripPattern_8h__incl.pdf | Bin 18995 -> 18995 bytes .../duo/latex/EditorConnection_8cpp__incl.pdf | Bin 24315 -> 24315 bytes .../latex/EditorConnection_8h__dep__incl.pdf | Bin 8095 -> 8095 bytes docs/duo/latex/EditorConnection_8h__incl.pdf | Bin 18322 -> 18322 bytes docs/duo/latex/ErrorBlinker_8cpp__incl.pdf | Bin 12414 -> 12414 bytes docs/duo/latex/ErrorBlinker_8h__dep__incl.pdf | Bin 36062 -> 36062 bytes docs/duo/latex/ErrorBlinker_8h__incl.pdf | Bin 12008 -> 12008 bytes docs/duo/latex/FactoryReset_8cpp__incl.pdf | Bin 25306 -> 25306 bytes docs/duo/latex/FactoryReset_8h__dep__incl.pdf | Bin 8784 -> 8784 bytes docs/duo/latex/FactoryReset_8h__incl.pdf | Bin 16220 -> 16220 bytes docs/duo/latex/FillPattern_8cpp__incl.pdf | Bin 22244 -> 22244 bytes docs/duo/latex/FillPattern_8h__dep__incl.pdf | Bin 8558 -> 8558 bytes docs/duo/latex/FillPattern_8h__incl.pdf | Bin 18959 -> 18959 bytes .../duo/latex/GlobalBrightness_8cpp__incl.pdf | Bin 27282 -> 27282 bytes .../latex/GlobalBrightness_8h__dep__incl.pdf | Bin 8577 -> 8577 bytes docs/duo/latex/GlobalBrightness_8h__incl.pdf | Bin 16331 -> 16331 bytes docs/duo/latex/HueShiftPattern_8cpp__incl.pdf | Bin 21424 -> 21424 bytes .../latex/HueShiftPattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes docs/duo/latex/HueShiftPattern_8h__incl.pdf | Bin 18557 -> 18557 bytes docs/duo/latex/IRConfig_8h__dep__incl.pdf | Bin 12973 -> 12973 bytes docs/duo/latex/IRReceiver_8cpp__incl.pdf | Bin 20231 -> 20231 bytes docs/duo/latex/IRReceiver_8h__dep__incl.pdf | Bin 7959 -> 7959 bytes docs/duo/latex/IRReceiver_8h__incl.pdf | Bin 13067 -> 13067 bytes docs/duo/latex/IRSender_8cpp__incl.pdf | Bin 19772 -> 19772 bytes docs/duo/latex/IRSender_8h__dep__incl.pdf | Bin 8029 -> 8029 bytes docs/duo/latex/IRSender_8h__incl.pdf | Bin 15496 -> 15496 bytes docs/duo/latex/LedStash_8cpp__incl.pdf | Bin 13558 -> 13558 bytes docs/duo/latex/LedStash_8h__dep__incl.pdf | Bin 10881 -> 10881 bytes docs/duo/latex/LedStash_8h__incl.pdf | Bin 13161 -> 13161 bytes docs/duo/latex/LedTypes_8h__dep__incl.md5 | 2 +- docs/duo/latex/LedTypes_8h__dep__incl.pdf | Bin 38479 -> 38479 bytes docs/duo/latex/LedTypes_8h__incl.pdf | Bin 11941 -> 11941 bytes docs/duo/latex/Leds_8cpp__incl.pdf | Bin 19323 -> 19323 bytes docs/duo/latex/Leds_8h__dep__incl.md5 | 2 +- docs/duo/latex/Leds_8h__dep__incl.pdf | Bin 29957 -> 29540 bytes docs/duo/latex/Leds_8h__incl.pdf | Bin 13061 -> 13061 bytes .../latex/LighthousePattern_8cpp__incl.pdf | Bin 22952 -> 22952 bytes .../latex/LighthousePattern_8h__dep__incl.pdf | Bin 8578 -> 8578 bytes docs/duo/latex/LighthousePattern_8h__incl.pdf | Bin 20015 -> 20015 bytes docs/duo/latex/Log_8cpp__incl.pdf | Bin 15587 -> 15587 bytes docs/duo/latex/Log_8h__dep__incl.pdf | Bin 36291 -> 36291 bytes docs/duo/latex/Log_8h__incl.pdf | Bin 12688 -> 12688 bytes docs/duo/latex/MateriaPattern_8cpp__incl.pdf | Bin 21360 -> 21360 bytes .../latex/MateriaPattern_8h__dep__incl.pdf | Bin 8499 -> 8499 bytes docs/duo/latex/MateriaPattern_8h__incl.pdf | Bin 17935 -> 17935 bytes docs/duo/latex/Memory_8cpp__incl.pdf | Bin 14354 -> 14354 bytes docs/duo/latex/Memory_8h__dep__incl.pdf | Bin 14350 -> 14350 bytes docs/duo/latex/Memory_8h__incl.pdf | Bin 12212 -> 12212 bytes docs/duo/latex/Menu_8cpp__incl.pdf | Bin 22960 -> 22960 bytes docs/duo/latex/Menu_8h__dep__incl.pdf | Bin 16349 -> 16349 bytes docs/duo/latex/Menu_8h__incl.pdf | Bin 15515 -> 15515 bytes docs/duo/latex/Menus_8cpp__incl.pdf | Bin 29969 -> 29969 bytes docs/duo/latex/Menus_8h__dep__incl.pdf | Bin 11751 -> 11751 bytes docs/duo/latex/Menus_8h__incl.pdf | Bin 15519 -> 15519 bytes docs/duo/latex/MeteorPattern_8cpp__incl.pdf | Bin 22534 -> 22534 bytes .../duo/latex/MeteorPattern_8h__dep__incl.pdf | Bin 8493 -> 8493 bytes docs/duo/latex/MeteorPattern_8h__incl.pdf | Bin 20141 -> 20141 bytes docs/duo/latex/ModeSharing_8cpp__incl.pdf | Bin 26461 -> 26461 bytes docs/duo/latex/ModeSharing_8h__dep__incl.pdf | Bin 8409 -> 8409 bytes docs/duo/latex/ModeSharing_8h__incl.pdf | Bin 16098 -> 16098 bytes docs/duo/latex/Mode_8cpp__incl.pdf | Bin 23851 -> 23851 bytes docs/duo/latex/Mode_8h__dep__incl.pdf | Bin 22138 -> 22138 bytes docs/duo/latex/Mode_8h__incl.pdf | Bin 14293 -> 14293 bytes docs/duo/latex/Modes_8cpp__incl.pdf | Bin 24665 -> 24665 bytes docs/duo/latex/Modes_8h__dep__incl.pdf | Bin 14402 -> 14402 bytes docs/duo/latex/Modes_8h__incl.pdf | Bin 17165 -> 17165 bytes docs/duo/latex/MultiLedPattern_8cpp__incl.pdf | Bin 15879 -> 15879 bytes .../latex/MultiLedPattern_8h__dep__incl.pdf | Bin 32353 -> 32353 bytes docs/duo/latex/MultiLedPattern_8h__incl.pdf | Bin 15504 -> 15504 bytes docs/duo/latex/PatternArgs_8cpp__incl.pdf | Bin 14799 -> 14799 bytes docs/duo/latex/PatternArgs_8h__dep__incl.pdf | Bin 34191 -> 34191 bytes docs/duo/latex/PatternArgs_8h__incl.pdf | Bin 7593 -> 7593 bytes docs/duo/latex/PatternBuilder_8cpp__incl.pdf | Bin 41365 -> 41365 bytes .../latex/PatternBuilder_8h__dep__incl.pdf | Bin 12126 -> 12126 bytes docs/duo/latex/PatternBuilder_8h__incl.pdf | Bin 8291 -> 8291 bytes docs/duo/latex/PatternSelect_8cpp__incl.pdf | Bin 26934 -> 26934 bytes .../duo/latex/PatternSelect_8h__dep__incl.pdf | Bin 8459 -> 8459 bytes docs/duo/latex/PatternSelect_8h__incl.pdf | Bin 17047 -> 17047 bytes docs/duo/latex/Pattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/duo/latex/Pattern_8h__dep__incl.pdf | Bin 35019 -> 35019 bytes docs/duo/latex/Pattern_8h__incl.pdf | Bin 14778 -> 14778 bytes docs/duo/latex/Patterns_8h__dep__incl.pdf | Bin 38509 -> 38509 bytes docs/duo/latex/Patterns_8h__incl.pdf | Bin 7396 -> 7396 bytes docs/duo/latex/PulsishPattern_8cpp__incl.pdf | Bin 18966 -> 18966 bytes .../latex/PulsishPattern_8h__dep__incl.pdf | Bin 8502 -> 8502 bytes docs/duo/latex/PulsishPattern_8h__incl.pdf | Bin 18154 -> 18154 bytes docs/duo/latex/Random_8cpp__incl.pdf | Bin 7878 -> 7878 bytes docs/duo/latex/Random_8h__dep__incl.pdf | Bin 14084 -> 14084 bytes docs/duo/latex/Random_8h__incl.pdf | Bin 7285 -> 7285 bytes docs/duo/latex/Randomizer_8cpp__incl.pdf | Bin 27428 -> 27428 bytes docs/duo/latex/Randomizer_8h__dep__incl.pdf | Bin 8783 -> 8783 bytes docs/duo/latex/Randomizer_8h__incl.pdf | Bin 17289 -> 17289 bytes docs/duo/latex/Sequence_8cpp__incl.pdf | Bin 19446 -> 19446 bytes docs/duo/latex/Sequence_8h__dep__incl.pdf | Bin 10764 -> 10764 bytes docs/duo/latex/Sequence_8h__incl.pdf | Bin 15466 -> 15466 bytes .../duo/latex/SequencedPattern_8cpp__incl.pdf | Bin 22416 -> 22416 bytes .../latex/SequencedPattern_8h__dep__incl.pdf | Bin 9845 -> 9845 bytes docs/duo/latex/SequencedPattern_8h__incl.pdf | Bin 18493 -> 18493 bytes docs/duo/latex/Serial_8cpp__incl.pdf | Bin 17047 -> 17047 bytes docs/duo/latex/Serial_8h__dep__incl.pdf | Bin 9858 -> 9858 bytes docs/duo/latex/Serial_8h__incl.pdf | Bin 7505 -> 7505 bytes .../duo/latex/SingleLedPattern_8cpp__incl.pdf | Bin 16663 -> 16663 bytes .../latex/SingleLedPattern_8h__dep__incl.pdf | Bin 13276 -> 13276 bytes docs/duo/latex/SingleLedPattern_8h__incl.pdf | Bin 15365 -> 15365 bytes docs/duo/latex/SnowballPattern_8cpp__incl.pdf | Bin 20814 -> 20814 bytes .../latex/SnowballPattern_8h__dep__incl.pdf | Bin 9226 -> 9226 bytes docs/duo/latex/SnowballPattern_8h__incl.pdf | Bin 19421 -> 19421 bytes docs/duo/latex/SolidPattern_8cpp__incl.pdf | Bin 18999 -> 18999 bytes docs/duo/latex/SolidPattern_8h__dep__incl.pdf | Bin 8476 -> 8476 bytes docs/duo/latex/SolidPattern_8h__incl.pdf | Bin 18606 -> 18606 bytes .../latex/SparkleTracePattern_8cpp__incl.pdf | Bin 21304 -> 21304 bytes .../SparkleTracePattern_8h__dep__incl.pdf | Bin 9019 -> 9019 bytes .../latex/SparkleTracePattern_8h__incl.pdf | Bin 18507 -> 18507 bytes docs/duo/latex/Storage_8cpp.tex | 7 +- docs/duo/latex/Storage_8cpp__incl.md5 | 2 +- docs/duo/latex/Storage_8cpp__incl.pdf | Bin 18548 -> 16550 bytes docs/duo/latex/Storage_8h__dep__incl.pdf | Bin 9398 -> 9398 bytes docs/duo/latex/Storage_8h__incl.pdf | Bin 7462 -> 7462 bytes .../latex/TheaterChasePattern_8cpp__incl.pdf | Bin 20340 -> 20340 bytes .../TheaterChasePattern_8h__dep__incl.pdf | Bin 8766 -> 8766 bytes .../latex/TheaterChasePattern_8h__incl.pdf | Bin 18888 -> 18888 bytes docs/duo/latex/TimeControl_8cpp.tex | 82 +- docs/duo/latex/TimeControl_8cpp__incl.pdf | Bin 18140 -> 18140 bytes docs/duo/latex/TimeControl_8h__dep__incl.pdf | Bin 35233 -> 35233 bytes docs/duo/latex/TimeControl_8h__incl.pdf | Bin 12706 -> 12706 bytes docs/duo/latex/Timer_8cpp__incl.pdf | Bin 16198 -> 16198 bytes docs/duo/latex/Timer_8h__dep__incl.pdf | Bin 33247 -> 33247 bytes docs/duo/latex/Timer_8h__incl.pdf | Bin 12621 -> 12621 bytes docs/duo/latex/Timings_8h.tex | 8 +- docs/duo/latex/Timings_8h__dep__incl.pdf | Bin 32982 -> 32982 bytes docs/duo/latex/Timings_8h__incl.pdf | Bin 13184 -> 13184 bytes docs/duo/latex/VLConfig_8h__dep__incl.pdf | Bin 14368 -> 14368 bytes docs/duo/latex/VLConfig_8h__incl.pdf | Bin 11380 -> 11380 bytes docs/duo/latex/VLReceiver_8cpp__incl.pdf | Bin 21544 -> 21544 bytes docs/duo/latex/VLReceiver_8h__dep__incl.pdf | Bin 9702 -> 9702 bytes docs/duo/latex/VLReceiver_8h__incl.pdf | Bin 13865 -> 13865 bytes docs/duo/latex/VLSender_8cpp__incl.pdf | Bin 21138 -> 21138 bytes docs/duo/latex/VLSender_8h__dep__incl.pdf | Bin 9239 -> 9239 bytes docs/duo/latex/VLSender_8h__incl.pdf | Bin 15366 -> 15366 bytes docs/duo/latex/VortexConfig_8h.tex | 146 +- docs/duo/latex/VortexConfig_8h__dep__incl.md5 | 2 +- docs/duo/latex/VortexConfig_8h__dep__incl.pdf | Bin 48147 -> 48117 bytes docs/duo/latex/VortexConfig_8h__incl.pdf | Bin 10535 -> 10535 bytes docs/duo/latex/VortexEngine_8cpp__incl.pdf | Bin 26466 -> 26466 bytes docs/duo/latex/VortexEngine_8h__dep__incl.pdf | Bin 12679 -> 12679 bytes docs/duo/latex/VortexEngine_8h__incl.pdf | Bin 11553 -> 11553 bytes .../latex/VortexWipePattern_8cpp__incl.pdf | Bin 22508 -> 22508 bytes .../latex/VortexWipePattern_8h__dep__incl.pdf | Bin 8865 -> 8865 bytes docs/duo/latex/VortexWipePattern_8h__incl.pdf | Bin 19226 -> 19226 bytes docs/duo/latex/WarpPattern_8cpp__incl.pdf | Bin 22532 -> 22532 bytes docs/duo/latex/WarpPattern_8h__dep__incl.pdf | Bin 8847 -> 8847 bytes docs/duo/latex/WarpPattern_8h__incl.pdf | Bin 19244 -> 19244 bytes docs/duo/latex/WarpWormPattern_8cpp__incl.pdf | Bin 22522 -> 22522 bytes .../latex/WarpWormPattern_8h__dep__incl.pdf | Bin 9016 -> 9016 bytes docs/duo/latex/WarpWormPattern_8h__incl.pdf | Bin 19238 -> 19238 bytes docs/duo/latex/ZigzagPattern_8cpp__incl.pdf | Bin 20748 -> 20748 bytes .../duo/latex/ZigzagPattern_8h__dep__incl.pdf | Bin 8811 -> 8811 bytes docs/duo/latex/ZigzagPattern_8h__incl.pdf | Bin 18450 -> 18450 bytes .../classBackStrobePattern__coll__graph.pdf | Bin 15115 -> 15115 bytes ...classBackStrobePattern__inherit__graph.pdf | Bin 8397 -> 8397 bytes .../latex/classBasicPattern__coll__graph.pdf | Bin 9987 -> 9987 bytes .../classBasicPattern__inherit__graph.pdf | Bin 8228 -> 8228 bytes docs/duo/latex/classBlendPattern.tex | 4 +- .../latex/classBlendPattern__coll__graph.pdf | Bin 11011 -> 11011 bytes .../classBlendPattern__inherit__graph.pdf | Bin 7680 -> 7680 bytes .../classBlinkStepPattern__coll__graph.pdf | Bin 10148 -> 10148 bytes .../classBlinkStepPattern__inherit__graph.pdf | Bin 15604 -> 15604 bytes .../latex/classBouncePattern__coll__graph.pdf | Bin 10530 -> 10530 bytes .../classBouncePattern__inherit__graph.pdf | Bin 8009 -> 8009 bytes docs/duo/latex/classButtons__coll__graph.pdf | Bin 6040 -> 6040 bytes docs/duo/latex/classByteStream.tex | 2 +- .../latex/classByteStream__coll__graph.pdf | Bin 10774 -> 10774 bytes .../latex/classChaserPattern__coll__graph.pdf | Bin 13345 -> 13345 bytes .../classChaserPattern__inherit__graph.pdf | Bin 8726 -> 8726 bytes .../latex/classColorSelect__coll__graph.pdf | Bin 11609 -> 11609 bytes .../classColorSelect__inherit__graph.pdf | Bin 6229 -> 6229 bytes .../latex/classColorsetMap__coll__graph.pdf | Bin 7737 -> 7737 bytes docs/duo/latex/classColorset__coll__graph.pdf | Bin 6977 -> 6977 bytes .../classCompoundPattern__coll__graph.pdf | Bin 9983 -> 9983 bytes .../classCompoundPattern__inherit__graph.pdf | Bin 9618 -> 9618 bytes .../classCrossDopsPattern__coll__graph.pdf | Bin 10648 -> 10648 bytes .../classCrossDopsPattern__inherit__graph.pdf | Bin 8388 -> 8388 bytes .../classDoubleStrobePattern__coll__graph.pdf | Bin 10665 -> 10665 bytes ...assDoubleStrobePattern__inherit__graph.pdf | Bin 8083 -> 8083 bytes .../classDripMorphPattern__coll__graph.pdf | Bin 11304 -> 11304 bytes .../classDripMorphPattern__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../latex/classDripPattern__coll__graph.pdf | Bin 10656 -> 10656 bytes .../classDripPattern__inherit__graph.pdf | Bin 7861 -> 7861 bytes .../classEditorConnection__coll__graph.pdf | Bin 15432 -> 15432 bytes .../classEditorConnection__inherit__graph.pdf | Bin 6250 -> 6250 bytes docs/duo/latex/classFactoryReset.tex | 2 +- .../latex/classFactoryReset__coll__graph.pdf | Bin 10975 -> 10975 bytes .../classFactoryReset__inherit__graph.pdf | Bin 7117 -> 7117 bytes .../latex/classFillPattern__coll__graph.pdf | Bin 10631 -> 10631 bytes .../classFillPattern__inherit__graph.pdf | Bin 7827 -> 7827 bytes .../classGlobalBrightness__coll__graph.pdf | Bin 10677 -> 10677 bytes .../classGlobalBrightness__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../classHueShiftPattern__coll__graph.pdf | Bin 11328 -> 11328 bytes .../classHueShiftPattern__inherit__graph.pdf | Bin 7136 -> 7136 bytes docs/duo/latex/classLedStash__coll__graph.pdf | Bin 7343 -> 7343 bytes docs/duo/latex/classLeds__coll__graph.pdf | Bin 6656 -> 6656 bytes .../classLighthousePattern__coll__graph.pdf | Bin 11679 -> 11679 bytes ...classLighthousePattern__inherit__graph.pdf | Bin 8398 -> 8398 bytes .../classMateriaPattern__coll__graph.pdf | Bin 10309 -> 10309 bytes .../classMateriaPattern__inherit__graph.pdf | Bin 6645 -> 6645 bytes docs/duo/latex/classMenu__coll__graph.pdf | Bin 10095 -> 10095 bytes docs/duo/latex/classMenu__inherit__graph.pdf | Bin 11407 -> 11407 bytes docs/duo/latex/classMenus__coll__graph.pdf | Bin 10496 -> 10496 bytes .../latex/classMeteorPattern__coll__graph.pdf | Bin 12013 -> 12013 bytes .../classMeteorPattern__inherit__graph.pdf | Bin 7893 -> 7893 bytes .../latex/classModeSharing__coll__graph.pdf | Bin 10731 -> 10731 bytes .../classModeSharing__inherit__graph.pdf | Bin 6489 -> 6489 bytes docs/duo/latex/classMode__coll__graph.pdf | Bin 8641 -> 8641 bytes docs/duo/latex/classModes.tex | 4 +- .../classModes_1_1ModeLink__coll__graph.pdf | Bin 15455 -> 15455 bytes docs/duo/latex/classModes__coll__graph.pdf | Bin 15866 -> 15866 bytes .../classMultiLedPattern__coll__graph.pdf | Bin 8682 -> 8682 bytes .../classMultiLedPattern__inherit__graph.pdf | Bin 20017 -> 20017 bytes docs/duo/latex/classPatternBuilder.tex | 12 +- .../latex/classPatternSelect__coll__graph.pdf | Bin 10695 -> 10695 bytes .../classPatternSelect__inherit__graph.pdf | Bin 6358 -> 6358 bytes docs/duo/latex/classPattern__coll__graph.pdf | Bin 7703 -> 7703 bytes .../latex/classPattern__inherit__graph.pdf | Bin 21698 -> 21698 bytes .../classPulsishPattern__coll__graph.pdf | Bin 10243 -> 10243 bytes .../classPulsishPattern__inherit__graph.pdf | Bin 7002 -> 7002 bytes docs/duo/latex/classRandomizer.tex | 175 +- .../latex/classRandomizer__coll__graph.pdf | Bin 11407 -> 11407 bytes .../latex/classRandomizer__inherit__graph.pdf | Bin 6628 -> 6628 bytes .../latex/classSequenceStep__coll__graph.pdf | Bin 9239 -> 9239 bytes docs/duo/latex/classSequence__coll__graph.pdf | Bin 9644 -> 9644 bytes .../classSequencedPattern__coll__graph.pdf | Bin 12890 -> 12890 bytes .../classSequencedPattern__inherit__graph.pdf | Bin 8736 -> 8736 bytes .../classSingleLedPattern__coll__graph.pdf | Bin 8743 -> 8743 bytes .../classSingleLedPattern__inherit__graph.pdf | Bin 8203 -> 8203 bytes .../classSnowballPattern__coll__graph.pdf | Bin 11021 -> 11021 bytes .../classSnowballPattern__inherit__graph.pdf | Bin 8451 -> 8451 bytes .../latex/classSolidPattern__coll__graph.pdf | Bin 10367 -> 10367 bytes .../classSolidPattern__inherit__graph.pdf | Bin 7803 -> 7803 bytes .../classSparkleTracePattern__coll__graph.pdf | Bin 11327 -> 11327 bytes ...assSparkleTracePattern__inherit__graph.pdf | Bin 7993 -> 7993 bytes docs/duo/latex/classStorage.tex | 320 +-- .../classTheaterChasePattern__coll__graph.pdf | Bin 10604 -> 10604 bytes ...assTheaterChasePattern__inherit__graph.pdf | Bin 8301 -> 8301 bytes docs/duo/latex/classTime.tex | 312 ++- .../latex/classVLReceiver__coll__graph.pdf | Bin 7155 -> 7155 bytes docs/duo/latex/classVLSender__coll__graph.pdf | Bin 12742 -> 12742 bytes docs/duo/latex/classVortexEngine.tex | 2 +- .../classVortexWipePattern__coll__graph.pdf | Bin 11406 -> 11406 bytes ...classVortexWipePattern__inherit__graph.pdf | Bin 8734 -> 8734 bytes .../latex/classWarpPattern__coll__graph.pdf | Bin 10898 -> 10898 bytes .../classWarpPattern__inherit__graph.pdf | Bin 8087 -> 8087 bytes .../classWarpWormPattern__coll__graph.pdf | Bin 10904 -> 10904 bytes .../classWarpWormPattern__inherit__graph.pdf | Bin 8404 -> 8404 bytes ...assZigzagPattern_1_1Snake__coll__graph.pdf | Bin 9467 -> 9467 bytes .../latex/classZigzagPattern__coll__graph.pdf | Bin 11786 -> 11786 bytes .../classZigzagPattern__inherit__graph.pdf | Bin 7152 -> 7152 bytes ...r_1d79b4615f725ce6e1b38311d89b4d4f_dep.pdf | Bin 18107 -> 18107 bytes ...r_47fec278782816999705227d1066c7a6_dep.pdf | Bin 27862 -> 27862 bytes ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.md5 | 2 +- ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.pdf | Bin 29652 -> 29164 bytes ...r_60d51ee7315d72413f26211ac43a217e_dep.pdf | Bin 11895 -> 11895 bytes .../dir_61b212e579fd471c490a116dc3a4c8cf.tex | 2 +- ...r_61b212e579fd471c490a116dc3a4c8cf_dep.md5 | 2 +- ...r_61b212e579fd471c490a116dc3a4c8cf_dep.pdf | Bin 13303 -> 12349 bytes ...r_63ce3ba067bdf35a8f7c780ac03d51a3_dep.pdf | Bin 11519 -> 11519 bytes ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.pdf | Bin 40298 -> 39813 bytes ...r_7e29431de6169dbb5f5ee7a990ed2b16_dep.pdf | Bin 7812 -> 7812 bytes ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.pdf | Bin 41349 -> 41043 bytes ...r_938e62fdb5540a46e6e0c12f6b77804d_dep.pdf | Bin 11867 -> 11867 bytes ...r_9a5c88f87170865d940dc95c76676edb_dep.pdf | Bin 10349 -> 10349 bytes ...r_cabf3d63e98569a74ecb960b83c4a15b_dep.pdf | Bin 13013 -> 13013 bytes ...r_ce91f970b513fb5ff406625265505b14_dep.pdf | Bin 13870 -> 13870 bytes ...r_cfa97f0e2c08f470d5e70542e8b74b9a_dep.pdf | Bin 6963 -> 6963 bytes ...r_d3731d706719beb3d6001df5dcff2644_dep.pdf | Bin 25827 -> 25827 bytes ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.pdf | Bin 41503 -> 41025 bytes ...r_fa5f32c9390e3ea098144f298be2a395_dep.pdf | Bin 22633 -> 22633 bytes ...r_ff5a4dc0324506fcdfb8f8f681f9dae7_dep.pdf | Bin 9962 -> 9962 bytes .../structDefaultModeEntry__coll__graph.pdf | Bin 7333 -> 7333 bytes .../latex/structMenuEntry__coll__graph.pdf | Bin 11079 -> 11079 bytes docs/duo/navtreedata.js | 10 +- docs/duo/navtreeindex0.js | 2 +- docs/duo/navtreeindex3.js | 80 +- docs/duo/navtreeindex4.js | 6 +- docs/duo/navtreeindex5.js | 6 +- docs/duo/navtreeindex6.js | 6 +- docs/duo/navtreeindex7.js | 8 +- docs/duo/navtreeindex8.js | 8 +- docs/duo/search/all_10.js | 2 +- docs/duo/search/all_11.js | 330 +-- docs/duo/search/all_12.js | 316 +-- docs/duo/search/all_13.js | 60 +- docs/duo/search/all_14.js | 24 +- docs/duo/search/all_15.js | 136 +- docs/duo/search/all_16.js | 26 +- docs/duo/search/all_17.js | 6 +- docs/duo/search/all_18.js | 90 +- docs/duo/search/all_4.js | 2 +- docs/duo/search/all_8.js | 4 +- docs/duo/search/all_9.js | 2 +- docs/duo/search/all_c.js | 147 +- docs/duo/search/all_d.js | 39 +- docs/duo/search/all_e.js | 72 +- docs/duo/search/all_f.js | 234 +- docs/duo/search/classes_0.js | 18 +- docs/duo/search/classes_1.js | 12 +- docs/duo/search/classes_2.js | 10 +- docs/duo/search/classes_3.js | 2 +- docs/duo/search/classes_4.js | 4 +- docs/duo/search/classes_5.js | 2 +- docs/duo/search/classes_6.js | 4 +- docs/duo/search/classes_7.js | 6 +- docs/duo/search/classes_8.js | 20 +- docs/duo/search/classes_9.js | 12 +- docs/duo/search/classes_a.js | 8 +- docs/duo/search/classes_b.js | 20 +- docs/duo/search/classes_c.js | 6 +- docs/duo/search/classes_d.js | 8 +- docs/duo/search/classes_e.js | 4 +- docs/duo/search/classes_f.js | 2 +- docs/duo/search/defines_0.js | 46 +- docs/duo/search/defines_1.js | 28 +- docs/duo/search/defines_10.js | 24 +- docs/duo/search/defines_11.js | 6 +- docs/duo/search/defines_12.js | 84 +- docs/duo/search/defines_13.js | 2 +- docs/duo/search/defines_2.js | 24 +- docs/duo/search/defines_3.js | 28 +- docs/duo/search/defines_4.js | 52 +- docs/duo/search/defines_5.js | 14 +- docs/duo/search/defines_6.js | 48 +- docs/duo/search/defines_7.js | 60 +- docs/duo/search/defines_8.js | 10 +- docs/duo/search/defines_9.js | 32 +- docs/duo/search/defines_a.js | 77 +- docs/duo/search/defines_b.js | 11 +- docs/duo/search/defines_c.js | 4 +- docs/duo/search/defines_d.js | 30 +- docs/duo/search/defines_e.js | 202 +- docs/duo/search/defines_f.js | 48 +- docs/duo/search/enums_0.js | 6 +- docs/duo/search/enums_1.js | 2 +- docs/duo/search/enums_2.js | 2 +- docs/duo/search/enums_3.js | 2 +- docs/duo/search/enums_4.js | 2 +- docs/duo/search/enums_5.js | 8 +- docs/duo/search/enums_6.js | 6 +- docs/duo/search/enums_7.js | 4 +- docs/duo/search/enums_8.js | 2 +- docs/duo/search/enumvalues_0.js | 2 +- docs/duo/search/enumvalues_1.js | 2 +- docs/duo/search/enumvalues_2.js | 22 +- docs/duo/search/enumvalues_3.js | 2 +- docs/duo/search/enumvalues_4.js | 10 +- docs/duo/search/enumvalues_5.js | 18 +- docs/duo/search/enumvalues_6.js | 32 +- docs/duo/search/enumvalues_7.js | 136 +- docs/duo/search/enumvalues_8.js | 12 +- docs/duo/search/enumvalues_9.js | 64 +- docs/duo/search/enumvalues_a.js | 4 +- docs/duo/search/enumvalues_b.js | 16 +- docs/duo/search/enumvalues_c.js | 4 +- docs/duo/search/files_0.js | 36 +- docs/duo/search/files_1.js | 30 +- docs/duo/search/files_10.js | 4 +- docs/duo/search/files_2.js | 16 +- docs/duo/search/files_3.js | 8 +- docs/duo/search/files_4.js | 8 +- docs/duo/search/files_5.js | 4 +- docs/duo/search/files_6.js | 4 +- docs/duo/search/files_7.js | 10 +- docs/duo/search/files_8.js | 18 +- docs/duo/search/files_9.js | 36 +- docs/duo/search/files_a.js | 22 +- docs/duo/search/files_b.js | 8 +- docs/duo/search/files_c.js | 32 +- docs/duo/search/files_d.js | 14 +- docs/duo/search/files_e.js | 20 +- docs/duo/search/files_f.js | 8 +- docs/duo/search/functions_0.js | 6 +- docs/duo/search/functions_1.js | 38 +- docs/duo/search/functions_10.js | 2 +- docs/duo/search/functions_11.js | 102 +- docs/duo/search/functions_12.js | 164 +- docs/duo/search/functions_13.js | 16 +- docs/duo/search/functions_14.js | 18 +- docs/duo/search/functions_15.js | 10 +- docs/duo/search/functions_16.js | 12 +- docs/duo/search/functions_17.js | 2 +- docs/duo/search/functions_18.js | 90 +- docs/duo/search/functions_2.js | 64 +- docs/duo/search/functions_3.js | 98 +- docs/duo/search/functions_4.js | 30 +- docs/duo/search/functions_5.js | 22 +- docs/duo/search/functions_6.js | 10 +- docs/duo/search/functions_7.js | 52 +- docs/duo/search/functions_8.js | 30 +- docs/duo/search/functions_9.js | 40 +- docs/duo/search/functions_a.js | 2 +- docs/duo/search/functions_b.js | 28 +- docs/duo/search/functions_c.js | 40 +- docs/duo/search/functions_d.js | 24 +- docs/duo/search/functions_e.js | 64 +- docs/duo/search/functions_f.js | 36 +- docs/duo/search/related_0.js | 2 +- docs/duo/search/related_1.js | 2 +- docs/duo/search/related_2.js | 2 +- docs/duo/search/typedefs_0.js | 4 +- docs/duo/search/typedefs_1.js | 2 +- docs/duo/search/typedefs_2.js | 2 +- docs/duo/search/typedefs_3.js | 2 +- docs/duo/search/variables_0.js | 18 +- docs/duo/search/variables_1.js | 10 +- docs/duo/search/variables_10.js | 4 +- docs/duo/search/variables_2.js | 8 +- docs/duo/search/variables_3.js | 4 +- docs/duo/search/variables_4.js | 2 +- docs/duo/search/variables_5.js | 10 +- docs/duo/search/variables_6.js | 2 +- docs/duo/search/variables_7.js | 2 +- docs/duo/search/variables_8.js | 4 +- docs/duo/search/variables_9.js | 314 +-- docs/duo/search/variables_a.js | 6 +- docs/duo/search/variables_b.js | 4 +- docs/duo/search/variables_c.js | 2 +- docs/duo/search/variables_d.js | 2 +- docs/duo/search/variables_e.js | 10 +- docs/duo/search/variables_f.js | 2 +- docs/gloves/BlendPattern_8cpp_source.html | 4 +- docs/gloves/Buttons_8h_source.html | 2 +- docs/gloves/ColorSelect_8cpp_source.html | 2 +- docs/gloves/ColorSelect_8h_source.html | 16 +- docs/gloves/ColorTypes_8cpp.html | 2 +- docs/gloves/ColorTypes_8cpp_source.html | 2 +- docs/gloves/ColorTypes_8h.html | 2 +- docs/gloves/DefaultModes_8cpp.html | 18 +- docs/gloves/DefaultModes_8cpp.js | 2 +- docs/gloves/DefaultModes_8cpp_source.html | 7 +- docs/gloves/DefaultModes_8h.html | 14 +- docs/gloves/DefaultModes_8h.js | 2 +- docs/gloves/DefaultModes_8h_source.html | 5 +- docs/gloves/EditorConnection_8cpp_source.html | 30 +- docs/gloves/FactoryReset_8cpp_source.html | 12 +- docs/gloves/GlobalBrightness_8h_source.html | 8 +- docs/gloves/Log_8h_source.html | 2 +- docs/gloves/Memory_8cpp_source.html | 2 +- docs/gloves/Menu_8cpp_source.html | 6 +- docs/gloves/Menus_8cpp.html | 16 +- docs/gloves/Menus_8cpp__incl.md5 | 2 +- docs/gloves/Menus_8cpp__incl.svg | 502 +++-- docs/gloves/Menus_8cpp__incl_org.svg | 504 +++-- docs/gloves/Menus_8cpp_source.html | 16 +- docs/gloves/ModeSharing_8cpp_source.html | 4 +- docs/gloves/Modes_8cpp_source.html | 1905 +++++++++-------- docs/gloves/Modes_8h_source.html | 245 +-- docs/gloves/PatternBuilder_8cpp_source.html | 12 +- docs/gloves/PatternSelect_8cpp__incl.md5 | 2 +- docs/gloves/PatternSelect_8cpp__incl.svg | 458 ++-- docs/gloves/PatternSelect_8cpp__incl_org.svg | 460 ++-- docs/gloves/PatternSelect_8cpp_source.html | 12 +- docs/gloves/PatternSelect_8h.html | 3 +- docs/gloves/PatternSelect_8h__incl.md5 | 2 +- docs/gloves/PatternSelect_8h__incl.svg | 152 +- docs/gloves/PatternSelect_8h_source.html | 115 +- docs/gloves/Patterns_8h__dep__incl.md5 | 2 +- docs/gloves/Patterns_8h__dep__incl.svg | 1226 ++++++----- docs/gloves/Patterns_8h__dep__incl_org.svg | 1228 ++++++----- docs/gloves/Randomizer_8cpp_source.html | 4 +- docs/gloves/Storage_8cpp.html | 7 +- docs/gloves/Storage_8cpp__incl.md5 | 2 +- docs/gloves/Storage_8cpp__incl.svg | 147 +- docs/gloves/Storage_8cpp__incl_org.svg | 149 +- docs/gloves/Storage_8cpp_source.html | 402 ++-- docs/gloves/Storage_8h_source.html | 16 +- docs/gloves/TimeControl_8cpp_source.html | 4 +- docs/gloves/Timings_8h_source.html | 22 +- docs/gloves/VortexConfig_8h.html | 164 +- docs/gloves/VortexConfig_8h.js | 2 + docs/gloves/VortexConfig_8h_source.html | 861 ++++---- docs/gloves/VortexEngine_8cpp_source.html | 26 +- docs/gloves/classBlendPattern.html | 4 +- docs/gloves/classByteStream.html | 26 +- docs/gloves/classColorSelect.html | 26 +- docs/gloves/classColorset.html | 2 +- docs/gloves/classEditorConnection.html | 40 +- docs/gloves/classFactoryReset.html | 16 +- docs/gloves/classGlobalBrightness.html | 8 +- docs/gloves/classLeds.html | 6 +- docs/gloves/classMenu.html | 12 +- docs/gloves/classMode.html | 12 +- docs/gloves/classModeSharing.html | 10 +- docs/gloves/classModes-members.html | 24 +- docs/gloves/classModes.html | 1409 ++++++------ docs/gloves/classModes.js | 2 + docs/gloves/classModes_1_1ModeLink.html | 426 ++-- docs/gloves/classPatternBuilder.html | 12 +- docs/gloves/classPatternSelect.html | 48 +- docs/gloves/classRandomizer.html | 8 +- docs/gloves/classStorage-members.html | 4 +- docs/gloves/classStorage.html | 382 ++-- docs/gloves/classStorage.js | 4 +- docs/gloves/classTime.html | 10 +- docs/gloves/classVortexEngine.html | 28 +- docs/gloves/dir_000007_000010.html | 2 +- docs/gloves/dir_000008_000010.html | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.svg | 4 +- ...b4510cba155c652ac883383ddf0b92_dep_org.svg | 4 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.svg | 4 +- ...4d93e079ad601e0006c23ac3d37255_dep_org.svg | 4 +- ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.svg | 4 +- ...02266255841645c523fab960c9ed1d_dep_org.svg | 4 +- docs/gloves/functions_func_r.html | 2 +- docs/gloves/functions_func_s.html | 3 + docs/gloves/functions_func_u.html | 3 + docs/gloves/functions_func_w.html | 2 +- docs/gloves/functions_r.html | 2 +- docs/gloves/functions_s.html | 3 + docs/gloves/functions_u.html | 3 + docs/gloves/functions_w.html | 2 +- docs/gloves/globals_d.html | 4 +- docs/gloves/globals_defs_m.html | 3 + docs/gloves/globals_defs_n.html | 3 + docs/gloves/globals_h.html | 6 +- docs/gloves/globals_m.html | 3 + docs/gloves/globals_n.html | 3 + docs/gloves/globals_vars.html | 4 +- .../latex/BackStrobePattern_8cpp__incl.pdf | Bin 19609 -> 19609 bytes .../latex/BackStrobePattern_8h__dep__incl.pdf | Bin 8990 -> 8990 bytes .../latex/BackStrobePattern_8h__incl.pdf | Bin 19199 -> 19199 bytes docs/gloves/latex/BasicPattern_8cpp__incl.pdf | Bin 18474 -> 18474 bytes .../latex/BasicPattern_8h__dep__incl.pdf | Bin 10268 -> 10268 bytes docs/gloves/latex/BasicPattern_8h__incl.pdf | Bin 16696 -> 16696 bytes docs/gloves/latex/BitStream_8cpp__incl.pdf | Bin 14960 -> 14960 bytes docs/gloves/latex/BitStream_8h__dep__incl.pdf | Bin 14558 -> 14558 bytes docs/gloves/latex/BitStream_8h__incl.pdf | Bin 7839 -> 7839 bytes docs/gloves/latex/BlendPattern_8cpp__incl.pdf | Bin 19506 -> 19506 bytes .../latex/BlendPattern_8h__dep__incl.pdf | Bin 8479 -> 8479 bytes docs/gloves/latex/BlendPattern_8h__incl.pdf | Bin 18611 -> 18611 bytes .../latex/BlinkStepPattern_8cpp__incl.pdf | Bin 20727 -> 20727 bytes .../latex/BlinkStepPattern_8h__dep__incl.pdf | Bin 22184 -> 22184 bytes .../latex/BlinkStepPattern_8h__incl.pdf | Bin 17291 -> 17291 bytes .../gloves/latex/BouncePattern_8cpp__incl.pdf | Bin 22194 -> 22194 bytes .../latex/BouncePattern_8h__dep__incl.pdf | Bin 8495 -> 8495 bytes docs/gloves/latex/BouncePattern_8h__incl.pdf | Bin 18897 -> 18897 bytes docs/gloves/latex/Button_8cpp__incl.pdf | Bin 16102 -> 16102 bytes docs/gloves/latex/Button_8h__dep__incl.pdf | Bin 14055 -> 14055 bytes docs/gloves/latex/Button_8h__incl.pdf | Bin 7272 -> 7272 bytes docs/gloves/latex/Buttons_8cpp__incl.pdf | Bin 14843 -> 14843 bytes docs/gloves/latex/Buttons_8h__dep__incl.pdf | Bin 8434 -> 8434 bytes docs/gloves/latex/Buttons_8h__incl.pdf | Bin 7755 -> 7755 bytes docs/gloves/latex/ByteStream_8cpp__incl.pdf | Bin 16492 -> 16492 bytes .../gloves/latex/ByteStream_8h__dep__incl.pdf | Bin 29529 -> 29529 bytes docs/gloves/latex/ByteStream_8h__incl.pdf | Bin 13600 -> 13600 bytes .../gloves/latex/ChaserPattern_8cpp__incl.pdf | Bin 19369 -> 19369 bytes .../latex/ChaserPattern_8h__dep__incl.pdf | Bin 8941 -> 8941 bytes docs/gloves/latex/ChaserPattern_8h__incl.pdf | Bin 18940 -> 18940 bytes .../latex/ColorConstants_8h__dep__incl.pdf | Bin 45140 -> 45140 bytes docs/gloves/latex/ColorSelect_8cpp__incl.pdf | Bin 22669 -> 22669 bytes .../latex/ColorSelect_8h__dep__incl.pdf | Bin 8219 -> 8219 bytes docs/gloves/latex/ColorSelect_8h__incl.pdf | Bin 15983 -> 15983 bytes docs/gloves/latex/ColorTypes_8cpp.tex | 2 +- docs/gloves/latex/ColorTypes_8cpp__incl.pdf | Bin 14907 -> 14907 bytes docs/gloves/latex/ColorTypes_8h.tex | 2 +- .../gloves/latex/ColorTypes_8h__dep__incl.pdf | Bin 35495 -> 35495 bytes docs/gloves/latex/ColorTypes_8h__incl.pdf | Bin 11798 -> 11798 bytes docs/gloves/latex/Colorset_8cpp__incl.pdf | Bin 17016 -> 17016 bytes docs/gloves/latex/Colorset_8h__dep__incl.pdf | Bin 34954 -> 34954 bytes docs/gloves/latex/Colorset_8h__incl.pdf | Bin 12266 -> 12266 bytes .../latex/CompoundPattern_8cpp__incl.pdf | Bin 17934 -> 17934 bytes .../latex/CompoundPattern_8h__dep__incl.pdf | Bin 12017 -> 12017 bytes .../gloves/latex/CompoundPattern_8h__incl.pdf | Bin 16042 -> 16042 bytes docs/gloves/latex/Compression_8cpp__incl.pdf | Bin 14103 -> 14103 bytes .../latex/Compression_8h__dep__incl.pdf | Bin 8797 -> 8797 bytes docs/gloves/latex/Compression_8h__incl.pdf | Bin 12355 -> 12355 bytes .../latex/CrossDopsPattern_8cpp__incl.pdf | Bin 20407 -> 20407 bytes .../latex/CrossDopsPattern_8h__dep__incl.pdf | Bin 8754 -> 8754 bytes .../latex/CrossDopsPattern_8h__incl.pdf | Bin 18991 -> 18991 bytes docs/gloves/latex/DefaultModes_8cpp.tex | 10 +- docs/gloves/latex/DefaultModes_8cpp__incl.pdf | Bin 14003 -> 14003 bytes docs/gloves/latex/DefaultModes_8h.tex | 6 +- .../latex/DefaultModes_8h__dep__incl.pdf | Bin 9608 -> 9608 bytes docs/gloves/latex/DefaultModes_8h__incl.pdf | Bin 12757 -> 12757 bytes .../latex/DoubleStrobePattern_8cpp__incl.pdf | Bin 21717 -> 21717 bytes .../DoubleStrobePattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../latex/DoubleStrobePattern_8h__incl.pdf | Bin 19095 -> 19095 bytes .../latex/DripMorphPattern_8cpp__incl.pdf | Bin 21194 -> 21194 bytes .../latex/DripMorphPattern_8h__dep__incl.pdf | Bin 8620 -> 8620 bytes .../latex/DripMorphPattern_8h__incl.pdf | Bin 18245 -> 18245 bytes docs/gloves/latex/DripPattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes .../latex/DripPattern_8h__dep__incl.pdf | Bin 8601 -> 8601 bytes docs/gloves/latex/DripPattern_8h__incl.pdf | Bin 18995 -> 18995 bytes .../latex/EditorConnection_8cpp__incl.pdf | Bin 22985 -> 22985 bytes .../latex/EditorConnection_8h__dep__incl.pdf | Bin 8095 -> 8095 bytes .../latex/EditorConnection_8h__incl.pdf | Bin 17750 -> 17750 bytes docs/gloves/latex/ErrorBlinker_8cpp__incl.pdf | Bin 12414 -> 12414 bytes .../latex/ErrorBlinker_8h__dep__incl.pdf | Bin 35746 -> 35746 bytes docs/gloves/latex/ErrorBlinker_8h__incl.pdf | Bin 12008 -> 12008 bytes docs/gloves/latex/FactoryReset_8cpp__incl.pdf | Bin 23799 -> 23799 bytes .../latex/FactoryReset_8h__dep__incl.pdf | Bin 8784 -> 8784 bytes docs/gloves/latex/FactoryReset_8h__incl.pdf | Bin 15519 -> 15519 bytes docs/gloves/latex/FillPattern_8cpp__incl.pdf | Bin 22244 -> 22244 bytes .../latex/FillPattern_8h__dep__incl.pdf | Bin 8558 -> 8558 bytes docs/gloves/latex/FillPattern_8h__incl.pdf | Bin 18959 -> 18959 bytes .../latex/GlobalBrightness_8cpp__incl.pdf | Bin 20697 -> 20697 bytes .../latex/GlobalBrightness_8h__dep__incl.pdf | Bin 8577 -> 8577 bytes .../latex/GlobalBrightness_8h__incl.pdf | Bin 15625 -> 15625 bytes .../latex/HueShiftPattern_8cpp__incl.pdf | Bin 21424 -> 21424 bytes .../latex/HueShiftPattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../gloves/latex/HueShiftPattern_8h__incl.pdf | Bin 18557 -> 18557 bytes docs/gloves/latex/IRConfig_8h__dep__incl.pdf | Bin 14606 -> 14606 bytes docs/gloves/latex/IRReceiver_8cpp__incl.pdf | Bin 19593 -> 19593 bytes .../gloves/latex/IRReceiver_8h__dep__incl.pdf | Bin 9765 -> 9765 bytes docs/gloves/latex/IRReceiver_8h__incl.pdf | Bin 13067 -> 13067 bytes docs/gloves/latex/IRSender_8cpp__incl.pdf | Bin 19177 -> 19177 bytes docs/gloves/latex/IRSender_8h__dep__incl.pdf | Bin 9531 -> 9531 bytes docs/gloves/latex/IRSender_8h__incl.pdf | Bin 15496 -> 15496 bytes docs/gloves/latex/LedStash_8cpp__incl.pdf | Bin 13558 -> 13558 bytes docs/gloves/latex/LedStash_8h__dep__incl.pdf | Bin 10881 -> 10881 bytes docs/gloves/latex/LedStash_8h__incl.pdf | Bin 13161 -> 13161 bytes docs/gloves/latex/LedTypes_8h__dep__incl.pdf | Bin 38170 -> 38170 bytes docs/gloves/latex/LedTypes_8h__incl.pdf | Bin 11941 -> 11941 bytes docs/gloves/latex/Leds_8cpp__incl.pdf | Bin 19333 -> 19333 bytes docs/gloves/latex/Leds_8h__dep__incl.pdf | Bin 29540 -> 29540 bytes docs/gloves/latex/Leds_8h__incl.pdf | Bin 13061 -> 13061 bytes .../latex/LighthousePattern_8cpp__incl.pdf | Bin 22952 -> 22952 bytes .../latex/LighthousePattern_8h__dep__incl.pdf | Bin 8578 -> 8578 bytes .../latex/LighthousePattern_8h__incl.pdf | Bin 20015 -> 20015 bytes docs/gloves/latex/Log_8cpp__incl.pdf | Bin 15587 -> 15587 bytes docs/gloves/latex/Log_8h__dep__incl.pdf | Bin 35755 -> 35755 bytes docs/gloves/latex/Log_8h__incl.pdf | Bin 12688 -> 12688 bytes .../latex/MateriaPattern_8cpp__incl.pdf | Bin 21360 -> 21360 bytes .../latex/MateriaPattern_8h__dep__incl.pdf | Bin 8499 -> 8499 bytes docs/gloves/latex/MateriaPattern_8h__incl.pdf | Bin 17935 -> 17935 bytes docs/gloves/latex/Memory_8cpp__incl.pdf | Bin 14354 -> 14354 bytes docs/gloves/latex/Memory_8h__dep__incl.pdf | Bin 14350 -> 14350 bytes docs/gloves/latex/Memory_8h__incl.pdf | Bin 12212 -> 12212 bytes docs/gloves/latex/Menu_8cpp__incl.pdf | Bin 21451 -> 21451 bytes docs/gloves/latex/Menu_8h__dep__incl.pdf | Bin 16349 -> 16349 bytes docs/gloves/latex/Menu_8h__incl.pdf | Bin 14755 -> 14755 bytes docs/gloves/latex/Menus_8cpp__incl.md5 | 2 +- docs/gloves/latex/Menus_8cpp__incl.pdf | Bin 28474 -> 28202 bytes docs/gloves/latex/Menus_8h__dep__incl.pdf | Bin 11751 -> 11751 bytes docs/gloves/latex/Menus_8h__incl.pdf | Bin 14760 -> 14760 bytes .../gloves/latex/MeteorPattern_8cpp__incl.pdf | Bin 22534 -> 22534 bytes .../latex/MeteorPattern_8h__dep__incl.pdf | Bin 8493 -> 8493 bytes docs/gloves/latex/MeteorPattern_8h__incl.pdf | Bin 20141 -> 20141 bytes docs/gloves/latex/ModeSharing_8cpp__incl.pdf | Bin 24660 -> 24660 bytes .../latex/ModeSharing_8h__dep__incl.pdf | Bin 8409 -> 8409 bytes docs/gloves/latex/ModeSharing_8h__incl.pdf | Bin 15397 -> 15397 bytes docs/gloves/latex/Mode_8cpp__incl.pdf | Bin 23012 -> 23012 bytes docs/gloves/latex/Mode_8h__dep__incl.pdf | Bin 22306 -> 22306 bytes docs/gloves/latex/Mode_8h__incl.pdf | Bin 13260 -> 13260 bytes docs/gloves/latex/Modes_8cpp__incl.pdf | Bin 24409 -> 24409 bytes docs/gloves/latex/Modes_8h__dep__incl.pdf | Bin 14402 -> 14402 bytes docs/gloves/latex/Modes_8h__incl.pdf | Bin 17165 -> 17165 bytes .../latex/MultiLedPattern_8cpp__incl.pdf | Bin 15879 -> 15879 bytes .../latex/MultiLedPattern_8h__dep__incl.pdf | Bin 32353 -> 32353 bytes .../gloves/latex/MultiLedPattern_8h__incl.pdf | Bin 15504 -> 15504 bytes docs/gloves/latex/PatternArgs_8cpp__incl.pdf | Bin 14799 -> 14799 bytes .../latex/PatternArgs_8h__dep__incl.pdf | Bin 33456 -> 33456 bytes docs/gloves/latex/PatternArgs_8h__incl.pdf | Bin 7593 -> 7593 bytes .../latex/PatternBuilder_8cpp__incl.pdf | Bin 41365 -> 41365 bytes .../latex/PatternBuilder_8h__dep__incl.pdf | Bin 11726 -> 11726 bytes docs/gloves/latex/PatternBuilder_8h__incl.pdf | Bin 8291 -> 8291 bytes .../gloves/latex/PatternSelect_8cpp__incl.md5 | 2 +- .../gloves/latex/PatternSelect_8cpp__incl.pdf | Bin 24939 -> 25125 bytes docs/gloves/latex/PatternSelect_8h.tex | 1 - .../latex/PatternSelect_8h__dep__incl.pdf | Bin 8459 -> 8459 bytes docs/gloves/latex/PatternSelect_8h__incl.md5 | 2 +- docs/gloves/latex/PatternSelect_8h__incl.pdf | Bin 15922 -> 16045 bytes docs/gloves/latex/Pattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/gloves/latex/Pattern_8h__dep__incl.pdf | Bin 33277 -> 33277 bytes docs/gloves/latex/Pattern_8h__incl.pdf | Bin 14778 -> 14778 bytes docs/gloves/latex/Patterns_8h__dep__incl.md5 | 2 +- docs/gloves/latex/Patterns_8h__dep__incl.pdf | Bin 36569 -> 36434 bytes docs/gloves/latex/Patterns_8h__incl.pdf | Bin 7396 -> 7396 bytes .../latex/PulsishPattern_8cpp__incl.pdf | Bin 18966 -> 18966 bytes .../latex/PulsishPattern_8h__dep__incl.pdf | Bin 8502 -> 8502 bytes docs/gloves/latex/PulsishPattern_8h__incl.pdf | Bin 18154 -> 18154 bytes docs/gloves/latex/Random_8cpp__incl.pdf | Bin 7878 -> 7878 bytes docs/gloves/latex/Random_8h__dep__incl.pdf | Bin 13199 -> 13199 bytes docs/gloves/latex/Random_8h__incl.pdf | Bin 7285 -> 7285 bytes docs/gloves/latex/Randomizer_8cpp__incl.pdf | Bin 26121 -> 26121 bytes .../gloves/latex/Randomizer_8h__dep__incl.pdf | Bin 8783 -> 8783 bytes docs/gloves/latex/Randomizer_8h__incl.pdf | Bin 16400 -> 16400 bytes docs/gloves/latex/Sequence_8cpp__incl.pdf | Bin 19446 -> 19446 bytes docs/gloves/latex/Sequence_8h__dep__incl.pdf | Bin 10764 -> 10764 bytes docs/gloves/latex/Sequence_8h__incl.pdf | Bin 15466 -> 15466 bytes .../latex/SequencedPattern_8cpp__incl.pdf | Bin 22416 -> 22416 bytes .../latex/SequencedPattern_8h__dep__incl.pdf | Bin 9845 -> 9845 bytes .../latex/SequencedPattern_8h__incl.pdf | Bin 18493 -> 18493 bytes docs/gloves/latex/Serial_8cpp__incl.pdf | Bin 17420 -> 17420 bytes docs/gloves/latex/Serial_8h__dep__incl.pdf | Bin 10309 -> 10309 bytes docs/gloves/latex/Serial_8h__incl.pdf | Bin 7505 -> 7505 bytes .../latex/SingleLedPattern_8cpp__incl.pdf | Bin 16663 -> 16663 bytes .../latex/SingleLedPattern_8h__dep__incl.pdf | Bin 13276 -> 13276 bytes .../latex/SingleLedPattern_8h__incl.pdf | Bin 15365 -> 15365 bytes .../latex/SnowballPattern_8cpp__incl.pdf | Bin 20814 -> 20814 bytes .../latex/SnowballPattern_8h__dep__incl.pdf | Bin 9226 -> 9226 bytes .../gloves/latex/SnowballPattern_8h__incl.pdf | Bin 19421 -> 19421 bytes docs/gloves/latex/SolidPattern_8cpp__incl.pdf | Bin 18999 -> 18999 bytes .../latex/SolidPattern_8h__dep__incl.pdf | Bin 8476 -> 8476 bytes docs/gloves/latex/SolidPattern_8h__incl.pdf | Bin 18606 -> 18606 bytes .../latex/SparkleTracePattern_8cpp__incl.pdf | Bin 21304 -> 21304 bytes .../SparkleTracePattern_8h__dep__incl.pdf | Bin 9019 -> 9019 bytes .../latex/SparkleTracePattern_8h__incl.pdf | Bin 18507 -> 18507 bytes docs/gloves/latex/Storage_8cpp.tex | 7 +- docs/gloves/latex/Storage_8cpp__incl.md5 | 2 +- docs/gloves/latex/Storage_8cpp__incl.pdf | Bin 16304 -> 16236 bytes docs/gloves/latex/Storage_8h__dep__incl.pdf | Bin 9398 -> 9398 bytes docs/gloves/latex/Storage_8h__incl.pdf | Bin 7462 -> 7462 bytes .../latex/TheaterChasePattern_8cpp__incl.pdf | Bin 20340 -> 20340 bytes .../TheaterChasePattern_8h__dep__incl.pdf | Bin 8766 -> 8766 bytes .../latex/TheaterChasePattern_8h__incl.pdf | Bin 18888 -> 18888 bytes docs/gloves/latex/TimeControl_8cpp__incl.pdf | Bin 17961 -> 17961 bytes .../latex/TimeControl_8h__dep__incl.pdf | Bin 33673 -> 33673 bytes docs/gloves/latex/TimeControl_8h__incl.pdf | Bin 12706 -> 12706 bytes docs/gloves/latex/Timer_8cpp__incl.pdf | Bin 16198 -> 16198 bytes docs/gloves/latex/Timer_8h__dep__incl.pdf | Bin 32947 -> 32947 bytes docs/gloves/latex/Timer_8h__incl.pdf | Bin 12621 -> 12621 bytes docs/gloves/latex/Timings_8h__dep__incl.pdf | Bin 32873 -> 32873 bytes docs/gloves/latex/Timings_8h__incl.pdf | Bin 13184 -> 13184 bytes docs/gloves/latex/VLConfig_8h__dep__incl.pdf | Bin 13273 -> 13273 bytes docs/gloves/latex/VLConfig_8h__incl.pdf | Bin 11380 -> 11380 bytes docs/gloves/latex/VLReceiver_8cpp__incl.pdf | Bin 21081 -> 21081 bytes .../gloves/latex/VLReceiver_8h__dep__incl.pdf | Bin 8422 -> 8422 bytes docs/gloves/latex/VLReceiver_8h__incl.pdf | Bin 13865 -> 13865 bytes docs/gloves/latex/VLSender_8cpp__incl.pdf | Bin 19835 -> 19835 bytes docs/gloves/latex/VLSender_8h__dep__incl.pdf | Bin 8260 -> 8260 bytes docs/gloves/latex/VLSender_8h__incl.pdf | Bin 15366 -> 15366 bytes docs/gloves/latex/VortexConfig_8h.tex | 152 +- .../latex/VortexConfig_8h__dep__incl.pdf | Bin 43912 -> 43912 bytes docs/gloves/latex/VortexConfig_8h__incl.pdf | Bin 10535 -> 10535 bytes docs/gloves/latex/VortexEngine_8cpp__incl.pdf | Bin 27342 -> 27342 bytes .../latex/VortexEngine_8h__dep__incl.pdf | Bin 10749 -> 10749 bytes docs/gloves/latex/VortexEngine_8h__incl.pdf | Bin 11553 -> 11553 bytes .../latex/VortexWipePattern_8cpp__incl.pdf | Bin 22508 -> 22508 bytes .../latex/VortexWipePattern_8h__dep__incl.pdf | Bin 8865 -> 8865 bytes .../latex/VortexWipePattern_8h__incl.pdf | Bin 19226 -> 19226 bytes docs/gloves/latex/WarpPattern_8cpp__incl.pdf | Bin 22532 -> 22532 bytes .../latex/WarpPattern_8h__dep__incl.pdf | Bin 8847 -> 8847 bytes docs/gloves/latex/WarpPattern_8h__incl.pdf | Bin 19244 -> 19244 bytes .../latex/WarpWormPattern_8cpp__incl.pdf | Bin 22522 -> 22522 bytes .../latex/WarpWormPattern_8h__dep__incl.pdf | Bin 9016 -> 9016 bytes .../gloves/latex/WarpWormPattern_8h__incl.pdf | Bin 19238 -> 19238 bytes .../gloves/latex/ZigzagPattern_8cpp__incl.pdf | Bin 20748 -> 20748 bytes .../latex/ZigzagPattern_8h__dep__incl.pdf | Bin 8811 -> 8811 bytes docs/gloves/latex/ZigzagPattern_8h__incl.pdf | Bin 18450 -> 18450 bytes .../classBackStrobePattern__coll__graph.pdf | Bin 15115 -> 15115 bytes ...classBackStrobePattern__inherit__graph.pdf | Bin 8397 -> 8397 bytes .../latex/classBasicPattern__coll__graph.pdf | Bin 9987 -> 9987 bytes .../classBasicPattern__inherit__graph.pdf | Bin 8228 -> 8228 bytes docs/gloves/latex/classBlendPattern.tex | 4 +- .../latex/classBlendPattern__coll__graph.pdf | Bin 11011 -> 11011 bytes .../classBlendPattern__inherit__graph.pdf | Bin 7680 -> 7680 bytes .../classBlinkStepPattern__coll__graph.pdf | Bin 10148 -> 10148 bytes .../classBlinkStepPattern__inherit__graph.pdf | Bin 15604 -> 15604 bytes .../latex/classBouncePattern__coll__graph.pdf | Bin 10530 -> 10530 bytes .../classBouncePattern__inherit__graph.pdf | Bin 8009 -> 8009 bytes .../latex/classButtons__coll__graph.pdf | Bin 6040 -> 6040 bytes docs/gloves/latex/classByteStream.tex | 12 +- .../latex/classByteStream__coll__graph.pdf | Bin 10774 -> 10774 bytes .../latex/classChaserPattern__coll__graph.pdf | Bin 13345 -> 13345 bytes .../classChaserPattern__inherit__graph.pdf | Bin 8726 -> 8726 bytes .../latex/classColorSelect__coll__graph.pdf | Bin 11626 -> 11626 bytes .../classColorSelect__inherit__graph.pdf | Bin 6229 -> 6229 bytes .../latex/classColorsetMap__coll__graph.pdf | Bin 7737 -> 7737 bytes .../latex/classColorset__coll__graph.pdf | Bin 6977 -> 6977 bytes .../classCompoundPattern__coll__graph.pdf | Bin 9983 -> 9983 bytes .../classCompoundPattern__inherit__graph.pdf | Bin 9618 -> 9618 bytes .../classCrossDopsPattern__coll__graph.pdf | Bin 10648 -> 10648 bytes .../classCrossDopsPattern__inherit__graph.pdf | Bin 8388 -> 8388 bytes .../classDoubleStrobePattern__coll__graph.pdf | Bin 10665 -> 10665 bytes ...assDoubleStrobePattern__inherit__graph.pdf | Bin 8083 -> 8083 bytes .../classDripMorphPattern__coll__graph.pdf | Bin 11304 -> 11304 bytes .../classDripMorphPattern__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../latex/classDripPattern__coll__graph.pdf | Bin 10656 -> 10656 bytes .../classDripPattern__inherit__graph.pdf | Bin 7861 -> 7861 bytes .../classEditorConnection__coll__graph.pdf | Bin 15474 -> 15474 bytes .../classEditorConnection__inherit__graph.pdf | Bin 6250 -> 6250 bytes docs/gloves/latex/classFactoryReset.tex | 2 +- .../latex/classFactoryReset__coll__graph.pdf | Bin 11019 -> 11019 bytes .../classFactoryReset__inherit__graph.pdf | Bin 7117 -> 7117 bytes .../latex/classFillPattern__coll__graph.pdf | Bin 10631 -> 10631 bytes .../classFillPattern__inherit__graph.pdf | Bin 7827 -> 7827 bytes .../classGlobalBrightness__coll__graph.pdf | Bin 10723 -> 10723 bytes .../classGlobalBrightness__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../classHueShiftPattern__coll__graph.pdf | Bin 11328 -> 11328 bytes .../classHueShiftPattern__inherit__graph.pdf | Bin 7136 -> 7136 bytes .../latex/classIRReceiver__coll__graph.pdf | Bin 6921 -> 6921 bytes .../latex/classIRSender__coll__graph.pdf | Bin 12566 -> 12566 bytes .../latex/classLedStash__coll__graph.pdf | Bin 7343 -> 7343 bytes docs/gloves/latex/classLeds.tex | 4 +- docs/gloves/latex/classLeds__coll__graph.pdf | Bin 6656 -> 6656 bytes .../classLighthousePattern__coll__graph.pdf | Bin 11679 -> 11679 bytes ...classLighthousePattern__inherit__graph.pdf | Bin 8398 -> 8398 bytes .../classMateriaPattern__coll__graph.pdf | Bin 10309 -> 10309 bytes .../classMateriaPattern__inherit__graph.pdf | Bin 6645 -> 6645 bytes docs/gloves/latex/classMenu__coll__graph.pdf | Bin 10137 -> 10137 bytes .../latex/classMenu__inherit__graph.pdf | Bin 11407 -> 11407 bytes docs/gloves/latex/classMenus__coll__graph.pdf | Bin 10539 -> 10539 bytes .../latex/classMeteorPattern__coll__graph.pdf | Bin 12013 -> 12013 bytes .../classMeteorPattern__inherit__graph.pdf | Bin 7893 -> 7893 bytes docs/gloves/latex/classMode.tex | 2 +- .../latex/classModeSharing__coll__graph.pdf | Bin 10774 -> 10774 bytes .../classModeSharing__inherit__graph.pdf | Bin 6489 -> 6489 bytes docs/gloves/latex/classMode__coll__graph.pdf | Bin 8792 -> 8792 bytes docs/gloves/latex/classModes.tex | 1189 +++++----- docs/gloves/latex/classModes_1_1ModeLink.tex | 362 ++-- .../classModes_1_1ModeLink__coll__graph.pdf | Bin 15477 -> 15477 bytes docs/gloves/latex/classModes__coll__graph.pdf | Bin 15895 -> 15895 bytes .../classMultiLedPattern__coll__graph.pdf | Bin 8682 -> 8682 bytes .../classMultiLedPattern__inherit__graph.pdf | Bin 20017 -> 20017 bytes docs/gloves/latex/classPatternBuilder.tex | 12 +- docs/gloves/latex/classPatternSelect.tex | 24 +- .../latex/classPatternSelect__coll__graph.pdf | Bin 10869 -> 10869 bytes .../classPatternSelect__inherit__graph.pdf | Bin 6358 -> 6358 bytes .../latex/classPattern__coll__graph.pdf | Bin 7703 -> 7703 bytes .../latex/classPattern__inherit__graph.pdf | Bin 21698 -> 21698 bytes .../classPulsishPattern__coll__graph.pdf | Bin 10243 -> 10243 bytes .../classPulsishPattern__inherit__graph.pdf | Bin 7002 -> 7002 bytes .../latex/classRandomizer__coll__graph.pdf | Bin 11469 -> 11469 bytes .../latex/classRandomizer__inherit__graph.pdf | Bin 6628 -> 6628 bytes .../latex/classSequenceStep__coll__graph.pdf | Bin 9239 -> 9239 bytes .../latex/classSequence__coll__graph.pdf | Bin 9644 -> 9644 bytes .../classSequencedPattern__coll__graph.pdf | Bin 12890 -> 12890 bytes .../classSequencedPattern__inherit__graph.pdf | Bin 8736 -> 8736 bytes .../classSingleLedPattern__coll__graph.pdf | Bin 8743 -> 8743 bytes .../classSingleLedPattern__inherit__graph.pdf | Bin 8203 -> 8203 bytes .../classSnowballPattern__coll__graph.pdf | Bin 11021 -> 11021 bytes .../classSnowballPattern__inherit__graph.pdf | Bin 8451 -> 8451 bytes .../latex/classSolidPattern__coll__graph.pdf | Bin 10367 -> 10367 bytes .../classSolidPattern__inherit__graph.pdf | Bin 7803 -> 7803 bytes .../classSparkleTracePattern__coll__graph.pdf | Bin 11327 -> 11327 bytes ...assSparkleTracePattern__inherit__graph.pdf | Bin 7993 -> 7993 bytes docs/gloves/latex/classStorage.tex | 335 +-- .../classTheaterChasePattern__coll__graph.pdf | Bin 10604 -> 10604 bytes ...assTheaterChasePattern__inherit__graph.pdf | Bin 8301 -> 8301 bytes docs/gloves/latex/classTime.tex | 2 +- .../latex/classVLSender__coll__graph.pdf | Bin 12742 -> 12742 bytes docs/gloves/latex/classVortexEngine.tex | 6 +- .../classVortexWipePattern__coll__graph.pdf | Bin 11406 -> 11406 bytes ...classVortexWipePattern__inherit__graph.pdf | Bin 8734 -> 8734 bytes .../latex/classWarpPattern__coll__graph.pdf | Bin 10898 -> 10898 bytes .../classWarpPattern__inherit__graph.pdf | Bin 8087 -> 8087 bytes .../classWarpWormPattern__coll__graph.pdf | Bin 10904 -> 10904 bytes .../classWarpWormPattern__inherit__graph.pdf | Bin 8404 -> 8404 bytes ...assZigzagPattern_1_1Snake__coll__graph.pdf | Bin 9467 -> 9467 bytes .../latex/classZigzagPattern__coll__graph.pdf | Bin 11786 -> 11786 bytes .../classZigzagPattern__inherit__graph.pdf | Bin 7152 -> 7152 bytes ...r_1d79b4615f725ce6e1b38311d89b4d4f_dep.pdf | Bin 17959 -> 17959 bytes ...r_47fec278782816999705227d1066c7a6_dep.pdf | Bin 27862 -> 27862 bytes ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.pdf | Bin 29165 -> 29165 bytes ...r_60d51ee7315d72413f26211ac43a217e_dep.pdf | Bin 11746 -> 11746 bytes ...r_61b212e579fd471c490a116dc3a4c8cf_dep.pdf | Bin 12349 -> 12349 bytes ...r_63ce3ba067bdf35a8f7c780ac03d51a3_dep.pdf | Bin 11519 -> 11519 bytes ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.pdf | Bin 39821 -> 39821 bytes ...r_7e29431de6169dbb5f5ee7a990ed2b16_dep.pdf | Bin 7812 -> 7812 bytes ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.pdf | Bin 41029 -> 41030 bytes ...r_938e62fdb5540a46e6e0c12f6b77804d_dep.pdf | Bin 11867 -> 11867 bytes ...r_9a5c88f87170865d940dc95c76676edb_dep.pdf | Bin 10349 -> 10349 bytes ...r_cabf3d63e98569a74ecb960b83c4a15b_dep.pdf | Bin 13013 -> 13013 bytes ...r_ce91f970b513fb5ff406625265505b14_dep.pdf | Bin 13870 -> 13870 bytes ...r_cfa97f0e2c08f470d5e70542e8b74b9a_dep.pdf | Bin 6963 -> 6963 bytes ...r_d3731d706719beb3d6001df5dcff2644_dep.pdf | Bin 25827 -> 25827 bytes ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.pdf | Bin 41023 -> 41023 bytes ...r_fa5f32c9390e3ea098144f298be2a395_dep.pdf | Bin 22633 -> 22633 bytes ...r_ff5a4dc0324506fcdfb8f8f681f9dae7_dep.pdf | Bin 9962 -> 9962 bytes ...tLZ4__stream__t__internal__coll__graph.pdf | Bin 6930 -> 6930 bytes .../latex/structMenuEntry__coll__graph.pdf | Bin 11124 -> 11124 bytes ...unionLZ4__streamDecode__u__coll__graph.pdf | Bin 7287 -> 7287 bytes .../unionLZ4__stream__u__coll__graph.pdf | Bin 7730 -> 7730 bytes docs/gloves/navtreedata.js | 12 +- docs/gloves/navtreeindex1.js | 4 +- docs/gloves/navtreeindex3.js | 76 +- docs/gloves/navtreeindex4.js | 6 +- docs/gloves/navtreeindex5.js | 6 +- docs/gloves/navtreeindex6.js | 46 +- docs/gloves/navtreeindex7.js | 10 +- docs/gloves/navtreeindex8.js | 18 +- docs/gloves/navtreeindex9.js | 8 +- docs/gloves/search/all_10.js | 2 +- docs/gloves/search/all_11.js | 340 +-- docs/gloves/search/all_12.js | 319 +-- docs/gloves/search/all_13.js | 72 +- docs/gloves/search/all_14.js | 39 +- docs/gloves/search/all_15.js | 136 +- docs/gloves/search/all_16.js | 30 +- docs/gloves/search/all_17.js | 6 +- docs/gloves/search/all_18.js | 90 +- docs/gloves/search/all_4.js | 2 +- docs/gloves/search/all_8.js | 4 +- docs/gloves/search/all_c.js | 163 +- docs/gloves/search/all_d.js | 53 +- docs/gloves/search/all_e.js | 70 +- docs/gloves/search/all_f.js | 242 +-- docs/gloves/search/classes_0.js | 18 +- docs/gloves/search/classes_1.js | 12 +- docs/gloves/search/classes_10.js | 2 +- docs/gloves/search/classes_2.js | 8 +- docs/gloves/search/classes_3.js | 2 +- docs/gloves/search/classes_4.js | 4 +- docs/gloves/search/classes_5.js | 2 +- docs/gloves/search/classes_6.js | 4 +- docs/gloves/search/classes_7.js | 4 +- docs/gloves/search/classes_8.js | 14 +- docs/gloves/search/classes_9.js | 20 +- docs/gloves/search/classes_a.js | 12 +- docs/gloves/search/classes_b.js | 8 +- docs/gloves/search/classes_c.js | 20 +- docs/gloves/search/classes_d.js | 6 +- docs/gloves/search/classes_e.js | 6 +- docs/gloves/search/classes_f.js | 4 +- docs/gloves/search/defines_0.js | 48 +- docs/gloves/search/defines_1.js | 20 +- docs/gloves/search/defines_10.js | 34 +- docs/gloves/search/defines_11.js | 8 +- docs/gloves/search/defines_12.js | 84 +- docs/gloves/search/defines_13.js | 4 +- docs/gloves/search/defines_2.js | 20 +- docs/gloves/search/defines_3.js | 30 +- docs/gloves/search/defines_4.js | 54 +- docs/gloves/search/defines_5.js | 32 +- docs/gloves/search/defines_6.js | 2 +- docs/gloves/search/defines_7.js | 48 +- docs/gloves/search/defines_8.js | 68 +- docs/gloves/search/defines_9.js | 2 +- docs/gloves/search/defines_a.js | 64 +- docs/gloves/search/defines_b.js | 111 +- docs/gloves/search/defines_c.js | 15 +- docs/gloves/search/defines_d.js | 22 +- docs/gloves/search/defines_e.js | 210 +- docs/gloves/search/defines_f.js | 42 +- docs/gloves/search/enums_0.js | 6 +- docs/gloves/search/enums_1.js | 4 +- docs/gloves/search/enums_2.js | 6 +- docs/gloves/search/enums_3.js | 2 +- docs/gloves/search/enums_4.js | 4 +- docs/gloves/search/enums_5.js | 8 +- docs/gloves/search/enums_6.js | 8 +- docs/gloves/search/enums_7.js | 4 +- docs/gloves/search/enums_8.js | 2 +- docs/gloves/search/enums_9.js | 4 +- docs/gloves/search/enumvalues_0.js | 6 +- docs/gloves/search/enumvalues_1.js | 2 +- docs/gloves/search/enumvalues_10.js | 16 +- docs/gloves/search/enumvalues_11.js | 6 +- docs/gloves/search/enumvalues_2.js | 6 +- docs/gloves/search/enumvalues_3.js | 6 +- docs/gloves/search/enumvalues_4.js | 2 +- docs/gloves/search/enumvalues_5.js | 22 +- docs/gloves/search/enumvalues_6.js | 4 +- docs/gloves/search/enumvalues_7.js | 38 +- docs/gloves/search/enumvalues_8.js | 34 +- docs/gloves/search/enumvalues_9.js | 6 +- docs/gloves/search/enumvalues_a.js | 2 +- docs/gloves/search/enumvalues_b.js | 146 +- docs/gloves/search/enumvalues_c.js | 12 +- docs/gloves/search/enumvalues_d.js | 68 +- docs/gloves/search/enumvalues_e.js | 4 +- docs/gloves/search/enumvalues_f.js | 4 +- docs/gloves/search/files_0.js | 36 +- docs/gloves/search/files_1.js | 30 +- docs/gloves/search/files_10.js | 4 +- docs/gloves/search/files_2.js | 16 +- docs/gloves/search/files_3.js | 8 +- docs/gloves/search/files_4.js | 8 +- docs/gloves/search/files_5.js | 4 +- docs/gloves/search/files_6.js | 4 +- docs/gloves/search/files_7.js | 10 +- docs/gloves/search/files_8.js | 18 +- docs/gloves/search/files_9.js | 36 +- docs/gloves/search/files_a.js | 22 +- docs/gloves/search/files_b.js | 8 +- docs/gloves/search/files_c.js | 32 +- docs/gloves/search/files_d.js | 14 +- docs/gloves/search/files_e.js | 20 +- docs/gloves/search/files_f.js | 8 +- docs/gloves/search/functions_0.js | 6 +- docs/gloves/search/functions_1.js | 38 +- docs/gloves/search/functions_10.js | 2 +- docs/gloves/search/functions_11.js | 102 +- docs/gloves/search/functions_12.js | 167 +- docs/gloves/search/functions_13.js | 14 +- docs/gloves/search/functions_14.js | 19 +- docs/gloves/search/functions_15.js | 8 +- docs/gloves/search/functions_16.js | 12 +- docs/gloves/search/functions_17.js | 2 +- docs/gloves/search/functions_18.js | 90 +- docs/gloves/search/functions_2.js | 66 +- docs/gloves/search/functions_3.js | 96 +- docs/gloves/search/functions_4.js | 32 +- docs/gloves/search/functions_5.js | 14 +- docs/gloves/search/functions_6.js | 10 +- docs/gloves/search/functions_7.js | 52 +- docs/gloves/search/functions_8.js | 30 +- docs/gloves/search/functions_9.js | 40 +- docs/gloves/search/functions_a.js | 2 +- docs/gloves/search/functions_b.js | 98 +- docs/gloves/search/functions_c.js | 40 +- docs/gloves/search/functions_d.js | 26 +- docs/gloves/search/functions_e.js | 64 +- docs/gloves/search/functions_f.js | 36 +- docs/gloves/search/related_0.js | 2 +- docs/gloves/search/related_1.js | 2 +- docs/gloves/search/related_2.js | 2 +- docs/gloves/search/typedefs_0.js | 4 +- docs/gloves/search/typedefs_1.js | 2 +- docs/gloves/search/typedefs_2.js | 2 +- docs/gloves/search/typedefs_3.js | 2 +- docs/gloves/search/typedefs_4.js | 16 +- docs/gloves/search/typedefs_5.js | 2 +- docs/gloves/search/typedefs_6.js | 2 +- docs/gloves/search/typedefs_7.js | 2 +- docs/gloves/search/typedefs_8.js | 8 +- docs/gloves/search/variables_0.js | 18 +- docs/gloves/search/variables_1.js | 10 +- docs/gloves/search/variables_10.js | 4 +- docs/gloves/search/variables_11.js | 4 +- docs/gloves/search/variables_2.js | 10 +- docs/gloves/search/variables_3.js | 12 +- docs/gloves/search/variables_4.js | 4 +- docs/gloves/search/variables_5.js | 2 +- docs/gloves/search/variables_6.js | 10 +- docs/gloves/search/variables_7.js | 4 +- docs/gloves/search/variables_8.js | 8 +- docs/gloves/search/variables_9.js | 8 +- docs/gloves/search/variables_a.js | 314 +-- docs/gloves/search/variables_b.js | 8 +- docs/gloves/search/variables_c.js | 4 +- docs/gloves/search/variables_d.js | 6 +- docs/gloves/search/variables_e.js | 2 +- docs/gloves/search/variables_f.js | 10 +- docs/gloves/structdefault__mode__entry.html | 6 +- docs/handle/BlendPattern_8cpp_source.html | 4 +- docs/handle/Buttons_8h_source.html | 2 +- docs/handle/ColorSelect_8cpp_source.html | 4 +- docs/handle/ColorSelect_8h_source.html | 16 +- docs/handle/ColorTypes_8cpp.html | 2 +- docs/handle/ColorTypes_8cpp_source.html | 2 +- docs/handle/ColorTypes_8h.html | 2 +- docs/handle/DefaultModes_8cpp.html | 18 +- docs/handle/DefaultModes_8cpp.js | 2 +- docs/handle/DefaultModes_8cpp_source.html | 7 +- docs/handle/DefaultModes_8h.html | 14 +- docs/handle/DefaultModes_8h.js | 2 +- docs/handle/DefaultModes_8h_source.html | 5 +- docs/handle/EditorConnection_8cpp_source.html | 30 +- docs/handle/FactoryReset_8cpp_source.html | 12 +- docs/handle/GlobalBrightness_8h_source.html | 8 +- docs/handle/Log_8h_source.html | 2 +- docs/handle/Memory_8cpp_source.html | 2 +- docs/handle/Menu_8cpp_source.html | 6 +- docs/handle/Menus_8cpp.html | 16 +- docs/handle/Menus_8cpp__incl.md5 | 2 +- docs/handle/Menus_8cpp__incl.svg | 502 +++-- docs/handle/Menus_8cpp__incl_org.svg | 504 +++-- docs/handle/Menus_8cpp_source.html | 16 +- docs/handle/ModeSharing_8cpp_source.html | 4 +- docs/handle/Modes_8cpp_source.html | 1905 +++++++++-------- docs/handle/Modes_8h_source.html | 245 +-- docs/handle/PatternBuilder_8cpp_source.html | 12 +- docs/handle/PatternSelect_8cpp__incl.md5 | 2 +- docs/handle/PatternSelect_8cpp__incl.svg | 484 +++-- docs/handle/PatternSelect_8cpp__incl_org.svg | 486 +++-- docs/handle/PatternSelect_8cpp_source.html | 8 +- docs/handle/PatternSelect_8h.html | 3 +- docs/handle/PatternSelect_8h__incl.md5 | 2 +- docs/handle/PatternSelect_8h__incl.svg | 152 +- docs/handle/PatternSelect_8h_source.html | 71 +- docs/handle/Patterns_8h__dep__incl.md5 | 2 +- docs/handle/Patterns_8h__dep__incl.svg | 1244 ++++++----- docs/handle/Patterns_8h__dep__incl_org.svg | 1246 ++++++----- docs/handle/Randomizer_8cpp_source.html | 4 +- docs/handle/Storage_8cpp.html | 7 +- docs/handle/Storage_8cpp__incl.md5 | 2 +- docs/handle/Storage_8cpp__incl.svg | 147 +- docs/handle/Storage_8cpp__incl_org.svg | 149 +- docs/handle/Storage_8cpp_source.html | 402 ++-- docs/handle/Storage_8h_source.html | 16 +- docs/handle/TimeControl_8cpp_source.html | 4 +- docs/handle/Timings_8h_source.html | 22 +- docs/handle/VortexConfig_8h.html | 166 +- docs/handle/VortexConfig_8h.js | 2 + docs/handle/VortexConfig_8h_source.html | 853 ++++---- docs/handle/VortexEngine_8cpp_source.html | 26 +- docs/handle/classBlendPattern.html | 4 +- docs/handle/classByteStream.html | 26 +- docs/handle/classColorSelect.html | 26 +- docs/handle/classColorset.html | 2 +- docs/handle/classEditorConnection.html | 40 +- docs/handle/classFactoryReset.html | 16 +- docs/handle/classGlobalBrightness.html | 8 +- docs/handle/classLeds.html | 6 +- docs/handle/classMenu.html | 12 +- docs/handle/classMode.html | 12 +- docs/handle/classModeSharing.html | 12 +- docs/handle/classModes-members.html | 24 +- docs/handle/classModes.html | 1409 ++++++------ docs/handle/classModes.js | 2 + docs/handle/classModes_1_1ModeLink.html | 426 ++-- docs/handle/classPatternBuilder.html | 12 +- docs/handle/classPatternSelect.html | 22 +- docs/handle/classRandomizer.html | 8 +- docs/handle/classStorage-members.html | 4 +- docs/handle/classStorage.html | 382 ++-- docs/handle/classStorage.js | 4 +- docs/handle/classTime.html | 10 +- docs/handle/classVortexEngine.html | 28 +- docs/handle/dir_000007_000010.html | 2 +- docs/handle/dir_000008_000010.html | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.svg | 4 +- ...b4510cba155c652ac883383ddf0b92_dep_org.svg | 4 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.svg | 4 +- ...4d93e079ad601e0006c23ac3d37255_dep_org.svg | 4 +- ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.svg | 4 +- ...02266255841645c523fab960c9ed1d_dep_org.svg | 4 +- docs/handle/functions_func_r.html | 2 +- docs/handle/functions_func_s.html | 3 + docs/handle/functions_func_u.html | 3 + docs/handle/functions_func_w.html | 2 +- docs/handle/functions_r.html | 2 +- docs/handle/functions_s.html | 3 + docs/handle/functions_u.html | 3 + docs/handle/functions_w.html | 2 +- docs/handle/globals_d.html | 4 +- docs/handle/globals_defs_m.html | 3 + docs/handle/globals_defs_n.html | 3 + docs/handle/globals_m.html | 3 + docs/handle/globals_n.html | 3 + docs/handle/globals_vars.html | 4 +- .../latex/BackStrobePattern_8cpp__incl.pdf | Bin 19609 -> 19609 bytes .../latex/BackStrobePattern_8h__dep__incl.pdf | Bin 8990 -> 8990 bytes .../latex/BackStrobePattern_8h__incl.pdf | Bin 19199 -> 19199 bytes docs/handle/latex/BasicPattern_8cpp__incl.pdf | Bin 18474 -> 18474 bytes .../latex/BasicPattern_8h__dep__incl.pdf | Bin 10268 -> 10268 bytes docs/handle/latex/BasicPattern_8h__incl.pdf | Bin 16696 -> 16696 bytes docs/handle/latex/BitStream_8cpp__incl.pdf | Bin 14960 -> 14960 bytes docs/handle/latex/BitStream_8h__dep__incl.pdf | Bin 14607 -> 14607 bytes docs/handle/latex/BitStream_8h__incl.pdf | Bin 7839 -> 7839 bytes docs/handle/latex/BlendPattern_8cpp__incl.pdf | Bin 19506 -> 19506 bytes .../latex/BlendPattern_8h__dep__incl.pdf | Bin 8479 -> 8479 bytes docs/handle/latex/BlendPattern_8h__incl.pdf | Bin 18611 -> 18611 bytes .../latex/BlinkStepPattern_8cpp__incl.pdf | Bin 20727 -> 20727 bytes .../latex/BlinkStepPattern_8h__dep__incl.pdf | Bin 22184 -> 22184 bytes .../latex/BlinkStepPattern_8h__incl.pdf | Bin 17291 -> 17291 bytes .../handle/latex/BouncePattern_8cpp__incl.pdf | Bin 22194 -> 22194 bytes .../latex/BouncePattern_8h__dep__incl.pdf | Bin 8495 -> 8495 bytes docs/handle/latex/BouncePattern_8h__incl.pdf | Bin 18897 -> 18897 bytes docs/handle/latex/Button_8cpp__incl.pdf | Bin 16102 -> 16102 bytes docs/handle/latex/Button_8h__dep__incl.pdf | Bin 14055 -> 14055 bytes docs/handle/latex/Button_8h__incl.pdf | Bin 7272 -> 7272 bytes docs/handle/latex/Buttons_8cpp__incl.pdf | Bin 14843 -> 14843 bytes docs/handle/latex/Buttons_8h__dep__incl.pdf | Bin 8434 -> 8434 bytes docs/handle/latex/Buttons_8h__incl.pdf | Bin 7755 -> 7755 bytes docs/handle/latex/ByteStream_8cpp__incl.pdf | Bin 16492 -> 16492 bytes .../handle/latex/ByteStream_8h__dep__incl.pdf | Bin 29726 -> 29726 bytes docs/handle/latex/ByteStream_8h__incl.pdf | Bin 13600 -> 13600 bytes .../handle/latex/ChaserPattern_8cpp__incl.pdf | Bin 19369 -> 19369 bytes .../latex/ChaserPattern_8h__dep__incl.pdf | Bin 8941 -> 8941 bytes docs/handle/latex/ChaserPattern_8h__incl.pdf | Bin 18940 -> 18940 bytes .../latex/ColorConstants_8h__dep__incl.pdf | Bin 46598 -> 46598 bytes docs/handle/latex/ColorSelect_8cpp__incl.pdf | Bin 23981 -> 23981 bytes .../latex/ColorSelect_8h__dep__incl.pdf | Bin 8219 -> 8219 bytes docs/handle/latex/ColorSelect_8h__incl.pdf | Bin 15983 -> 15983 bytes docs/handle/latex/ColorTypes_8cpp.tex | 2 +- docs/handle/latex/ColorTypes_8cpp__incl.pdf | Bin 14907 -> 14907 bytes docs/handle/latex/ColorTypes_8h.tex | 2 +- .../handle/latex/ColorTypes_8h__dep__incl.pdf | Bin 35389 -> 35389 bytes docs/handle/latex/ColorTypes_8h__incl.pdf | Bin 11798 -> 11798 bytes docs/handle/latex/Colorset_8cpp__incl.pdf | Bin 17016 -> 17016 bytes docs/handle/latex/Colorset_8h__dep__incl.pdf | Bin 35033 -> 35033 bytes docs/handle/latex/Colorset_8h__incl.pdf | Bin 12266 -> 12266 bytes .../latex/CompoundPattern_8cpp__incl.pdf | Bin 17934 -> 17934 bytes .../latex/CompoundPattern_8h__dep__incl.pdf | Bin 12017 -> 12017 bytes .../handle/latex/CompoundPattern_8h__incl.pdf | Bin 16042 -> 16042 bytes docs/handle/latex/Compression_8cpp__incl.pdf | Bin 14103 -> 14103 bytes .../latex/Compression_8h__dep__incl.pdf | Bin 8797 -> 8797 bytes docs/handle/latex/Compression_8h__incl.pdf | Bin 12355 -> 12355 bytes .../latex/CrossDopsPattern_8cpp__incl.pdf | Bin 20407 -> 20407 bytes .../latex/CrossDopsPattern_8h__dep__incl.pdf | Bin 8754 -> 8754 bytes .../latex/CrossDopsPattern_8h__incl.pdf | Bin 18991 -> 18991 bytes docs/handle/latex/DefaultModes_8cpp.tex | 10 +- docs/handle/latex/DefaultModes_8cpp__incl.pdf | Bin 14003 -> 14003 bytes docs/handle/latex/DefaultModes_8h.tex | 6 +- .../latex/DefaultModes_8h__dep__incl.pdf | Bin 9608 -> 9608 bytes docs/handle/latex/DefaultModes_8h__incl.pdf | Bin 12757 -> 12757 bytes .../latex/DoubleStrobePattern_8cpp__incl.pdf | Bin 21717 -> 21717 bytes .../DoubleStrobePattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../latex/DoubleStrobePattern_8h__incl.pdf | Bin 19095 -> 19095 bytes .../latex/DripMorphPattern_8cpp__incl.pdf | Bin 21194 -> 21194 bytes .../latex/DripMorphPattern_8h__dep__incl.pdf | Bin 8620 -> 8620 bytes .../latex/DripMorphPattern_8h__incl.pdf | Bin 18245 -> 18245 bytes docs/handle/latex/DripPattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes .../latex/DripPattern_8h__dep__incl.pdf | Bin 8601 -> 8601 bytes docs/handle/latex/DripPattern_8h__incl.pdf | Bin 18995 -> 18995 bytes .../latex/EditorConnection_8cpp__incl.pdf | Bin 22985 -> 22985 bytes .../latex/EditorConnection_8h__dep__incl.pdf | Bin 8095 -> 8095 bytes .../latex/EditorConnection_8h__incl.pdf | Bin 17750 -> 17750 bytes docs/handle/latex/ErrorBlinker_8cpp__incl.pdf | Bin 12414 -> 12414 bytes .../latex/ErrorBlinker_8h__dep__incl.pdf | Bin 35521 -> 35521 bytes docs/handle/latex/ErrorBlinker_8h__incl.pdf | Bin 12008 -> 12008 bytes docs/handle/latex/FactoryReset_8cpp__incl.pdf | Bin 24953 -> 24953 bytes .../latex/FactoryReset_8h__dep__incl.pdf | Bin 8784 -> 8784 bytes docs/handle/latex/FactoryReset_8h__incl.pdf | Bin 15519 -> 15519 bytes docs/handle/latex/FillPattern_8cpp__incl.pdf | Bin 22244 -> 22244 bytes .../latex/FillPattern_8h__dep__incl.pdf | Bin 8558 -> 8558 bytes docs/handle/latex/FillPattern_8h__incl.pdf | Bin 18959 -> 18959 bytes .../latex/GlobalBrightness_8cpp__incl.pdf | Bin 20697 -> 20697 bytes .../latex/GlobalBrightness_8h__dep__incl.pdf | Bin 8577 -> 8577 bytes .../latex/GlobalBrightness_8h__incl.pdf | Bin 15625 -> 15625 bytes .../latex/HueShiftPattern_8cpp__incl.pdf | Bin 21424 -> 21424 bytes .../latex/HueShiftPattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../handle/latex/HueShiftPattern_8h__incl.pdf | Bin 18557 -> 18557 bytes docs/handle/latex/IRConfig_8h__dep__incl.pdf | Bin 14606 -> 14606 bytes docs/handle/latex/IRReceiver_8cpp__incl.pdf | Bin 19593 -> 19593 bytes .../handle/latex/IRReceiver_8h__dep__incl.pdf | Bin 9765 -> 9765 bytes docs/handle/latex/IRReceiver_8h__incl.pdf | Bin 13067 -> 13067 bytes docs/handle/latex/IRSender_8cpp__incl.pdf | Bin 19177 -> 19177 bytes docs/handle/latex/IRSender_8h__dep__incl.pdf | Bin 9531 -> 9531 bytes docs/handle/latex/IRSender_8h__incl.pdf | Bin 15496 -> 15496 bytes docs/handle/latex/LedStash_8cpp__incl.pdf | Bin 13558 -> 13558 bytes docs/handle/latex/LedStash_8h__dep__incl.pdf | Bin 10881 -> 10881 bytes docs/handle/latex/LedStash_8h__incl.pdf | Bin 13161 -> 13161 bytes docs/handle/latex/LedTypes_8h__dep__incl.pdf | Bin 39462 -> 39462 bytes docs/handle/latex/LedTypes_8h__incl.pdf | Bin 11941 -> 11941 bytes docs/handle/latex/Leds_8cpp__incl.pdf | Bin 19088 -> 19088 bytes docs/handle/latex/Leds_8h__dep__incl.pdf | Bin 29540 -> 29540 bytes docs/handle/latex/Leds_8h__incl.pdf | Bin 13061 -> 13061 bytes .../latex/LighthousePattern_8cpp__incl.pdf | Bin 22952 -> 22952 bytes .../latex/LighthousePattern_8h__dep__incl.pdf | Bin 8578 -> 8578 bytes .../latex/LighthousePattern_8h__incl.pdf | Bin 20015 -> 20015 bytes docs/handle/latex/Log_8cpp__incl.pdf | Bin 15587 -> 15587 bytes docs/handle/latex/Log_8h__dep__incl.pdf | Bin 36492 -> 36492 bytes docs/handle/latex/Log_8h__incl.pdf | Bin 12688 -> 12688 bytes .../latex/MateriaPattern_8cpp__incl.pdf | Bin 21360 -> 21360 bytes .../latex/MateriaPattern_8h__dep__incl.pdf | Bin 8499 -> 8499 bytes docs/handle/latex/MateriaPattern_8h__incl.pdf | Bin 17935 -> 17935 bytes docs/handle/latex/Memory_8cpp__incl.pdf | Bin 14354 -> 14354 bytes docs/handle/latex/Memory_8h__dep__incl.pdf | Bin 14350 -> 14350 bytes docs/handle/latex/Memory_8h__incl.pdf | Bin 12212 -> 12212 bytes docs/handle/latex/Menu_8cpp__incl.pdf | Bin 21451 -> 21451 bytes docs/handle/latex/Menu_8h__dep__incl.pdf | Bin 16349 -> 16349 bytes docs/handle/latex/Menu_8h__incl.pdf | Bin 14755 -> 14755 bytes docs/handle/latex/Menus_8cpp__incl.md5 | 2 +- docs/handle/latex/Menus_8cpp__incl.pdf | Bin 28474 -> 28202 bytes docs/handle/latex/Menus_8h__dep__incl.pdf | Bin 11751 -> 11751 bytes docs/handle/latex/Menus_8h__incl.pdf | Bin 14760 -> 14760 bytes .../handle/latex/MeteorPattern_8cpp__incl.pdf | Bin 22534 -> 22534 bytes .../latex/MeteorPattern_8h__dep__incl.pdf | Bin 8493 -> 8493 bytes docs/handle/latex/MeteorPattern_8h__incl.pdf | Bin 20141 -> 20141 bytes docs/handle/latex/ModeSharing_8cpp__incl.pdf | Bin 25714 -> 25714 bytes .../latex/ModeSharing_8h__dep__incl.pdf | Bin 8409 -> 8409 bytes docs/handle/latex/ModeSharing_8h__incl.pdf | Bin 15397 -> 15397 bytes docs/handle/latex/Mode_8cpp__incl.pdf | Bin 23012 -> 23012 bytes docs/handle/latex/Mode_8h__dep__incl.pdf | Bin 22138 -> 22138 bytes docs/handle/latex/Mode_8h__incl.pdf | Bin 13260 -> 13260 bytes docs/handle/latex/Modes_8cpp__incl.pdf | Bin 24409 -> 24409 bytes docs/handle/latex/Modes_8h__dep__incl.pdf | Bin 14402 -> 14402 bytes docs/handle/latex/Modes_8h__incl.pdf | Bin 17165 -> 17165 bytes .../latex/MultiLedPattern_8cpp__incl.pdf | Bin 15879 -> 15879 bytes .../latex/MultiLedPattern_8h__dep__incl.pdf | Bin 32353 -> 32353 bytes .../handle/latex/MultiLedPattern_8h__incl.pdf | Bin 15504 -> 15504 bytes docs/handle/latex/PatternArgs_8cpp__incl.pdf | Bin 14799 -> 14799 bytes .../latex/PatternArgs_8h__dep__incl.pdf | Bin 34027 -> 34027 bytes docs/handle/latex/PatternArgs_8h__incl.pdf | Bin 7593 -> 7593 bytes .../latex/PatternBuilder_8cpp__incl.pdf | Bin 41365 -> 41365 bytes .../latex/PatternBuilder_8h__dep__incl.pdf | Bin 11726 -> 11726 bytes docs/handle/latex/PatternBuilder_8h__incl.pdf | Bin 8291 -> 8291 bytes .../handle/latex/PatternSelect_8cpp__incl.md5 | 2 +- .../handle/latex/PatternSelect_8cpp__incl.pdf | Bin 26176 -> 25774 bytes docs/handle/latex/PatternSelect_8h.tex | 1 - .../latex/PatternSelect_8h__dep__incl.pdf | Bin 8459 -> 8459 bytes docs/handle/latex/PatternSelect_8h__incl.md5 | 2 +- docs/handle/latex/PatternSelect_8h__incl.pdf | Bin 15922 -> 16045 bytes docs/handle/latex/Pattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/handle/latex/Pattern_8h__dep__incl.pdf | Bin 33795 -> 33795 bytes docs/handle/latex/Pattern_8h__incl.pdf | Bin 14778 -> 14778 bytes docs/handle/latex/Patterns_8h__dep__incl.md5 | 2 +- docs/handle/latex/Patterns_8h__dep__incl.pdf | Bin 36710 -> 36563 bytes docs/handle/latex/Patterns_8h__incl.pdf | Bin 7396 -> 7396 bytes .../latex/PulsishPattern_8cpp__incl.pdf | Bin 18966 -> 18966 bytes .../latex/PulsishPattern_8h__dep__incl.pdf | Bin 8502 -> 8502 bytes docs/handle/latex/PulsishPattern_8h__incl.pdf | Bin 18154 -> 18154 bytes docs/handle/latex/Random_8cpp__incl.pdf | Bin 7878 -> 7878 bytes docs/handle/latex/Random_8h__dep__incl.pdf | Bin 13633 -> 13633 bytes docs/handle/latex/Random_8h__incl.pdf | Bin 7285 -> 7285 bytes docs/handle/latex/Randomizer_8cpp__incl.pdf | Bin 26121 -> 26121 bytes .../handle/latex/Randomizer_8h__dep__incl.pdf | Bin 8783 -> 8783 bytes docs/handle/latex/Randomizer_8h__incl.pdf | Bin 16400 -> 16400 bytes docs/handle/latex/Sequence_8cpp__incl.pdf | Bin 19446 -> 19446 bytes docs/handle/latex/Sequence_8h__dep__incl.pdf | Bin 10764 -> 10764 bytes docs/handle/latex/Sequence_8h__incl.pdf | Bin 15466 -> 15466 bytes .../latex/SequencedPattern_8cpp__incl.pdf | Bin 22416 -> 22416 bytes .../latex/SequencedPattern_8h__dep__incl.pdf | Bin 9845 -> 9845 bytes .../latex/SequencedPattern_8h__incl.pdf | Bin 18493 -> 18493 bytes docs/handle/latex/Serial_8cpp__incl.pdf | Bin 17420 -> 17420 bytes docs/handle/latex/Serial_8h__dep__incl.pdf | Bin 10309 -> 10309 bytes docs/handle/latex/Serial_8h__incl.pdf | Bin 7505 -> 7505 bytes .../latex/SingleLedPattern_8cpp__incl.pdf | Bin 16663 -> 16663 bytes .../latex/SingleLedPattern_8h__dep__incl.pdf | Bin 13276 -> 13276 bytes .../latex/SingleLedPattern_8h__incl.pdf | Bin 15365 -> 15365 bytes .../latex/SnowballPattern_8cpp__incl.pdf | Bin 20814 -> 20814 bytes .../latex/SnowballPattern_8h__dep__incl.pdf | Bin 9226 -> 9226 bytes .../handle/latex/SnowballPattern_8h__incl.pdf | Bin 19421 -> 19421 bytes docs/handle/latex/SolidPattern_8cpp__incl.pdf | Bin 18999 -> 18999 bytes .../latex/SolidPattern_8h__dep__incl.pdf | Bin 8476 -> 8476 bytes docs/handle/latex/SolidPattern_8h__incl.pdf | Bin 18606 -> 18606 bytes .../latex/SparkleTracePattern_8cpp__incl.pdf | Bin 21304 -> 21304 bytes .../SparkleTracePattern_8h__dep__incl.pdf | Bin 9019 -> 9019 bytes .../latex/SparkleTracePattern_8h__incl.pdf | Bin 18507 -> 18507 bytes docs/handle/latex/Storage_8cpp.tex | 7 +- docs/handle/latex/Storage_8cpp__incl.md5 | 2 +- docs/handle/latex/Storage_8cpp__incl.pdf | Bin 16304 -> 16236 bytes docs/handle/latex/Storage_8h__dep__incl.pdf | Bin 9398 -> 9398 bytes docs/handle/latex/Storage_8h__incl.pdf | Bin 7462 -> 7462 bytes .../latex/TheaterChasePattern_8cpp__incl.pdf | Bin 20340 -> 20340 bytes .../TheaterChasePattern_8h__dep__incl.pdf | Bin 8766 -> 8766 bytes .../latex/TheaterChasePattern_8h__incl.pdf | Bin 18888 -> 18888 bytes docs/handle/latex/TimeControl_8cpp__incl.pdf | Bin 17961 -> 17961 bytes .../latex/TimeControl_8h__dep__incl.pdf | Bin 33673 -> 33673 bytes docs/handle/latex/TimeControl_8h__incl.pdf | Bin 12706 -> 12706 bytes docs/handle/latex/Timer_8cpp__incl.pdf | Bin 16198 -> 16198 bytes docs/handle/latex/Timer_8h__dep__incl.pdf | Bin 32947 -> 32947 bytes docs/handle/latex/Timer_8h__incl.pdf | Bin 12621 -> 12621 bytes docs/handle/latex/Timings_8h__dep__incl.pdf | Bin 32873 -> 32873 bytes docs/handle/latex/Timings_8h__incl.pdf | Bin 13184 -> 13184 bytes docs/handle/latex/VLConfig_8h__dep__incl.pdf | Bin 14282 -> 14282 bytes docs/handle/latex/VLConfig_8h__incl.pdf | Bin 11380 -> 11380 bytes docs/handle/latex/VLReceiver_8cpp__incl.pdf | Bin 21081 -> 21081 bytes .../handle/latex/VLReceiver_8h__dep__incl.pdf | Bin 8422 -> 8422 bytes docs/handle/latex/VLReceiver_8h__incl.pdf | Bin 13865 -> 13865 bytes docs/handle/latex/VLSender_8cpp__incl.pdf | Bin 19835 -> 19835 bytes docs/handle/latex/VLSender_8h__dep__incl.pdf | Bin 9239 -> 9239 bytes docs/handle/latex/VLSender_8h__incl.pdf | Bin 15366 -> 15366 bytes docs/handle/latex/VortexConfig_8h.tex | 154 +- .../latex/VortexConfig_8h__dep__incl.pdf | Bin 44216 -> 44216 bytes docs/handle/latex/VortexConfig_8h__incl.pdf | Bin 10535 -> 10535 bytes docs/handle/latex/VortexEngine_8cpp__incl.pdf | Bin 27342 -> 27342 bytes .../latex/VortexEngine_8h__dep__incl.pdf | Bin 10749 -> 10749 bytes docs/handle/latex/VortexEngine_8h__incl.pdf | Bin 11553 -> 11553 bytes .../latex/VortexWipePattern_8cpp__incl.pdf | Bin 22508 -> 22508 bytes .../latex/VortexWipePattern_8h__dep__incl.pdf | Bin 8865 -> 8865 bytes .../latex/VortexWipePattern_8h__incl.pdf | Bin 19226 -> 19226 bytes docs/handle/latex/WarpPattern_8cpp__incl.pdf | Bin 22532 -> 22532 bytes .../latex/WarpPattern_8h__dep__incl.pdf | Bin 8847 -> 8847 bytes docs/handle/latex/WarpPattern_8h__incl.pdf | Bin 19244 -> 19244 bytes .../latex/WarpWormPattern_8cpp__incl.pdf | Bin 22522 -> 22522 bytes .../latex/WarpWormPattern_8h__dep__incl.pdf | Bin 9016 -> 9016 bytes .../handle/latex/WarpWormPattern_8h__incl.pdf | Bin 19238 -> 19238 bytes .../handle/latex/ZigzagPattern_8cpp__incl.pdf | Bin 20748 -> 20748 bytes .../latex/ZigzagPattern_8h__dep__incl.pdf | Bin 8811 -> 8811 bytes docs/handle/latex/ZigzagPattern_8h__incl.pdf | Bin 18450 -> 18450 bytes .../classBackStrobePattern__coll__graph.pdf | Bin 15115 -> 15115 bytes ...classBackStrobePattern__inherit__graph.pdf | Bin 8397 -> 8397 bytes .../latex/classBasicPattern__coll__graph.pdf | Bin 9987 -> 9987 bytes .../classBasicPattern__inherit__graph.pdf | Bin 8228 -> 8228 bytes docs/handle/latex/classBlendPattern.tex | 4 +- .../latex/classBlendPattern__coll__graph.pdf | Bin 11011 -> 11011 bytes .../classBlendPattern__inherit__graph.pdf | Bin 7680 -> 7680 bytes .../classBlinkStepPattern__coll__graph.pdf | Bin 10148 -> 10148 bytes .../classBlinkStepPattern__inherit__graph.pdf | Bin 15604 -> 15604 bytes .../latex/classBouncePattern__coll__graph.pdf | Bin 10530 -> 10530 bytes .../classBouncePattern__inherit__graph.pdf | Bin 8009 -> 8009 bytes .../latex/classButtons__coll__graph.pdf | Bin 6040 -> 6040 bytes docs/handle/latex/classByteStream.tex | 12 +- .../latex/classByteStream__coll__graph.pdf | Bin 10774 -> 10774 bytes .../latex/classChaserPattern__coll__graph.pdf | Bin 13345 -> 13345 bytes .../classChaserPattern__inherit__graph.pdf | Bin 8726 -> 8726 bytes docs/handle/latex/classColorSelect.tex | 2 +- .../latex/classColorSelect__coll__graph.pdf | Bin 11626 -> 11626 bytes .../classColorSelect__inherit__graph.pdf | Bin 6229 -> 6229 bytes .../latex/classColorsetMap__coll__graph.pdf | Bin 7737 -> 7737 bytes .../latex/classColorset__coll__graph.pdf | Bin 6977 -> 6977 bytes .../classCompoundPattern__coll__graph.pdf | Bin 9983 -> 9983 bytes .../classCompoundPattern__inherit__graph.pdf | Bin 9618 -> 9618 bytes .../classCrossDopsPattern__coll__graph.pdf | Bin 10648 -> 10648 bytes .../classCrossDopsPattern__inherit__graph.pdf | Bin 8388 -> 8388 bytes .../classDoubleStrobePattern__coll__graph.pdf | Bin 10665 -> 10665 bytes ...assDoubleStrobePattern__inherit__graph.pdf | Bin 8083 -> 8083 bytes .../classDripMorphPattern__coll__graph.pdf | Bin 11304 -> 11304 bytes .../classDripMorphPattern__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../latex/classDripPattern__coll__graph.pdf | Bin 10656 -> 10656 bytes .../classDripPattern__inherit__graph.pdf | Bin 7861 -> 7861 bytes .../classEditorConnection__coll__graph.pdf | Bin 15474 -> 15474 bytes .../classEditorConnection__inherit__graph.pdf | Bin 6250 -> 6250 bytes docs/handle/latex/classFactoryReset.tex | 2 +- .../latex/classFactoryReset__coll__graph.pdf | Bin 11019 -> 11019 bytes .../classFactoryReset__inherit__graph.pdf | Bin 7117 -> 7117 bytes .../latex/classFillPattern__coll__graph.pdf | Bin 10631 -> 10631 bytes .../classFillPattern__inherit__graph.pdf | Bin 7827 -> 7827 bytes .../classGlobalBrightness__coll__graph.pdf | Bin 10723 -> 10723 bytes .../classGlobalBrightness__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../classHueShiftPattern__coll__graph.pdf | Bin 11328 -> 11328 bytes .../classHueShiftPattern__inherit__graph.pdf | Bin 7136 -> 7136 bytes .../latex/classIRReceiver__coll__graph.pdf | Bin 6921 -> 6921 bytes .../latex/classIRSender__coll__graph.pdf | Bin 12566 -> 12566 bytes .../latex/classLedStash__coll__graph.pdf | Bin 7343 -> 7343 bytes docs/handle/latex/classLeds.tex | 4 +- docs/handle/latex/classLeds__coll__graph.pdf | Bin 6656 -> 6656 bytes .../classLighthousePattern__coll__graph.pdf | Bin 11679 -> 11679 bytes ...classLighthousePattern__inherit__graph.pdf | Bin 8398 -> 8398 bytes .../classMateriaPattern__coll__graph.pdf | Bin 10309 -> 10309 bytes .../classMateriaPattern__inherit__graph.pdf | Bin 6645 -> 6645 bytes docs/handle/latex/classMenu__coll__graph.pdf | Bin 10137 -> 10137 bytes .../latex/classMenu__inherit__graph.pdf | Bin 11407 -> 11407 bytes docs/handle/latex/classMenus__coll__graph.pdf | Bin 10539 -> 10539 bytes .../latex/classMeteorPattern__coll__graph.pdf | Bin 12013 -> 12013 bytes .../classMeteorPattern__inherit__graph.pdf | Bin 7893 -> 7893 bytes docs/handle/latex/classMode.tex | 2 +- .../latex/classModeSharing__coll__graph.pdf | Bin 10774 -> 10774 bytes .../classModeSharing__inherit__graph.pdf | Bin 6489 -> 6489 bytes docs/handle/latex/classMode__coll__graph.pdf | Bin 8792 -> 8792 bytes docs/handle/latex/classModes.tex | 1189 +++++----- docs/handle/latex/classModes_1_1ModeLink.tex | 362 ++-- .../classModes_1_1ModeLink__coll__graph.pdf | Bin 15477 -> 15477 bytes docs/handle/latex/classModes__coll__graph.pdf | Bin 15895 -> 15895 bytes .../classMultiLedPattern__coll__graph.pdf | Bin 8682 -> 8682 bytes .../classMultiLedPattern__inherit__graph.pdf | Bin 20017 -> 20017 bytes docs/handle/latex/classPatternBuilder.tex | 12 +- docs/handle/latex/classPatternSelect.tex | 8 +- .../latex/classPatternSelect__coll__graph.pdf | Bin 10741 -> 10741 bytes .../classPatternSelect__inherit__graph.pdf | Bin 6358 -> 6358 bytes .../latex/classPattern__coll__graph.pdf | Bin 7703 -> 7703 bytes .../latex/classPattern__inherit__graph.pdf | Bin 21698 -> 21698 bytes .../classPulsishPattern__coll__graph.pdf | Bin 10243 -> 10243 bytes .../classPulsishPattern__inherit__graph.pdf | Bin 7002 -> 7002 bytes .../latex/classRandomizer__coll__graph.pdf | Bin 11469 -> 11469 bytes .../latex/classRandomizer__inherit__graph.pdf | Bin 6628 -> 6628 bytes .../latex/classSequenceStep__coll__graph.pdf | Bin 9239 -> 9239 bytes .../latex/classSequence__coll__graph.pdf | Bin 9644 -> 9644 bytes .../classSequencedPattern__coll__graph.pdf | Bin 12890 -> 12890 bytes .../classSequencedPattern__inherit__graph.pdf | Bin 8736 -> 8736 bytes .../classSingleLedPattern__coll__graph.pdf | Bin 8743 -> 8743 bytes .../classSingleLedPattern__inherit__graph.pdf | Bin 8203 -> 8203 bytes .../classSnowballPattern__coll__graph.pdf | Bin 11021 -> 11021 bytes .../classSnowballPattern__inherit__graph.pdf | Bin 8451 -> 8451 bytes .../latex/classSolidPattern__coll__graph.pdf | Bin 10367 -> 10367 bytes .../classSolidPattern__inherit__graph.pdf | Bin 7803 -> 7803 bytes .../classSparkleTracePattern__coll__graph.pdf | Bin 11327 -> 11327 bytes ...assSparkleTracePattern__inherit__graph.pdf | Bin 7993 -> 7993 bytes docs/handle/latex/classStorage.tex | 335 +-- .../classTheaterChasePattern__coll__graph.pdf | Bin 10604 -> 10604 bytes ...assTheaterChasePattern__inherit__graph.pdf | Bin 8301 -> 8301 bytes docs/handle/latex/classTime.tex | 2 +- .../latex/classVLSender__coll__graph.pdf | Bin 12742 -> 12742 bytes docs/handle/latex/classVortexEngine.tex | 6 +- .../classVortexWipePattern__coll__graph.pdf | Bin 11406 -> 11406 bytes ...classVortexWipePattern__inherit__graph.pdf | Bin 8734 -> 8734 bytes .../latex/classWarpPattern__coll__graph.pdf | Bin 10898 -> 10898 bytes .../classWarpPattern__inherit__graph.pdf | Bin 8087 -> 8087 bytes .../classWarpWormPattern__coll__graph.pdf | Bin 10904 -> 10904 bytes .../classWarpWormPattern__inherit__graph.pdf | Bin 8404 -> 8404 bytes ...assZigzagPattern_1_1Snake__coll__graph.pdf | Bin 9467 -> 9467 bytes .../latex/classZigzagPattern__coll__graph.pdf | Bin 11786 -> 11786 bytes .../classZigzagPattern__inherit__graph.pdf | Bin 7152 -> 7152 bytes ...r_1d79b4615f725ce6e1b38311d89b4d4f_dep.pdf | Bin 17959 -> 17959 bytes ...r_47fec278782816999705227d1066c7a6_dep.pdf | Bin 27862 -> 27862 bytes ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.pdf | Bin 29165 -> 29165 bytes ...r_60d51ee7315d72413f26211ac43a217e_dep.pdf | Bin 11746 -> 11746 bytes ...r_61b212e579fd471c490a116dc3a4c8cf_dep.pdf | Bin 12349 -> 12349 bytes ...r_63ce3ba067bdf35a8f7c780ac03d51a3_dep.pdf | Bin 11519 -> 11519 bytes ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.pdf | Bin 39990 -> 39824 bytes ...r_7e29431de6169dbb5f5ee7a990ed2b16_dep.pdf | Bin 7812 -> 7812 bytes ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.pdf | Bin 41198 -> 41028 bytes ...r_938e62fdb5540a46e6e0c12f6b77804d_dep.pdf | Bin 11867 -> 11867 bytes ...r_9a5c88f87170865d940dc95c76676edb_dep.pdf | Bin 10349 -> 10349 bytes ...r_cabf3d63e98569a74ecb960b83c4a15b_dep.pdf | Bin 13013 -> 13013 bytes ...r_ce91f970b513fb5ff406625265505b14_dep.pdf | Bin 13870 -> 13870 bytes ...r_cfa97f0e2c08f470d5e70542e8b74b9a_dep.pdf | Bin 6963 -> 6963 bytes ...r_d3731d706719beb3d6001df5dcff2644_dep.pdf | Bin 25827 -> 25827 bytes ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.pdf | Bin 41028 -> 41029 bytes ...r_fa5f32c9390e3ea098144f298be2a395_dep.pdf | Bin 22633 -> 22633 bytes ...r_ff5a4dc0324506fcdfb8f8f681f9dae7_dep.pdf | Bin 9962 -> 9962 bytes ...tLZ4__stream__t__internal__coll__graph.pdf | Bin 6930 -> 6930 bytes .../latex/structMenuEntry__coll__graph.pdf | Bin 11124 -> 11124 bytes ...unionLZ4__streamDecode__u__coll__graph.pdf | Bin 7287 -> 7287 bytes .../unionLZ4__stream__u__coll__graph.pdf | Bin 7730 -> 7730 bytes docs/handle/navtreedata.js | 12 +- docs/handle/navtreeindex1.js | 4 +- docs/handle/navtreeindex3.js | 74 +- docs/handle/navtreeindex4.js | 6 +- docs/handle/navtreeindex5.js | 6 +- docs/handle/navtreeindex6.js | 46 +- docs/handle/navtreeindex7.js | 14 +- docs/handle/navtreeindex8.js | 14 +- docs/handle/navtreeindex9.js | 4 + docs/handle/search/all_10.js | 2 +- docs/handle/search/all_11.js | 338 +-- docs/handle/search/all_12.js | 311 +-- docs/handle/search/all_13.js | 60 +- docs/handle/search/all_14.js | 37 +- docs/handle/search/all_15.js | 136 +- docs/handle/search/all_16.js | 30 +- docs/handle/search/all_17.js | 6 +- docs/handle/search/all_18.js | 90 +- docs/handle/search/all_4.js | 2 +- docs/handle/search/all_c.js | 159 +- docs/handle/search/all_d.js | 47 +- docs/handle/search/all_e.js | 70 +- docs/handle/search/all_f.js | 236 +- docs/handle/search/classes_0.js | 18 +- docs/handle/search/classes_1.js | 12 +- docs/handle/search/classes_10.js | 2 +- docs/handle/search/classes_2.js | 8 +- docs/handle/search/classes_3.js | 2 +- docs/handle/search/classes_4.js | 4 +- docs/handle/search/classes_5.js | 2 +- docs/handle/search/classes_6.js | 4 +- docs/handle/search/classes_7.js | 4 +- docs/handle/search/classes_8.js | 14 +- docs/handle/search/classes_9.js | 20 +- docs/handle/search/classes_a.js | 12 +- docs/handle/search/classes_b.js | 8 +- docs/handle/search/classes_c.js | 20 +- docs/handle/search/classes_d.js | 6 +- docs/handle/search/classes_e.js | 6 +- docs/handle/search/classes_f.js | 4 +- docs/handle/search/defines_0.js | 48 +- docs/handle/search/defines_1.js | 20 +- docs/handle/search/defines_10.js | 22 +- docs/handle/search/defines_11.js | 6 +- docs/handle/search/defines_12.js | 84 +- docs/handle/search/defines_13.js | 4 +- docs/handle/search/defines_2.js | 16 +- docs/handle/search/defines_3.js | 30 +- docs/handle/search/defines_4.js | 54 +- docs/handle/search/defines_5.js | 12 +- docs/handle/search/defines_6.js | 2 +- docs/handle/search/defines_7.js | 48 +- docs/handle/search/defines_8.js | 60 +- docs/handle/search/defines_9.js | 2 +- docs/handle/search/defines_a.js | 78 +- docs/handle/search/defines_b.js | 89 +- docs/handle/search/defines_c.js | 11 +- docs/handle/search/defines_d.js | 24 +- docs/handle/search/defines_e.js | 206 +- docs/handle/search/defines_f.js | 40 +- docs/handle/search/enums_0.js | 6 +- docs/handle/search/enums_1.js | 4 +- docs/handle/search/enums_2.js | 6 +- docs/handle/search/enums_3.js | 2 +- docs/handle/search/enums_4.js | 4 +- docs/handle/search/enums_5.js | 8 +- docs/handle/search/enums_6.js | 6 +- docs/handle/search/enums_7.js | 4 +- docs/handle/search/enums_8.js | 2 +- docs/handle/search/enums_9.js | 4 +- docs/handle/search/enumvalues_0.js | 6 +- docs/handle/search/enumvalues_1.js | 2 +- docs/handle/search/enumvalues_10.js | 16 +- docs/handle/search/enumvalues_11.js | 6 +- docs/handle/search/enumvalues_2.js | 6 +- docs/handle/search/enumvalues_3.js | 6 +- docs/handle/search/enumvalues_4.js | 2 +- docs/handle/search/enumvalues_5.js | 22 +- docs/handle/search/enumvalues_6.js | 4 +- docs/handle/search/enumvalues_7.js | 24 +- docs/handle/search/enumvalues_8.js | 34 +- docs/handle/search/enumvalues_9.js | 6 +- docs/handle/search/enumvalues_a.js | 2 +- docs/handle/search/enumvalues_b.js | 140 +- docs/handle/search/enumvalues_c.js | 12 +- docs/handle/search/enumvalues_d.js | 66 +- docs/handle/search/enumvalues_e.js | 4 +- docs/handle/search/enumvalues_f.js | 4 +- docs/handle/search/files_0.js | 36 +- docs/handle/search/files_1.js | 30 +- docs/handle/search/files_10.js | 4 +- docs/handle/search/files_2.js | 16 +- docs/handle/search/files_3.js | 8 +- docs/handle/search/files_4.js | 8 +- docs/handle/search/files_5.js | 4 +- docs/handle/search/files_6.js | 4 +- docs/handle/search/files_7.js | 10 +- docs/handle/search/files_8.js | 18 +- docs/handle/search/files_9.js | 36 +- docs/handle/search/files_a.js | 22 +- docs/handle/search/files_b.js | 8 +- docs/handle/search/files_c.js | 32 +- docs/handle/search/files_d.js | 14 +- docs/handle/search/files_e.js | 20 +- docs/handle/search/files_f.js | 8 +- docs/handle/search/functions_0.js | 6 +- docs/handle/search/functions_1.js | 38 +- docs/handle/search/functions_10.js | 2 +- docs/handle/search/functions_11.js | 104 +- docs/handle/search/functions_12.js | 163 +- docs/handle/search/functions_13.js | 14 +- docs/handle/search/functions_14.js | 19 +- docs/handle/search/functions_15.js | 8 +- docs/handle/search/functions_16.js | 12 +- docs/handle/search/functions_17.js | 2 +- docs/handle/search/functions_18.js | 90 +- docs/handle/search/functions_2.js | 68 +- docs/handle/search/functions_3.js | 98 +- docs/handle/search/functions_4.js | 30 +- docs/handle/search/functions_5.js | 14 +- docs/handle/search/functions_6.js | 10 +- docs/handle/search/functions_7.js | 52 +- docs/handle/search/functions_8.js | 30 +- docs/handle/search/functions_9.js | 40 +- docs/handle/search/functions_a.js | 2 +- docs/handle/search/functions_b.js | 98 +- docs/handle/search/functions_c.js | 38 +- docs/handle/search/functions_d.js | 24 +- docs/handle/search/functions_e.js | 64 +- docs/handle/search/functions_f.js | 36 +- docs/handle/search/related_0.js | 2 +- docs/handle/search/related_1.js | 2 +- docs/handle/search/related_2.js | 2 +- docs/handle/search/typedefs_0.js | 4 +- docs/handle/search/typedefs_1.js | 2 +- docs/handle/search/typedefs_2.js | 2 +- docs/handle/search/typedefs_3.js | 16 +- docs/handle/search/typedefs_4.js | 2 +- docs/handle/search/typedefs_5.js | 2 +- docs/handle/search/typedefs_6.js | 2 +- docs/handle/search/typedefs_7.js | 8 +- docs/handle/search/variables_0.js | 18 +- docs/handle/search/variables_1.js | 10 +- docs/handle/search/variables_10.js | 4 +- docs/handle/search/variables_11.js | 4 +- docs/handle/search/variables_2.js | 10 +- docs/handle/search/variables_3.js | 12 +- docs/handle/search/variables_4.js | 4 +- docs/handle/search/variables_5.js | 2 +- docs/handle/search/variables_6.js | 10 +- docs/handle/search/variables_7.js | 4 +- docs/handle/search/variables_8.js | 8 +- docs/handle/search/variables_9.js | 8 +- docs/handle/search/variables_a.js | 310 +-- docs/handle/search/variables_b.js | 8 +- docs/handle/search/variables_c.js | 4 +- docs/handle/search/variables_d.js | 6 +- docs/handle/search/variables_e.js | 2 +- docs/handle/search/variables_f.js | 10 +- docs/handle/structdefault__mode__entry.html | 6 +- docs/orbit/BlendPattern_8cpp_source.html | 4 +- docs/orbit/Buttons_8h_source.html | 2 +- docs/orbit/ColorSelect_8cpp_source.html | 2 +- docs/orbit/ColorTypes_8cpp.html | 2 +- docs/orbit/ColorTypes_8cpp_source.html | 2 +- docs/orbit/ColorTypes_8h.html | 2 +- docs/orbit/DefaultModes_8cpp.html | 18 +- docs/orbit/DefaultModes_8cpp.js | 2 +- docs/orbit/DefaultModes_8cpp_source.html | 7 +- docs/orbit/DefaultModes_8h.html | 14 +- docs/orbit/DefaultModes_8h.js | 2 +- docs/orbit/DefaultModes_8h_source.html | 5 +- docs/orbit/EditorConnection_8cpp_source.html | 30 +- docs/orbit/FactoryReset_8cpp_source.html | 12 +- docs/orbit/GlobalBrightness_8h_source.html | 8 +- docs/orbit/Log_8h_source.html | 2 +- docs/orbit/Memory_8cpp_source.html | 2 +- docs/orbit/Menu_8cpp_source.html | 6 +- docs/orbit/Menus_8cpp.html | 16 +- docs/orbit/Menus_8cpp__incl.md5 | 2 +- docs/orbit/Menus_8cpp__incl.svg | 502 +++-- docs/orbit/Menus_8cpp__incl_org.svg | 504 +++-- docs/orbit/Menus_8cpp_source.html | 16 +- docs/orbit/ModeSharing_8cpp_source.html | 4 +- docs/orbit/Modes_8cpp_source.html | 1905 +++++++++-------- docs/orbit/Modes_8h_source.html | 245 +-- docs/orbit/PatternBuilder_8cpp_source.html | 12 +- docs/orbit/PatternSelect_8cpp__incl.md5 | 2 +- docs/orbit/PatternSelect_8cpp__incl.svg | 458 ++-- docs/orbit/PatternSelect_8cpp__incl_org.svg | 460 ++-- docs/orbit/PatternSelect_8cpp_source.html | 12 +- docs/orbit/PatternSelect_8h.html | 3 +- docs/orbit/PatternSelect_8h__incl.md5 | 2 +- docs/orbit/PatternSelect_8h__incl.svg | 152 +- docs/orbit/PatternSelect_8h_source.html | 117 +- docs/orbit/Patterns_8h__dep__incl.md5 | 2 +- docs/orbit/Patterns_8h__dep__incl.svg | 1226 ++++++----- docs/orbit/Patterns_8h__dep__incl_org.svg | 1228 ++++++----- docs/orbit/Randomizer_8cpp_source.html | 4 +- docs/orbit/Storage_8cpp.html | 7 +- docs/orbit/Storage_8cpp__incl.md5 | 2 +- docs/orbit/Storage_8cpp__incl.svg | 147 +- docs/orbit/Storage_8cpp__incl_org.svg | 149 +- docs/orbit/Storage_8cpp_source.html | 402 ++-- docs/orbit/Storage_8h_source.html | 16 +- docs/orbit/TimeControl_8cpp_source.html | 4 +- docs/orbit/Timings_8h_source.html | 22 +- docs/orbit/VortexConfig_8h.html | 162 +- docs/orbit/VortexConfig_8h.js | 2 + docs/orbit/VortexConfig_8h_source.html | 851 ++++---- docs/orbit/VortexEngine_8cpp_source.html | 26 +- docs/orbit/classBlendPattern.html | 4 +- docs/orbit/classByteStream.html | 26 +- docs/orbit/classColorSelect.html | 8 +- docs/orbit/classColorset.html | 2 +- docs/orbit/classEditorConnection.html | 40 +- docs/orbit/classFactoryReset.html | 16 +- docs/orbit/classGlobalBrightness.html | 8 +- docs/orbit/classLeds.html | 6 +- docs/orbit/classMenu.html | 10 +- docs/orbit/classMode.html | 12 +- docs/orbit/classModeSharing.html | 12 +- docs/orbit/classModes-members.html | 24 +- docs/orbit/classModes.html | 1411 ++++++------ docs/orbit/classModes.js | 2 + docs/orbit/classModes_1_1ModeLink.html | 426 ++-- docs/orbit/classPatternBuilder.html | 12 +- docs/orbit/classPatternSelect.html | 50 +- docs/orbit/classRandomizer.html | 8 +- docs/orbit/classStorage-members.html | 4 +- docs/orbit/classStorage.html | 382 ++-- docs/orbit/classStorage.js | 4 +- docs/orbit/classTime.html | 10 +- docs/orbit/classVortexEngine.html | 28 +- docs/orbit/dir_000007_000010.html | 2 +- docs/orbit/dir_000008_000010.html | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.svg | 4 +- ...b4510cba155c652ac883383ddf0b92_dep_org.svg | 4 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.svg | 4 +- ...4d93e079ad601e0006c23ac3d37255_dep_org.svg | 4 +- ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.svg | 4 +- ...02266255841645c523fab960c9ed1d_dep_org.svg | 4 +- docs/orbit/functions_func_r.html | 2 +- docs/orbit/functions_func_s.html | 3 + docs/orbit/functions_func_u.html | 3 + docs/orbit/functions_func_w.html | 2 +- docs/orbit/functions_r.html | 2 +- docs/orbit/functions_s.html | 3 + docs/orbit/functions_u.html | 3 + docs/orbit/functions_w.html | 2 +- docs/orbit/globals_d.html | 4 +- docs/orbit/globals_defs_m.html | 3 + docs/orbit/globals_defs_n.html | 3 + docs/orbit/globals_h.html | 4 +- docs/orbit/globals_l.html | 4 +- docs/orbit/globals_m.html | 3 + docs/orbit/globals_n.html | 3 + docs/orbit/globals_vars.html | 4 +- .../latex/BackStrobePattern_8cpp__incl.pdf | Bin 19609 -> 19609 bytes .../latex/BackStrobePattern_8h__dep__incl.pdf | Bin 8990 -> 8990 bytes .../latex/BackStrobePattern_8h__incl.pdf | Bin 19199 -> 19199 bytes docs/orbit/latex/BasicPattern_8cpp__incl.pdf | Bin 18474 -> 18474 bytes .../latex/BasicPattern_8h__dep__incl.pdf | Bin 10268 -> 10268 bytes docs/orbit/latex/BasicPattern_8h__incl.pdf | Bin 16696 -> 16696 bytes docs/orbit/latex/BitStream_8cpp__incl.pdf | Bin 14960 -> 14960 bytes docs/orbit/latex/BitStream_8h__dep__incl.pdf | Bin 15132 -> 15132 bytes docs/orbit/latex/BitStream_8h__incl.pdf | Bin 7839 -> 7839 bytes docs/orbit/latex/BlendPattern_8cpp__incl.pdf | Bin 19506 -> 19506 bytes .../latex/BlendPattern_8h__dep__incl.pdf | Bin 8479 -> 8479 bytes docs/orbit/latex/BlendPattern_8h__incl.pdf | Bin 18611 -> 18611 bytes .../latex/BlinkStepPattern_8cpp__incl.pdf | Bin 20727 -> 20727 bytes .../latex/BlinkStepPattern_8h__dep__incl.pdf | Bin 22184 -> 22184 bytes .../orbit/latex/BlinkStepPattern_8h__incl.pdf | Bin 17291 -> 17291 bytes docs/orbit/latex/BouncePattern_8cpp__incl.pdf | Bin 22194 -> 22194 bytes .../latex/BouncePattern_8h__dep__incl.pdf | Bin 8495 -> 8495 bytes docs/orbit/latex/BouncePattern_8h__incl.pdf | Bin 18897 -> 18897 bytes docs/orbit/latex/Button_8cpp__incl.pdf | Bin 16102 -> 16102 bytes docs/orbit/latex/Button_8h__dep__incl.pdf | Bin 14055 -> 14055 bytes docs/orbit/latex/Button_8h__incl.pdf | Bin 7272 -> 7272 bytes docs/orbit/latex/Buttons_8cpp__incl.pdf | Bin 14843 -> 14843 bytes docs/orbit/latex/Buttons_8h__dep__incl.pdf | Bin 8434 -> 8434 bytes docs/orbit/latex/Buttons_8h__incl.pdf | Bin 7755 -> 7755 bytes docs/orbit/latex/ByteStream_8cpp__incl.pdf | Bin 16492 -> 16492 bytes docs/orbit/latex/ByteStream_8h__dep__incl.pdf | Bin 29667 -> 29667 bytes docs/orbit/latex/ByteStream_8h__incl.pdf | Bin 13600 -> 13600 bytes docs/orbit/latex/ChaserPattern_8cpp__incl.pdf | Bin 19369 -> 19369 bytes .../latex/ChaserPattern_8h__dep__incl.pdf | Bin 8941 -> 8941 bytes docs/orbit/latex/ChaserPattern_8h__incl.pdf | Bin 18940 -> 18940 bytes .../latex/ColorConstants_8h__dep__incl.pdf | Bin 45140 -> 45140 bytes docs/orbit/latex/ColorSelect_8cpp__incl.pdf | Bin 22669 -> 22669 bytes .../orbit/latex/ColorSelect_8h__dep__incl.pdf | Bin 8219 -> 8219 bytes docs/orbit/latex/ColorSelect_8h__incl.pdf | Bin 15983 -> 15983 bytes docs/orbit/latex/ColorTypes_8cpp.tex | 2 +- docs/orbit/latex/ColorTypes_8cpp__incl.pdf | Bin 14907 -> 14907 bytes docs/orbit/latex/ColorTypes_8h.tex | 2 +- docs/orbit/latex/ColorTypes_8h__dep__incl.pdf | Bin 35495 -> 35495 bytes docs/orbit/latex/ColorTypes_8h__incl.pdf | Bin 11798 -> 11798 bytes docs/orbit/latex/Colorset_8cpp__incl.pdf | Bin 17016 -> 17016 bytes docs/orbit/latex/Colorset_8h__dep__incl.pdf | Bin 34954 -> 34954 bytes docs/orbit/latex/Colorset_8h__incl.pdf | Bin 12266 -> 12266 bytes .../latex/CompoundPattern_8cpp__incl.pdf | Bin 17934 -> 17934 bytes .../latex/CompoundPattern_8h__dep__incl.pdf | Bin 12017 -> 12017 bytes docs/orbit/latex/CompoundPattern_8h__incl.pdf | Bin 16042 -> 16042 bytes docs/orbit/latex/Compression_8cpp__incl.pdf | Bin 14103 -> 14103 bytes .../orbit/latex/Compression_8h__dep__incl.pdf | Bin 8797 -> 8797 bytes docs/orbit/latex/Compression_8h__incl.pdf | Bin 12355 -> 12355 bytes .../latex/CrossDopsPattern_8cpp__incl.pdf | Bin 20407 -> 20407 bytes .../latex/CrossDopsPattern_8h__dep__incl.pdf | Bin 8754 -> 8754 bytes .../orbit/latex/CrossDopsPattern_8h__incl.pdf | Bin 18991 -> 18991 bytes docs/orbit/latex/DefaultModes_8cpp.tex | 10 +- docs/orbit/latex/DefaultModes_8cpp__incl.pdf | Bin 14003 -> 14003 bytes docs/orbit/latex/DefaultModes_8h.tex | 6 +- .../latex/DefaultModes_8h__dep__incl.pdf | Bin 9608 -> 9608 bytes docs/orbit/latex/DefaultModes_8h__incl.pdf | Bin 12757 -> 12757 bytes .../latex/DoubleStrobePattern_8cpp__incl.pdf | Bin 21717 -> 21717 bytes .../DoubleStrobePattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes .../latex/DoubleStrobePattern_8h__incl.pdf | Bin 19095 -> 19095 bytes .../latex/DripMorphPattern_8cpp__incl.pdf | Bin 21194 -> 21194 bytes .../latex/DripMorphPattern_8h__dep__incl.pdf | Bin 8620 -> 8620 bytes .../orbit/latex/DripMorphPattern_8h__incl.pdf | Bin 18245 -> 18245 bytes docs/orbit/latex/DripPattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes .../orbit/latex/DripPattern_8h__dep__incl.pdf | Bin 8601 -> 8601 bytes docs/orbit/latex/DripPattern_8h__incl.pdf | Bin 18995 -> 18995 bytes .../latex/EditorConnection_8cpp__incl.pdf | Bin 24771 -> 24771 bytes .../latex/EditorConnection_8h__dep__incl.pdf | Bin 8095 -> 8095 bytes .../orbit/latex/EditorConnection_8h__incl.pdf | Bin 17750 -> 17750 bytes docs/orbit/latex/ErrorBlinker_8cpp__incl.pdf | Bin 12414 -> 12414 bytes .../latex/ErrorBlinker_8h__dep__incl.pdf | Bin 35746 -> 35746 bytes docs/orbit/latex/ErrorBlinker_8h__incl.pdf | Bin 12008 -> 12008 bytes docs/orbit/latex/FactoryReset_8cpp__incl.pdf | Bin 23799 -> 23799 bytes .../latex/FactoryReset_8h__dep__incl.pdf | Bin 8784 -> 8784 bytes docs/orbit/latex/FactoryReset_8h__incl.pdf | Bin 15519 -> 15519 bytes docs/orbit/latex/FillPattern_8cpp__incl.pdf | Bin 22244 -> 22244 bytes .../orbit/latex/FillPattern_8h__dep__incl.pdf | Bin 8558 -> 8558 bytes docs/orbit/latex/FillPattern_8h__incl.pdf | Bin 18959 -> 18959 bytes .../latex/GlobalBrightness_8cpp__incl.pdf | Bin 20697 -> 20697 bytes .../latex/GlobalBrightness_8h__dep__incl.pdf | Bin 8577 -> 8577 bytes .../orbit/latex/GlobalBrightness_8h__incl.pdf | Bin 15625 -> 15625 bytes .../latex/HueShiftPattern_8cpp__incl.pdf | Bin 21424 -> 21424 bytes .../latex/HueShiftPattern_8h__dep__incl.pdf | Bin 8907 -> 8907 bytes docs/orbit/latex/HueShiftPattern_8h__incl.pdf | Bin 18557 -> 18557 bytes docs/orbit/latex/IRConfig_8h__dep__incl.pdf | Bin 14606 -> 14606 bytes docs/orbit/latex/IRReceiver_8cpp__incl.pdf | Bin 19593 -> 19593 bytes docs/orbit/latex/IRReceiver_8h__dep__incl.pdf | Bin 9765 -> 9765 bytes docs/orbit/latex/IRReceiver_8h__incl.pdf | Bin 13067 -> 13067 bytes docs/orbit/latex/IRSender_8cpp__incl.pdf | Bin 19177 -> 19177 bytes docs/orbit/latex/IRSender_8h__dep__incl.pdf | Bin 9531 -> 9531 bytes docs/orbit/latex/IRSender_8h__incl.pdf | Bin 15496 -> 15496 bytes docs/orbit/latex/LedStash_8cpp__incl.pdf | Bin 13558 -> 13558 bytes docs/orbit/latex/LedStash_8h__dep__incl.pdf | Bin 10881 -> 10881 bytes docs/orbit/latex/LedStash_8h__incl.pdf | Bin 13161 -> 13161 bytes docs/orbit/latex/LedTypes_8h__dep__incl.pdf | Bin 38170 -> 38170 bytes docs/orbit/latex/LedTypes_8h__incl.pdf | Bin 11941 -> 11941 bytes docs/orbit/latex/Leds_8cpp__incl.pdf | Bin 19088 -> 19088 bytes docs/orbit/latex/Leds_8h__dep__incl.pdf | Bin 29540 -> 29540 bytes docs/orbit/latex/Leds_8h__incl.pdf | Bin 13061 -> 13061 bytes .../latex/LighthousePattern_8cpp__incl.pdf | Bin 22952 -> 22952 bytes .../latex/LighthousePattern_8h__dep__incl.pdf | Bin 8578 -> 8578 bytes .../latex/LighthousePattern_8h__incl.pdf | Bin 20015 -> 20015 bytes docs/orbit/latex/Log_8cpp__incl.pdf | Bin 15587 -> 15587 bytes docs/orbit/latex/Log_8h__dep__incl.pdf | Bin 35755 -> 35755 bytes docs/orbit/latex/Log_8h__incl.pdf | Bin 12688 -> 12688 bytes .../orbit/latex/MateriaPattern_8cpp__incl.pdf | Bin 21360 -> 21360 bytes .../latex/MateriaPattern_8h__dep__incl.pdf | Bin 8499 -> 8499 bytes docs/orbit/latex/MateriaPattern_8h__incl.pdf | Bin 17935 -> 17935 bytes docs/orbit/latex/Memory_8cpp__incl.pdf | Bin 14354 -> 14354 bytes docs/orbit/latex/Memory_8h__dep__incl.pdf | Bin 14350 -> 14350 bytes docs/orbit/latex/Memory_8h__incl.pdf | Bin 12212 -> 12212 bytes docs/orbit/latex/Menu_8cpp__incl.pdf | Bin 21451 -> 21451 bytes docs/orbit/latex/Menu_8h__dep__incl.pdf | Bin 16349 -> 16349 bytes docs/orbit/latex/Menu_8h__incl.pdf | Bin 14755 -> 14755 bytes docs/orbit/latex/Menus_8cpp__incl.md5 | 2 +- docs/orbit/latex/Menus_8cpp__incl.pdf | Bin 28474 -> 28202 bytes docs/orbit/latex/Menus_8h__dep__incl.pdf | Bin 11751 -> 11751 bytes docs/orbit/latex/Menus_8h__incl.pdf | Bin 14760 -> 14760 bytes docs/orbit/latex/MeteorPattern_8cpp__incl.pdf | Bin 22534 -> 22534 bytes .../latex/MeteorPattern_8h__dep__incl.pdf | Bin 8493 -> 8493 bytes docs/orbit/latex/MeteorPattern_8h__incl.pdf | Bin 20141 -> 20141 bytes docs/orbit/latex/ModeSharing_8cpp__incl.pdf | Bin 25714 -> 25714 bytes .../orbit/latex/ModeSharing_8h__dep__incl.pdf | Bin 8409 -> 8409 bytes docs/orbit/latex/ModeSharing_8h__incl.pdf | Bin 15397 -> 15397 bytes docs/orbit/latex/Mode_8cpp__incl.pdf | Bin 23012 -> 23012 bytes docs/orbit/latex/Mode_8h__dep__incl.pdf | Bin 22306 -> 22306 bytes docs/orbit/latex/Mode_8h__incl.pdf | Bin 13260 -> 13260 bytes docs/orbit/latex/Modes_8cpp__incl.pdf | Bin 24409 -> 24409 bytes docs/orbit/latex/Modes_8h__dep__incl.pdf | Bin 14402 -> 14402 bytes docs/orbit/latex/Modes_8h__incl.pdf | Bin 17165 -> 17165 bytes .../latex/MultiLedPattern_8cpp__incl.pdf | Bin 15879 -> 15879 bytes .../latex/MultiLedPattern_8h__dep__incl.pdf | Bin 32353 -> 32353 bytes docs/orbit/latex/MultiLedPattern_8h__incl.pdf | Bin 15504 -> 15504 bytes docs/orbit/latex/PatternArgs_8cpp__incl.pdf | Bin 14799 -> 14799 bytes .../orbit/latex/PatternArgs_8h__dep__incl.pdf | Bin 33456 -> 33456 bytes docs/orbit/latex/PatternArgs_8h__incl.pdf | Bin 7593 -> 7593 bytes .../orbit/latex/PatternBuilder_8cpp__incl.pdf | Bin 41365 -> 41365 bytes .../latex/PatternBuilder_8h__dep__incl.pdf | Bin 11726 -> 11726 bytes docs/orbit/latex/PatternBuilder_8h__incl.pdf | Bin 8291 -> 8291 bytes docs/orbit/latex/PatternSelect_8cpp__incl.md5 | 2 +- docs/orbit/latex/PatternSelect_8cpp__incl.pdf | Bin 25306 -> 24532 bytes docs/orbit/latex/PatternSelect_8h.tex | 1 - .../latex/PatternSelect_8h__dep__incl.pdf | Bin 8459 -> 8459 bytes docs/orbit/latex/PatternSelect_8h__incl.md5 | 2 +- docs/orbit/latex/PatternSelect_8h__incl.pdf | Bin 15922 -> 16045 bytes docs/orbit/latex/Pattern_8cpp__incl.pdf | Bin 20383 -> 20383 bytes docs/orbit/latex/Pattern_8h__dep__incl.pdf | Bin 33277 -> 33277 bytes docs/orbit/latex/Pattern_8h__incl.pdf | Bin 14778 -> 14778 bytes docs/orbit/latex/Patterns_8h__dep__incl.md5 | 2 +- docs/orbit/latex/Patterns_8h__dep__incl.pdf | Bin 36569 -> 36434 bytes docs/orbit/latex/Patterns_8h__incl.pdf | Bin 7396 -> 7396 bytes .../orbit/latex/PulsishPattern_8cpp__incl.pdf | Bin 18966 -> 18966 bytes .../latex/PulsishPattern_8h__dep__incl.pdf | Bin 8502 -> 8502 bytes docs/orbit/latex/PulsishPattern_8h__incl.pdf | Bin 18154 -> 18154 bytes docs/orbit/latex/Random_8cpp__incl.pdf | Bin 7878 -> 7878 bytes docs/orbit/latex/Random_8h__dep__incl.pdf | Bin 13199 -> 13199 bytes docs/orbit/latex/Random_8h__incl.pdf | Bin 7285 -> 7285 bytes docs/orbit/latex/Randomizer_8cpp__incl.pdf | Bin 26121 -> 26121 bytes docs/orbit/latex/Randomizer_8h__dep__incl.pdf | Bin 8783 -> 8783 bytes docs/orbit/latex/Randomizer_8h__incl.pdf | Bin 16400 -> 16400 bytes docs/orbit/latex/Sequence_8cpp__incl.pdf | Bin 19446 -> 19446 bytes docs/orbit/latex/Sequence_8h__dep__incl.pdf | Bin 10764 -> 10764 bytes docs/orbit/latex/Sequence_8h__incl.pdf | Bin 15466 -> 15466 bytes .../latex/SequencedPattern_8cpp__incl.pdf | Bin 22416 -> 22416 bytes .../latex/SequencedPattern_8h__dep__incl.pdf | Bin 9845 -> 9845 bytes .../orbit/latex/SequencedPattern_8h__incl.pdf | Bin 18493 -> 18493 bytes docs/orbit/latex/Serial_8cpp__incl.pdf | Bin 17420 -> 17420 bytes docs/orbit/latex/Serial_8h__dep__incl.pdf | Bin 10309 -> 10309 bytes docs/orbit/latex/Serial_8h__incl.pdf | Bin 7505 -> 7505 bytes .../latex/SingleLedPattern_8cpp__incl.pdf | Bin 16663 -> 16663 bytes .../latex/SingleLedPattern_8h__dep__incl.pdf | Bin 13276 -> 13276 bytes .../orbit/latex/SingleLedPattern_8h__incl.pdf | Bin 15365 -> 15365 bytes .../latex/SnowballPattern_8cpp__incl.pdf | Bin 20814 -> 20814 bytes .../latex/SnowballPattern_8h__dep__incl.pdf | Bin 9226 -> 9226 bytes docs/orbit/latex/SnowballPattern_8h__incl.pdf | Bin 19421 -> 19421 bytes docs/orbit/latex/SolidPattern_8cpp__incl.pdf | Bin 18999 -> 18999 bytes .../latex/SolidPattern_8h__dep__incl.pdf | Bin 8476 -> 8476 bytes docs/orbit/latex/SolidPattern_8h__incl.pdf | Bin 18606 -> 18606 bytes .../latex/SparkleTracePattern_8cpp__incl.pdf | Bin 21304 -> 21304 bytes .../SparkleTracePattern_8h__dep__incl.pdf | Bin 9019 -> 9019 bytes .../latex/SparkleTracePattern_8h__incl.pdf | Bin 18507 -> 18507 bytes docs/orbit/latex/Storage_8cpp.tex | 7 +- docs/orbit/latex/Storage_8cpp__incl.md5 | 2 +- docs/orbit/latex/Storage_8cpp__incl.pdf | Bin 16304 -> 16236 bytes docs/orbit/latex/Storage_8h__dep__incl.pdf | Bin 9398 -> 9398 bytes docs/orbit/latex/Storage_8h__incl.pdf | Bin 7462 -> 7462 bytes .../latex/TheaterChasePattern_8cpp__incl.pdf | Bin 20340 -> 20340 bytes .../TheaterChasePattern_8h__dep__incl.pdf | Bin 8766 -> 8766 bytes .../latex/TheaterChasePattern_8h__incl.pdf | Bin 18888 -> 18888 bytes docs/orbit/latex/TimeControl_8cpp__incl.pdf | Bin 17961 -> 17961 bytes .../orbit/latex/TimeControl_8h__dep__incl.pdf | Bin 33673 -> 33673 bytes docs/orbit/latex/TimeControl_8h__incl.pdf | Bin 12706 -> 12706 bytes docs/orbit/latex/Timer_8cpp__incl.pdf | Bin 16198 -> 16198 bytes docs/orbit/latex/Timer_8h__dep__incl.pdf | Bin 32947 -> 32947 bytes docs/orbit/latex/Timer_8h__incl.pdf | Bin 12621 -> 12621 bytes docs/orbit/latex/Timings_8h__dep__incl.pdf | Bin 32873 -> 32873 bytes docs/orbit/latex/Timings_8h__incl.pdf | Bin 13184 -> 13184 bytes docs/orbit/latex/VLConfig_8h__dep__incl.pdf | Bin 14684 -> 14684 bytes docs/orbit/latex/VLConfig_8h__incl.pdf | Bin 11380 -> 11380 bytes docs/orbit/latex/VLReceiver_8cpp__incl.pdf | Bin 21081 -> 21081 bytes docs/orbit/latex/VLReceiver_8h__dep__incl.pdf | Bin 7963 -> 7963 bytes docs/orbit/latex/VLReceiver_8h__incl.pdf | Bin 13865 -> 13865 bytes docs/orbit/latex/VLSender_8cpp__incl.pdf | Bin 19835 -> 19835 bytes docs/orbit/latex/VLSender_8h__dep__incl.pdf | Bin 9843 -> 9843 bytes docs/orbit/latex/VLSender_8h__incl.pdf | Bin 15366 -> 15366 bytes docs/orbit/latex/VortexConfig_8h.tex | 150 +- .../latex/VortexConfig_8h__dep__incl.pdf | Bin 43912 -> 43912 bytes docs/orbit/latex/VortexConfig_8h__incl.pdf | Bin 10535 -> 10535 bytes docs/orbit/latex/VortexEngine_8cpp__incl.pdf | Bin 26821 -> 26821 bytes .../latex/VortexEngine_8h__dep__incl.pdf | Bin 10749 -> 10749 bytes docs/orbit/latex/VortexEngine_8h__incl.pdf | Bin 11553 -> 11553 bytes .../latex/VortexWipePattern_8cpp__incl.pdf | Bin 22508 -> 22508 bytes .../latex/VortexWipePattern_8h__dep__incl.pdf | Bin 8865 -> 8865 bytes .../latex/VortexWipePattern_8h__incl.pdf | Bin 19226 -> 19226 bytes docs/orbit/latex/WarpPattern_8cpp__incl.pdf | Bin 22532 -> 22532 bytes .../orbit/latex/WarpPattern_8h__dep__incl.pdf | Bin 8847 -> 8847 bytes docs/orbit/latex/WarpPattern_8h__incl.pdf | Bin 19244 -> 19244 bytes .../latex/WarpWormPattern_8cpp__incl.pdf | Bin 22522 -> 22522 bytes .../latex/WarpWormPattern_8h__dep__incl.pdf | Bin 9016 -> 9016 bytes docs/orbit/latex/WarpWormPattern_8h__incl.pdf | Bin 19238 -> 19238 bytes docs/orbit/latex/ZigzagPattern_8cpp__incl.pdf | Bin 20748 -> 20748 bytes .../latex/ZigzagPattern_8h__dep__incl.pdf | Bin 8811 -> 8811 bytes docs/orbit/latex/ZigzagPattern_8h__incl.pdf | Bin 18450 -> 18450 bytes .../classBackStrobePattern__coll__graph.pdf | Bin 15115 -> 15115 bytes ...classBackStrobePattern__inherit__graph.pdf | Bin 8397 -> 8397 bytes .../latex/classBasicPattern__coll__graph.pdf | Bin 9987 -> 9987 bytes .../classBasicPattern__inherit__graph.pdf | Bin 8228 -> 8228 bytes docs/orbit/latex/classBlendPattern.tex | 4 +- .../latex/classBlendPattern__coll__graph.pdf | Bin 11011 -> 11011 bytes .../classBlendPattern__inherit__graph.pdf | Bin 7680 -> 7680 bytes .../classBlinkStepPattern__coll__graph.pdf | Bin 10148 -> 10148 bytes .../classBlinkStepPattern__inherit__graph.pdf | Bin 15604 -> 15604 bytes .../latex/classBouncePattern__coll__graph.pdf | Bin 10530 -> 10530 bytes .../classBouncePattern__inherit__graph.pdf | Bin 8009 -> 8009 bytes .../orbit/latex/classButtons__coll__graph.pdf | Bin 6040 -> 6040 bytes docs/orbit/latex/classByteStream.tex | 12 +- .../latex/classByteStream__coll__graph.pdf | Bin 10774 -> 10774 bytes .../latex/classChaserPattern__coll__graph.pdf | Bin 13345 -> 13345 bytes .../classChaserPattern__inherit__graph.pdf | Bin 8726 -> 8726 bytes .../latex/classColorSelect__coll__graph.pdf | Bin 11626 -> 11626 bytes .../classColorSelect__inherit__graph.pdf | Bin 6229 -> 6229 bytes .../latex/classColorsetMap__coll__graph.pdf | Bin 7737 -> 7737 bytes .../latex/classColorset__coll__graph.pdf | Bin 6977 -> 6977 bytes .../classCompoundPattern__coll__graph.pdf | Bin 9983 -> 9983 bytes .../classCompoundPattern__inherit__graph.pdf | Bin 9618 -> 9618 bytes .../classCrossDopsPattern__coll__graph.pdf | Bin 10648 -> 10648 bytes .../classCrossDopsPattern__inherit__graph.pdf | Bin 8388 -> 8388 bytes .../classDoubleStrobePattern__coll__graph.pdf | Bin 10665 -> 10665 bytes ...assDoubleStrobePattern__inherit__graph.pdf | Bin 8083 -> 8083 bytes .../classDripMorphPattern__coll__graph.pdf | Bin 11304 -> 11304 bytes .../classDripMorphPattern__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../latex/classDripPattern__coll__graph.pdf | Bin 10656 -> 10656 bytes .../classDripPattern__inherit__graph.pdf | Bin 7861 -> 7861 bytes .../classEditorConnection__coll__graph.pdf | Bin 15474 -> 15474 bytes .../classEditorConnection__inherit__graph.pdf | Bin 6250 -> 6250 bytes docs/orbit/latex/classFactoryReset.tex | 2 +- .../latex/classFactoryReset__coll__graph.pdf | Bin 11019 -> 11019 bytes .../classFactoryReset__inherit__graph.pdf | Bin 7117 -> 7117 bytes .../latex/classFillPattern__coll__graph.pdf | Bin 10631 -> 10631 bytes .../classFillPattern__inherit__graph.pdf | Bin 7827 -> 7827 bytes .../classGlobalBrightness__coll__graph.pdf | Bin 10723 -> 10723 bytes .../classGlobalBrightness__inherit__graph.pdf | Bin 7069 -> 7069 bytes .../classHueShiftPattern__coll__graph.pdf | Bin 11328 -> 11328 bytes .../classHueShiftPattern__inherit__graph.pdf | Bin 7136 -> 7136 bytes .../latex/classIRReceiver__coll__graph.pdf | Bin 6921 -> 6921 bytes .../latex/classIRSender__coll__graph.pdf | Bin 12566 -> 12566 bytes .../latex/classLedStash__coll__graph.pdf | Bin 7343 -> 7343 bytes docs/orbit/latex/classLeds.tex | 4 +- docs/orbit/latex/classLeds__coll__graph.pdf | Bin 6656 -> 6656 bytes .../classLighthousePattern__coll__graph.pdf | Bin 11679 -> 11679 bytes ...classLighthousePattern__inherit__graph.pdf | Bin 8398 -> 8398 bytes .../classMateriaPattern__coll__graph.pdf | Bin 10309 -> 10309 bytes .../classMateriaPattern__inherit__graph.pdf | Bin 6645 -> 6645 bytes docs/orbit/latex/classMenu__coll__graph.pdf | Bin 10137 -> 10137 bytes .../orbit/latex/classMenu__inherit__graph.pdf | Bin 11407 -> 11407 bytes docs/orbit/latex/classMenus__coll__graph.pdf | Bin 10539 -> 10539 bytes .../latex/classMeteorPattern__coll__graph.pdf | Bin 12013 -> 12013 bytes .../classMeteorPattern__inherit__graph.pdf | Bin 7893 -> 7893 bytes docs/orbit/latex/classMode.tex | 2 +- .../latex/classModeSharing__coll__graph.pdf | Bin 10774 -> 10774 bytes .../classModeSharing__inherit__graph.pdf | Bin 6489 -> 6489 bytes docs/orbit/latex/classMode__coll__graph.pdf | Bin 8792 -> 8792 bytes docs/orbit/latex/classModes.tex | 1189 +++++----- docs/orbit/latex/classModes_1_1ModeLink.tex | 362 ++-- .../classModes_1_1ModeLink__coll__graph.pdf | Bin 15477 -> 15477 bytes docs/orbit/latex/classModes__coll__graph.pdf | Bin 15895 -> 15895 bytes .../classMultiLedPattern__coll__graph.pdf | Bin 8682 -> 8682 bytes .../classMultiLedPattern__inherit__graph.pdf | Bin 20017 -> 20017 bytes docs/orbit/latex/classPatternBuilder.tex | 12 +- docs/orbit/latex/classPatternSelect.tex | 24 +- .../latex/classPatternSelect__coll__graph.pdf | Bin 10869 -> 10869 bytes .../classPatternSelect__inherit__graph.pdf | Bin 6358 -> 6358 bytes .../orbit/latex/classPattern__coll__graph.pdf | Bin 7703 -> 7703 bytes .../latex/classPattern__inherit__graph.pdf | Bin 21698 -> 21698 bytes .../classPulsishPattern__coll__graph.pdf | Bin 10243 -> 10243 bytes .../classPulsishPattern__inherit__graph.pdf | Bin 7002 -> 7002 bytes .../latex/classRandomizer__coll__graph.pdf | Bin 11469 -> 11469 bytes .../latex/classRandomizer__inherit__graph.pdf | Bin 6628 -> 6628 bytes .../latex/classSequenceStep__coll__graph.pdf | Bin 9239 -> 9239 bytes .../latex/classSequence__coll__graph.pdf | Bin 9644 -> 9644 bytes .../classSequencedPattern__coll__graph.pdf | Bin 12890 -> 12890 bytes .../classSequencedPattern__inherit__graph.pdf | Bin 8736 -> 8736 bytes .../classSingleLedPattern__coll__graph.pdf | Bin 8743 -> 8743 bytes .../classSingleLedPattern__inherit__graph.pdf | Bin 8203 -> 8203 bytes .../classSnowballPattern__coll__graph.pdf | Bin 11021 -> 11021 bytes .../classSnowballPattern__inherit__graph.pdf | Bin 8451 -> 8451 bytes .../latex/classSolidPattern__coll__graph.pdf | Bin 10367 -> 10367 bytes .../classSolidPattern__inherit__graph.pdf | Bin 7803 -> 7803 bytes .../classSparkleTracePattern__coll__graph.pdf | Bin 11327 -> 11327 bytes ...assSparkleTracePattern__inherit__graph.pdf | Bin 7993 -> 7993 bytes docs/orbit/latex/classStorage.tex | 335 +-- .../classTheaterChasePattern__coll__graph.pdf | Bin 10604 -> 10604 bytes ...assTheaterChasePattern__inherit__graph.pdf | Bin 8301 -> 8301 bytes docs/orbit/latex/classTime.tex | 2 +- .../latex/classVLSender__coll__graph.pdf | Bin 12742 -> 12742 bytes docs/orbit/latex/classVortexEngine.tex | 6 +- .../classVortexWipePattern__coll__graph.pdf | Bin 11406 -> 11406 bytes ...classVortexWipePattern__inherit__graph.pdf | Bin 8734 -> 8734 bytes .../latex/classWarpPattern__coll__graph.pdf | Bin 10898 -> 10898 bytes .../classWarpPattern__inherit__graph.pdf | Bin 8087 -> 8087 bytes .../classWarpWormPattern__coll__graph.pdf | Bin 10904 -> 10904 bytes .../classWarpWormPattern__inherit__graph.pdf | Bin 8404 -> 8404 bytes ...assZigzagPattern_1_1Snake__coll__graph.pdf | Bin 9467 -> 9467 bytes .../latex/classZigzagPattern__coll__graph.pdf | Bin 11786 -> 11786 bytes .../classZigzagPattern__inherit__graph.pdf | Bin 7152 -> 7152 bytes ...r_1d79b4615f725ce6e1b38311d89b4d4f_dep.pdf | Bin 17959 -> 17959 bytes ...r_47fec278782816999705227d1066c7a6_dep.pdf | Bin 27862 -> 27862 bytes ...r_4d7f8bf987ecca6ad9438e8e8937cf95_dep.pdf | Bin 29165 -> 29165 bytes ...r_60d51ee7315d72413f26211ac43a217e_dep.pdf | Bin 11746 -> 11746 bytes ...r_61b212e579fd471c490a116dc3a4c8cf_dep.pdf | Bin 12349 -> 12349 bytes ...r_63ce3ba067bdf35a8f7c780ac03d51a3_dep.pdf | Bin 11519 -> 11519 bytes ...r_64b4510cba155c652ac883383ddf0b92_dep.md5 | 2 +- ...r_64b4510cba155c652ac883383ddf0b92_dep.pdf | Bin 39816 -> 39816 bytes ...r_7e29431de6169dbb5f5ee7a990ed2b16_dep.pdf | Bin 7812 -> 7812 bytes ...r_7e4d93e079ad601e0006c23ac3d37255_dep.md5 | 2 +- ...r_7e4d93e079ad601e0006c23ac3d37255_dep.pdf | Bin 41029 -> 41030 bytes ...r_938e62fdb5540a46e6e0c12f6b77804d_dep.pdf | Bin 11867 -> 11867 bytes ...r_9a5c88f87170865d940dc95c76676edb_dep.pdf | Bin 10349 -> 10349 bytes ...r_cabf3d63e98569a74ecb960b83c4a15b_dep.pdf | Bin 13013 -> 13013 bytes ...r_ce91f970b513fb5ff406625265505b14_dep.pdf | Bin 13870 -> 13870 bytes ...r_cfa97f0e2c08f470d5e70542e8b74b9a_dep.pdf | Bin 6963 -> 6963 bytes ...r_d3731d706719beb3d6001df5dcff2644_dep.pdf | Bin 25827 -> 25827 bytes ...r_df02266255841645c523fab960c9ed1d_dep.md5 | 2 +- ...r_df02266255841645c523fab960c9ed1d_dep.pdf | Bin 41022 -> 41022 bytes ...r_fa5f32c9390e3ea098144f298be2a395_dep.pdf | Bin 22633 -> 22633 bytes ...r_ff5a4dc0324506fcdfb8f8f681f9dae7_dep.pdf | Bin 9962 -> 9962 bytes ...tLZ4__stream__t__internal__coll__graph.pdf | Bin 6930 -> 6930 bytes .../latex/structMenuEntry__coll__graph.pdf | Bin 11124 -> 11124 bytes ...unionLZ4__streamDecode__u__coll__graph.pdf | Bin 7287 -> 7287 bytes .../unionLZ4__stream__u__coll__graph.pdf | Bin 7730 -> 7730 bytes docs/orbit/navtreedata.js | 12 +- docs/orbit/navtreeindex1.js | 4 +- docs/orbit/navtreeindex3.js | 42 +- docs/orbit/navtreeindex4.js | 36 +- docs/orbit/navtreeindex5.js | 6 +- docs/orbit/navtreeindex6.js | 6 +- docs/orbit/navtreeindex7.js | 46 +- docs/orbit/navtreeindex8.js | 14 +- docs/orbit/navtreeindex9.js | 10 +- docs/orbit/search/all_10.js | 26 +- docs/orbit/search/all_11.js | 354 +-- docs/orbit/search/all_12.js | 325 +-- docs/orbit/search/all_13.js | 60 +- docs/orbit/search/all_14.js | 37 +- docs/orbit/search/all_15.js | 136 +- docs/orbit/search/all_16.js | 30 +- docs/orbit/search/all_17.js | 6 +- docs/orbit/search/all_18.js | 90 +- docs/orbit/search/all_4.js | 2 +- docs/orbit/search/all_8.js | 4 +- docs/orbit/search/all_b.js | 119 +- docs/orbit/search/all_c.js | 468 ++-- docs/orbit/search/all_d.js | 53 +- docs/orbit/search/all_e.js | 74 +- docs/orbit/search/all_f.js | 268 +-- docs/orbit/search/classes_0.js | 18 +- docs/orbit/search/classes_1.js | 12 +- docs/orbit/search/classes_10.js | 2 +- docs/orbit/search/classes_2.js | 8 +- docs/orbit/search/classes_3.js | 2 +- docs/orbit/search/classes_4.js | 4 +- docs/orbit/search/classes_5.js | 2 +- docs/orbit/search/classes_6.js | 4 +- docs/orbit/search/classes_7.js | 4 +- docs/orbit/search/classes_8.js | 14 +- docs/orbit/search/classes_9.js | 20 +- docs/orbit/search/classes_a.js | 12 +- docs/orbit/search/classes_b.js | 8 +- docs/orbit/search/classes_c.js | 20 +- docs/orbit/search/classes_d.js | 6 +- docs/orbit/search/classes_e.js | 6 +- docs/orbit/search/classes_f.js | 4 +- docs/orbit/search/defines_0.js | 48 +- docs/orbit/search/defines_1.js | 20 +- docs/orbit/search/defines_10.js | 22 +- docs/orbit/search/defines_11.js | 6 +- docs/orbit/search/defines_12.js | 84 +- docs/orbit/search/defines_13.js | 4 +- docs/orbit/search/defines_2.js | 16 +- docs/orbit/search/defines_3.js | 30 +- docs/orbit/search/defines_4.js | 54 +- docs/orbit/search/defines_5.js | 12 +- docs/orbit/search/defines_6.js | 2 +- docs/orbit/search/defines_7.js | 48 +- docs/orbit/search/defines_8.js | 60 +- docs/orbit/search/defines_9.js | 2 +- docs/orbit/search/defines_a.js | 58 +- docs/orbit/search/defines_b.js | 125 +- docs/orbit/search/defines_c.js | 15 +- docs/orbit/search/defines_d.js | 18 +- docs/orbit/search/defines_e.js | 206 +- docs/orbit/search/defines_f.js | 40 +- docs/orbit/search/enums_0.js | 6 +- docs/orbit/search/enums_1.js | 4 +- docs/orbit/search/enums_2.js | 6 +- docs/orbit/search/enums_3.js | 2 +- docs/orbit/search/enums_4.js | 4 +- docs/orbit/search/enums_5.js | 8 +- docs/orbit/search/enums_6.js | 8 +- docs/orbit/search/enums_7.js | 2 +- docs/orbit/search/enums_8.js | 6 +- docs/orbit/search/enums_9.js | 2 +- docs/orbit/search/enums_a.js | 4 +- docs/orbit/search/enumvalues_0.js | 6 +- docs/orbit/search/enumvalues_1.js | 2 +- docs/orbit/search/enumvalues_10.js | 4 +- docs/orbit/search/enumvalues_11.js | 16 +- docs/orbit/search/enumvalues_12.js | 6 +- docs/orbit/search/enumvalues_2.js | 6 +- docs/orbit/search/enumvalues_3.js | 6 +- docs/orbit/search/enumvalues_4.js | 2 +- docs/orbit/search/enumvalues_5.js | 22 +- docs/orbit/search/enumvalues_6.js | 4 +- docs/orbit/search/enumvalues_7.js | 74 +- docs/orbit/search/enumvalues_8.js | 34 +- docs/orbit/search/enumvalues_9.js | 6 +- docs/orbit/search/enumvalues_a.js | 2 +- docs/orbit/search/enumvalues_b.js | 168 +- docs/orbit/search/enumvalues_c.js | 16 +- docs/orbit/search/enumvalues_d.js | 26 +- docs/orbit/search/enumvalues_e.js | 72 +- docs/orbit/search/enumvalues_f.js | 4 +- docs/orbit/search/files_0.js | 36 +- docs/orbit/search/files_1.js | 30 +- docs/orbit/search/files_10.js | 4 +- docs/orbit/search/files_2.js | 16 +- docs/orbit/search/files_3.js | 8 +- docs/orbit/search/files_4.js | 8 +- docs/orbit/search/files_5.js | 4 +- docs/orbit/search/files_6.js | 4 +- docs/orbit/search/files_7.js | 10 +- docs/orbit/search/files_8.js | 18 +- docs/orbit/search/files_9.js | 36 +- docs/orbit/search/files_a.js | 22 +- docs/orbit/search/files_b.js | 8 +- docs/orbit/search/files_c.js | 32 +- docs/orbit/search/files_d.js | 14 +- docs/orbit/search/files_e.js | 20 +- docs/orbit/search/files_f.js | 8 +- docs/orbit/search/functions_0.js | 6 +- docs/orbit/search/functions_1.js | 40 +- docs/orbit/search/functions_10.js | 8 +- docs/orbit/search/functions_11.js | 104 +- docs/orbit/search/functions_12.js | 171 +- docs/orbit/search/functions_13.js | 14 +- docs/orbit/search/functions_14.js | 19 +- docs/orbit/search/functions_15.js | 8 +- docs/orbit/search/functions_16.js | 12 +- docs/orbit/search/functions_17.js | 2 +- docs/orbit/search/functions_18.js | 90 +- docs/orbit/search/functions_2.js | 80 +- docs/orbit/search/functions_3.js | 104 +- docs/orbit/search/functions_4.js | 30 +- docs/orbit/search/functions_5.js | 14 +- docs/orbit/search/functions_6.js | 10 +- docs/orbit/search/functions_7.js | 52 +- docs/orbit/search/functions_8.js | 30 +- docs/orbit/search/functions_9.js | 46 +- docs/orbit/search/functions_a.js | 2 +- docs/orbit/search/functions_b.js | 102 +- docs/orbit/search/functions_c.js | 38 +- docs/orbit/search/functions_d.js | 26 +- docs/orbit/search/functions_e.js | 68 +- docs/orbit/search/functions_f.js | 44 +- docs/orbit/search/related_0.js | 2 +- docs/orbit/search/related_1.js | 2 +- docs/orbit/search/related_2.js | 2 +- docs/orbit/search/typedefs_0.js | 4 +- docs/orbit/search/typedefs_1.js | 2 +- docs/orbit/search/typedefs_2.js | 2 +- docs/orbit/search/typedefs_3.js | 16 +- docs/orbit/search/typedefs_4.js | 2 +- docs/orbit/search/typedefs_5.js | 2 +- docs/orbit/search/typedefs_6.js | 2 +- docs/orbit/search/typedefs_7.js | 8 +- docs/orbit/search/variables_0.js | 18 +- docs/orbit/search/variables_1.js | 10 +- docs/orbit/search/variables_10.js | 4 +- docs/orbit/search/variables_11.js | 4 +- docs/orbit/search/variables_2.js | 10 +- docs/orbit/search/variables_3.js | 12 +- docs/orbit/search/variables_4.js | 4 +- docs/orbit/search/variables_5.js | 2 +- docs/orbit/search/variables_6.js | 12 +- docs/orbit/search/variables_7.js | 4 +- docs/orbit/search/variables_8.js | 8 +- docs/orbit/search/variables_9.js | 10 +- docs/orbit/search/variables_a.js | 314 +-- docs/orbit/search/variables_b.js | 8 +- docs/orbit/search/variables_c.js | 4 +- docs/orbit/search/variables_d.js | 6 +- docs/orbit/search/variables_e.js | 2 +- docs/orbit/search/variables_f.js | 10 +- docs/orbit/structdefault__mode__entry.html | 6 +- 3042 files changed, 49143 insertions(+), 47800 deletions(-) delete mode 100644 docs/duo/dir_000016_000004.html diff --git a/docs/core/BlendPattern_8cpp_source.html b/docs/core/BlendPattern_8cpp_source.html index 182d3f91e2..5306d51950 100644 --- a/docs/core/BlendPattern_8cpp_source.html +++ b/docs/core/BlendPattern_8cpp_source.html @@ -135,7 +135,7 @@
46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -145,7 +145,7 @@
56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/core/Buttons_8h_source.html b/docs/core/Buttons_8h_source.html index e7a7c42343..b5636c6b9b 100644 --- a/docs/core/Buttons_8h_source.html +++ b/docs/core/Buttons_8h_source.html @@ -92,7 +92,7 @@
3 
4 #include "Button.h"
5 
-
6 // the number of buttons, this isn't an arduino config because
+
6 // the number of buttons, this isn't in VortexConfig.h because
7 // changing it won't really work without updating other things
8 // like which pins the buttons are attached to. So this is more
9 // of a hardcoded constant than a configuration setting
diff --git a/docs/core/ColorSelect_8cpp_source.html b/docs/core/ColorSelect_8cpp_source.html index 2057f9a131..2b454ba82a 100644 --- a/docs/core/ColorSelect_8cpp_source.html +++ b/docs/core/ColorSelect_8cpp_source.html @@ -211,7 +211,7 @@
122  }
123  // reuse these variables lots
124  uint8_t numColors = m_colorset.numColors();
-
125  uint8_t holdDur = g_pButton->holdDuration();
+
125  uint32_t holdDur = g_pButton->holdDuration();
126  switch (m_state) {
127  case STATE_INIT:
128  // nothing
@@ -424,7 +424,7 @@
virtual void init()
Definition: Mode.cpp:120
bool isEmpty() const
Definition: Mode.cpp:735
bool setColorsetMap(LedMap map, const Colorset &set)
Definition: Mode.cpp:616
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
Definition: ColorTypes.h:57
bool empty() const
Definition: ColorTypes.cpp:181
static uint32_t getCurtime()
Definition: TimeControl.h:40
diff --git a/docs/core/ColorSelect_8h_source.html b/docs/core/ColorSelect_8h_source.html index a57a4a7597..811766da71 100644 --- a/docs/core/ColorSelect_8h_source.html +++ b/docs/core/ColorSelect_8h_source.html @@ -157,14 +157,14 @@
68 };
69 
70 #endif
-
#define VAL_OPTION_1
Definition: VortexConfig.h:298
-
#define VAL_OPTION_2
Definition: VortexConfig.h:299
-
#define SAT_OPTION_3
Definition: VortexConfig.h:291
-
#define VAL_OPTION_4
Definition: VortexConfig.h:301
-
#define SAT_OPTION_2
Definition: VortexConfig.h:290
-
#define SAT_OPTION_4
Definition: VortexConfig.h:292
-
#define VAL_OPTION_3
Definition: VortexConfig.h:300
-
#define SAT_OPTION_1
Definition: VortexConfig.h:289
+
#define VAL_OPTION_1
Definition: VortexConfig.h:297
+
#define VAL_OPTION_2
Definition: VortexConfig.h:298
+
#define SAT_OPTION_3
Definition: VortexConfig.h:290
+
#define VAL_OPTION_4
Definition: VortexConfig.h:300
+
#define SAT_OPTION_2
Definition: VortexConfig.h:289
+
#define SAT_OPTION_4
Definition: VortexConfig.h:291
+
#define VAL_OPTION_3
Definition: VortexConfig.h:299
+
#define SAT_OPTION_1
Definition: VortexConfig.h:288
Definition: ColorSelect.h:9
const uint8_t vals[4]
Definition: ColorSelect.h:48
bool init() override
Definition: ColorSelect.cpp:37
diff --git a/docs/core/ColorTypes_8cpp.html b/docs/core/ColorTypes_8cpp.html index d794f77929..48912dcbb8 100644 --- a/docs/core/ColorTypes_8cpp.html +++ b/docs/core/ColorTypes_8cpp.html @@ -363,7 +363,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/core/ColorTypes_8cpp_source.html b/docs/core/ColorTypes_8cpp_source.html index 3f57b6ed02..6b63bb6ea3 100644 --- a/docs/core/ColorTypes_8cpp_source.html +++ b/docs/core/ColorTypes_8cpp_source.html @@ -330,7 +330,7 @@
241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/core/ColorTypes_8h.html b/docs/core/ColorTypes_8h.html index 88a4654791..200b9ce35a 100644 --- a/docs/core/ColorTypes_8h.html +++ b/docs/core/ColorTypes_8h.html @@ -282,7 +282,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/core/DefaultModes_8cpp.html b/docs/core/DefaultModes_8cpp.html index 17e9331791..5d58f66b26 100644 --- a/docs/core/DefaultModes_8cpp.html +++ b/docs/core/DefaultModes_8cpp.html @@ -102,27 +102,27 @@ - - - + + +

Variables

const default_mode_entry default_modes []
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

- +
const default_mode_entry default_modes[]const default_mode_entry default_modes[MAX_MODES]

Definition at line 7 of file DefaultModes.cpp.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -133,14 +133,14 @@

- +
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
diff --git a/docs/core/DefaultModes_8cpp.js b/docs/core/DefaultModes_8cpp.js index 6fa5e6eaa9..d71b7f5f31 100644 --- a/docs/core/DefaultModes_8cpp.js +++ b/docs/core/DefaultModes_8cpp.js @@ -1,5 +1,5 @@ var DefaultModes_8cpp = [ - [ "default_modes", "DefaultModes_8cpp.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8cpp.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8cpp.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/core/DefaultModes_8cpp_source.html b/docs/core/DefaultModes_8cpp_source.html index 0e7cfeea80..eb18003755 100644 --- a/docs/core/DefaultModes_8cpp_source.html +++ b/docs/core/DefaultModes_8cpp_source.html @@ -93,7 +93,7 @@
4 
5 // Here is the array of 'default modes' that are assigned to
6 // the gloveset upon factory reset
- +
8  {
9  PATTERN_DOPS, 5, {
10  RGB_RED,
@@ -215,14 +215,14 @@
126 };
127 
128 // exposed size of the default modes array
-
129 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
+
129 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
#define RGB_BLUE
#define RGB_OFF
#define RGB_RED
#define RGB_GREEN
#define RGB_WHITE
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ PATTERN_ZIGZAG
Definition: Patterns.h:74
@ PATTERN_STROBE
Definition: Patterns.h:25
@@ -235,6 +235,7 @@
@ PATTERN_ULTRADOPS
Definition: Patterns.h:30
@ PATTERN_WARPWORM
Definition: Patterns.h:84
@ PATTERN_SNOWBALL
Definition: Patterns.h:85
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
diff --git a/docs/core/DefaultModes_8h.html b/docs/core/DefaultModes_8h.html index f371c8280e..ed35d6e5d6 100644 --- a/docs/core/DefaultModes_8h.html +++ b/docs/core/DefaultModes_8h.html @@ -114,14 +114,14 @@ - - + +

Variables

const default_mode_entry default_modes []
 
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

@@ -168,7 +168,7 @@

Definition at line 129 of file DefaultModes.cpp.

-

Referenced by Modes::setDefaults().

+

Referenced by Modes::setDefaults().

diff --git a/docs/core/DefaultModes_8h.js b/docs/core/DefaultModes_8h.js index 19b3bcd9a1..471875a243 100644 --- a/docs/core/DefaultModes_8h.js +++ b/docs/core/DefaultModes_8h.js @@ -1,6 +1,6 @@ var DefaultModes_8h = [ [ "default_mode_entry", "structdefault__mode__entry.html", "structdefault__mode__entry" ], - [ "default_modes", "DefaultModes_8h.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8h.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8h.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/core/DefaultModes_8h_source.html b/docs/core/DefaultModes_8h_source.html index cc65b21dd0..2a2f47dc63 100644 --- a/docs/core/DefaultModes_8h_source.html +++ b/docs/core/DefaultModes_8h_source.html @@ -102,16 +102,17 @@
13 };
14 
15 // exposed global array of default modes
-
16 extern const default_mode_entry default_modes[];
+
17 
18 // exposed size of the default modes array
19 extern const uint8_t num_default_modes;
20 
21 #endif
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
PatternID
Definition: Patterns.h:12
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
uint32_t cols[MAX_COLOR_SLOTS]
Definition: DefaultModes.h:12
PatternID patternID
Definition: DefaultModes.h:10
diff --git a/docs/core/EditorConnection_8cpp_source.html b/docs/core/EditorConnection_8cpp_source.html index ff65ab7084..df2235bd63 100644 --- a/docs/core/EditorConnection_8cpp_source.html +++ b/docs/core/EditorConnection_8cpp_source.html @@ -387,18 +387,18 @@
@ LED_ALL
Definition: LedTypes.h:36
#define DEBUG_LOG(msg)
Definition: Log.h:40
@ PATTERN_STROBE
Definition: Patterns.h:25
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:466
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:469
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:492
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:457
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:481
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:465
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:468
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:491
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:456
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:480
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:472
const uint8_t * data() const
Definition: ByteStream.h:120
void * rawData() const
Definition: ByteStream.h:121
@@ -455,9 +455,9 @@
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static bool checkSerial()
Definition: Serial.cpp:36
diff --git a/docs/core/FactoryReset_8cpp_source.html b/docs/core/FactoryReset_8cpp_source.html index 8e1caf3cf6..9212423304 100644 --- a/docs/core/FactoryReset_8cpp_source.html +++ b/docs/core/FactoryReset_8cpp_source.html @@ -167,7 +167,7 @@
78  if (m_advanced) {
79  uint8_t curModeIndex = Modes::curModeIndex();
80  // reset the target mode slot on the target led
-
81  const default_mode_entry &def = default_modes[curModeIndex];
+
81  const default_mode_entry &def = default_modes[curModeIndex];
82  Colorset set(def.numColors, def.cols);
83  Mode *cur = Modes::curMode();
84  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -218,7 +218,7 @@
#define RGB_WHITE0
#define RGB_RED4
#define RGB_WHITE
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ LED_MULTI
Definition: LedTypes.h:42
#define MAP_LED(led)
Definition: LedTypes.h:97
@@ -256,10 +256,10 @@
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static void resetFlags()
Definition: Modes.cpp:590
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static void resetFlags()
Definition: Modes.cpp:659
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
diff --git a/docs/core/GlobalBrightness_8h_source.html b/docs/core/GlobalBrightness_8h_source.html index 86277b8f35..1e0eab9f23 100644 --- a/docs/core/GlobalBrightness_8h_source.html +++ b/docs/core/GlobalBrightness_8h_source.html @@ -118,10 +118,10 @@
29 };
30 
31 #endif
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279
MenuAction run() override
const uint8_t m_brightnessOptions[4]
diff --git a/docs/core/Log_8h_source.html b/docs/core/Log_8h_source.html index f7a7e1982b..1539db0b04 100644 --- a/docs/core/Log_8h_source.html +++ b/docs/core/Log_8h_source.html @@ -120,7 +120,7 @@
31 #endif
32 
33 #if LOGGING_LEVEL > 2
-
34 // arduino compiler won't allow for ellipsis macro that's passed no args...
+
34 // some compilers won't allow for ellipsis macro that's passed no args...
35 #define DEBUG_LOG(msg) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg)
36 #define DEBUG_LOGF(msg, ...) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg, __VA_ARGS__)
37 // debug messages are only in debug builds so they have full file + func + line info
diff --git a/docs/core/Memory_8cpp_source.html b/docs/core/Memory_8cpp_source.html index e6a27da2b8..326c63fa8f 100644 --- a/docs/core/Memory_8cpp_source.html +++ b/docs/core/Memory_8cpp_source.html @@ -235,7 +235,7 @@
#define vfree(ptr)
Definition: Memory.h:35
#define vmalloc(size)
Definition: Memory.h:32
-
#define MAX_MEMORY
Definition: VortexConfig.h:207
+
#define MAX_MEMORY
Definition: VortexConfig.h:206
diff --git a/docs/core/Menu_8cpp_source.html b/docs/core/Menu_8cpp_source.html index a62bfb5263..28d87b760c 100644 --- a/docs/core/Menu_8cpp_source.html +++ b/docs/core/Menu_8cpp_source.html @@ -315,9 +315,9 @@
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static uint8_t numModes()
Definition: Modes.h:92
uint8_t blue
Definition: ColorTypes.h:90
diff --git a/docs/core/Menus_8cpp.html b/docs/core/Menus_8cpp.html index b84fe8971c..2a117f3b40 100644 --- a/docs/core/Menus_8cpp.html +++ b/docs/core/Menus_8cpp.html @@ -270,19 +270,19 @@

ENTRY(FactoryReset, RGB_MENU_FACTORY_RESET),
}
#define ENTRY(classname, color)
Definition: Menus.cpp:49
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:434
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:440
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:443
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:428
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:437
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:425
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:431
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:433
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:439
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:442
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:427
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:436
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:424
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:430
- +

Definition at line 53 of file Menus.cpp.

diff --git a/docs/core/Menus_8cpp__incl.md5 b/docs/core/Menus_8cpp__incl.md5 index 45e17c4a80..3c10dd2b4d 100644 --- a/docs/core/Menus_8cpp__incl.md5 +++ b/docs/core/Menus_8cpp__incl.md5 @@ -1 +1 @@ -16d49a51ce4fc26c1df4bd46bcc50f3d \ No newline at end of file +ef94412480825982f4c518ea91add3f9 \ No newline at end of file diff --git a/docs/core/Menus_8cpp__incl.svg b/docs/core/Menus_8cpp__incl.svg index 576c270bc9..99ffde2282 100644 --- a/docs/core/Menus_8cpp__incl.svg +++ b/docs/core/Menus_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -68,151 +68,151 @@ var sectionId = 'dynsection-0'; Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -224,583 +224,577 @@ var sectionId = 'dynsection-0'; - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/core/Menus_8cpp__incl_org.svg b/docs/core/Menus_8cpp__incl_org.svg index 95ad42186f..4e90fd3e8b 100644 --- a/docs/core/Menus_8cpp__incl_org.svg +++ b/docs/core/Menus_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/Menus.cpp Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -22,151 +22,151 @@ Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -178,583 +178,577 @@ - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/core/Menus_8cpp_source.html b/docs/core/Menus_8cpp_source.html index 24055adcc3..10a8c56644 100644 --- a/docs/core/Menus_8cpp_source.html +++ b/docs/core/Menus_8cpp_source.html @@ -406,13 +406,13 @@
#define HYPERSTROBE_OFF_DURATION
Definition: Timings.h:36
#define ADV_MENU_DURATION_TICKS
Definition: Timings.h:22
#define ADVANCED_MENU_CLICKS
Definition: VortexConfig.h:71
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:434
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:440
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:443
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:428
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:437
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:425
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:431
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:433
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:439
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:442
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:427
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:436
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:424
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:430
uint32_t holdDuration() const
Definition: Button.h:47
uint32_t pressTime() const
Definition: Button.h:42
bool onShortClick() const
Definition: Button.h:34
@@ -461,7 +461,7 @@
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
static bool advancedMenusEnabled()
Definition: Modes.h:132
- +
uint8_t blue
Definition: ColorTypes.h:90
uint8_t green
Definition: ColorTypes.h:89
diff --git a/docs/core/ModeSharing_8cpp_source.html b/docs/core/ModeSharing_8cpp_source.html index 1c06727253..42863f1656 100644 --- a/docs/core/ModeSharing_8cpp_source.html +++ b/docs/core/ModeSharing_8cpp_source.html @@ -348,8 +348,8 @@
void onLongClick() override
Definition: ModeSharing.cpp:87
void showReceiveMode()
virtual void play()
Definition: Mode.cpp:139
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool loadMode(const Mode *targetMode)
Definition: VLSender.cpp:42
diff --git a/docs/core/Modes_8cpp_source.html b/docs/core/Modes_8cpp_source.html index 965482d8fa..86247873a1 100644 --- a/docs/core/Modes_8cpp_source.html +++ b/docs/core/Modes_8cpp_source.html @@ -164,900 +164,969 @@
76 }
77 
-
78 // full save/load to/from buffer
-
79 bool Modes::saveToBuffer(ByteStream &modesBuffer)
-
80 {
-
81  // serialize the engine version into the modes buffer
-
82  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
83  return false;
-
84  }
-
85  // NOTE: instead of global brightness the duo uses this to store the
-
86  // startup mode ID. The duo doesn't offer a global brightness option
-
87  if (!modesBuffer.serialize(m_globalFlags)) {
-
88  return false;
-
89  }
-
90  // serialize the global brightness
-
91  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
92  return false;
-
93  }
-
94  // serialize all modes data into the modesBuffer
-
95  if (!serialize(modesBuffer)) {
-
96  return false;
-
97  }
-
98  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
99  if (!modesBuffer.compress()) {
-
100  return false;
-
101  }
-
102  return true;
-
103 }
-
104 
-
105 // load modes from a save buffer
- -
107 {
-
108  if (!modesBuffer.decompress()) {
-
109  // failed to decompress?
+ +
79 {
+
80  // serialize the engine version into the modes buffer
+
81  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
82  return false;
+
83  }
+
84  // NOTE: instead of global brightness the duo uses this to store the
+
85  // startup mode ID. The duo doesn't offer a global brightness option
+
86  if (!saveBuffer.serialize(m_globalFlags)) {
+
87  return false;
+
88  }
+
89  // serialize the global brightness
+
90  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
91  return false;
+
92  }
+
93  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
94  return true;
+
95 }
+
96 
+ +
98 {
+
99  // reset the unserializer index before unserializing anything
+
100  saveHeader.resetUnserializer();
+
101  uint8_t major = 0;
+
102  uint8_t minor = 0;
+
103  // unserialize the vortex version
+
104  saveHeader.unserialize(&major);
+
105  saveHeader.unserialize(&minor);
+
106  // check the version for incompatibility
+
107  if (!VortexEngine::checkVersion(major, minor)) {
+
108  // incompatible version
+
109  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
110  return false;
111  }
-
112  // reset the unserializer index before unserializing anything
-
113  modesBuffer.resetUnserializer();
-
114  uint8_t major = 0;
-
115  uint8_t minor = 0;
-
116  // unserialize the vortex version
-
117  modesBuffer.unserialize(&major);
-
118  modesBuffer.unserialize(&minor);
-
119  // check the version for incompatibility
-
120  if (!VortexEngine::checkVersion(major, minor)) {
-
121  // incompatible version
-
122  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
123  return false;
-
124  }
-
125  // NOTE: instead of global brightness the duo uses this to store the
-
126  // startup mode ID. The duo doesn't offer a global brightness option
-
127  // unserialize the global brightness
-
128  modesBuffer.unserialize(&m_globalFlags);
-
129  // unserialize the global brightness
-
130  uint8_t brightness = 0;
-
131  modesBuffer.unserialize(&brightness);
-
132  if (brightness) {
-
133  Leds::setBrightness(brightness);
-
134  }
-
135  // now just unserialize the list of modes
-
136  if (!unserialize(modesBuffer)) {
-
137  return false;
-
138  }
-
139  // startupMode is 1-based offset that encodes both the index to start at and
-
140  // whether the system is enabled, hence why 0 cannot be used as an offset
-
141  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
142  if (oneClickModeEnabled() && startupMode > 0) {
-
143  // set the current mode to the startup mode
- -
145  }
-
146  return true;
-
147 }
-
148 
- -
150 {
-
151  // this is good on memory, but it erases what they have stored
-
152  // before we know whether there is something actually saved
-
153  clearModes();
-
154  ByteStream modesBuffer;
-
155  // only read storage if the modebuffer isn't filled
-
156  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
157  DEBUG_LOG("Empty buffer read from storage");
-
158  // this kinda sucks whatever they had loaded is gone
-
159  return false;
-
160  }
-
161  return loadFromBuffer(modesBuffer);
-
162 }
-
163 
-
164 // NOTE: Flash storage is limited to about 10,000 writes so
-
165 // use this function sparingly!
- -
167 {
-
168  DEBUG_LOG("Saving modes...");
-
169  // A ByteStream to hold all the serialized data
-
170  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
171  // save data to the buffer
-
172  if (!saveToBuffer(modesBuffer)) {
-
173  return false;
-
174  }
-
175  // write the serial buffer to flash storage, this
-
176  // will compress the buffer and include crc/flags
-
177  if (!Storage::write(modesBuffer)) {
-
178  DEBUG_LOG("Failed to write storage");
-
179  return false;
-
180  }
-
181  DEBUG_LOG("Success saving modes to storage");
-
182  return true;
-
183 }
-
184 
-
185 // Save all of the modes to a serial buffer
-
186 bool Modes::serialize(ByteStream &modesBuffer)
-
187 {
-
188  // serialize the number of modes
-
189  if (!modesBuffer.serialize(m_numModes)) {
+
112  // NOTE: instead of global brightness the duo uses this to store the
+
113  // startup mode ID. The duo doesn't offer a global brightness option
+
114  // unserialize the global brightness
+
115  saveHeader.unserialize(&m_globalFlags);
+
116  // unserialize the global brightness
+
117  uint8_t brightness = 0;
+
118  saveHeader.unserialize(&brightness);
+
119  if (brightness) {
+
120  Leds::setBrightness(brightness);
+
121  }
+
122  return true;
+
123 }
+
124 
+
125 // full save/load to/from buffer
+
126 bool Modes::saveToBuffer(ByteStream &modesBuffer)
+
127 {
+
128  // first write out the header
+
129  if (!serializeSaveHeader(modesBuffer)) {
+
130  return false;
+
131  }
+
132  // serialize all modes data into the modesBuffer
+
133  if (!serialize(modesBuffer)) {
+
134  return false;
+
135  }
+
136  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
137  if (!modesBuffer.compress()) {
+
138  return false;
+
139  }
+
140  return true;
+
141 }
+
142 
+
143 // load modes from a save buffer
+ +
145 {
+
146  if (!modesBuffer.decompress()) {
+
147  // failed to decompress?
+
148  return false;
+
149  }
+
150  // read out the header first
+
151  if (!unserializeSaveHeader(modesBuffer)) {
+
152  return false;
+
153  }
+
154  // now just unserialize the list of modes
+
155  if (!unserialize(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // startupMode is 1-based offset that encodes both the index to start at and
+
159  // whether the system is enabled, hence why 0 cannot be used as an offset
+
160  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
161  if (oneClickModeEnabled() && startupMode > 0) {
+
162  // set the current mode to the startup mode
+ +
164  }
+
165  return true;
+
166 }
+
167 
+ +
169 {
+
170  ByteStream headerBuffer;
+
171  // only read storage if the modebuffer isn't filled
+
172  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
173  DEBUG_LOG("Empty buffer read from storage");
+
174  // this kinda sucks whatever they had loaded is gone
+
175  return false;
+
176  }
+
177  // this erases what is stored before we know whether there is data
+
178  // but it's the easiest way to just re-load new data from storage
+
179  clearModes();
+
180  // read the header and load the data
+
181  if (!unserializeSaveHeader(headerBuffer)) {
+
182  return false;
+
183  }
+
184  // unserialize the number of modes next
+
185  uint8_t numModes = 0;
+
186  headerBuffer.unserialize(&numModes);
+
187  if (!numModes) {
+
188  DEBUG_LOG("Did not find any modes");
+
189  // this kinda sucks whatever they had loaded is gone
190  return false;
191  }
-
192  // make sure the current mode is saved in case it has changed somehow
-
193  saveCurMode();
-
194  // uninstantiate cur mode so we have stack space to serialize
-
195  if (m_pCurModeLink) {
- -
197  }
-
198  ModeLink *ptr = m_storedModes;
-
199  while (ptr) {
-
200  // instantiate the mode temporarily
-
201  Mode *mode = ptr->instantiate();
-
202  if (!mode) {
- -
204  return false;
-
205  }
-
206  // serialize it into the target modes buffer
-
207  mode->serialize(modesBuffer);
-
208  // just uninstansiate the mode after serializing
-
209  ptr->uninstantiate();
-
210  // next mode
-
211  ptr = ptr->next();
-
212  }
-
213  // reinstanstiate the current mode
- -
215  return false;
-
216  }
-
217  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
218  return true;
-
219 }
-
220 
-
221 // load all modes from a serial buffer
-
222 bool Modes::unserialize(ByteStream &modesBuffer)
-
223 {
-
224  DEBUG_LOG("Loading modes...");
-
225  // this is good on memory, but it erases what they have stored before we
-
226  // know whether there is something actually saved in the serial buffer
-
227  clearModes();
-
228  // unserialize the number of modes next
-
229  uint8_t numModes = 0;
-
230  modesBuffer.unserialize(&numModes);
-
231  if (!numModes) {
-
232  DEBUG_LOG("Did not find any modes");
-
233  // this kinda sucks whatever they had loaded is gone
-
234  return false;
-
235  }
-
236  // foreach expected mode
-
237  for (uint8_t i = 0; i < numModes; ++i) {
-
238  // just copy the serialized mode into the internal storage because
-
239  // we store the modes in a serialized manner so that they are smaller
-
240  // then we unpack them when we instantiate the mode
-
241  if (!addSerializedMode(modesBuffer)) {
-
242  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
243  // clear work so far?
-
244  clearModes();
-
245  return false;
-
246  }
-
247  }
-
248  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
249  return (m_numModes == numModes);
-
250 }
-
251 
- -
253 {
-
254  clearModes();
-
255 #if DEMO_ALL_PATTERNS == 1
-
256  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
257  PatternID default_start = PATTERN_FIRST;
-
258  PatternID default_end = PATTERN_LAST;
-
259  // add 65 randomized modes
-
260  for (int i = 0; i < 65; ++i) {
-
261  Mode tmpMode;
-
262  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
263  // create a random pattern ID from all patterns
- -
265  Colorset randSet;
-
266  randSet.randomize(8);
-
267  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
268  }
-
269  // add another mode with the given pattern and colorset
-
270  if (!addMode(&tmpMode)) {
-
271  ERROR_LOG("Failed to add mode");
-
272  // return false?
-
273  }
-
274  }
-
275  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
276 #else
-
277  // add each default mode with each of the given colors
-
278  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
279  const default_mode_entry &def = default_modes[i];
-
280  Colorset set(def.numColors, def.cols);
-
281  addMode(def.patternID, nullptr, &set);
-
282  }
-
283 #endif
-
284  return true;
-
285 }
-
286 
- -
288 {
-
289 #if MAX_MODES != 0
-
290  if (m_numModes >= MAX_MODES) {
-
291  return false;
-
292  }
-
293 #endif
-
294  // we must unserialize then re-serialize here because the
-
295  // input argument may contain other patterns in the buffer
-
296  // so we cannot just append the input arg to m_storedModes
-
297  Mode tmpMode;
-
298  if (!tmpMode.unserialize(serializedMode)) {
-
299  return false;
-
300  }
-
301  // initialize the mode because a pattern could theoretically serialize
-
302  // differently after it has initialized
-
303  tmpMode.init();
-
304  return addMode(&tmpMode);
-
305 }
-
306 
- -
308 {
-
309 #if MAX_MODES != 0
-
310  if (m_numModes >= MAX_MODES) {
-
311  return false;
-
312  }
-
313 #endif
-
314  if (!m_storedModes->append(serializedMode)) {
- -
316  return false;
-
317  }
-
318  // increment mode counter
-
319  m_numModes++;
-
320  return true;
-
321 }
-
322 
-
323 // shift the current mode to a different position relative to current position
-
324 // negative values for up, positive values for down, 0 for no move
-
325 bool Modes::shiftCurMode(int32_t offset)
-
326 {
-
327  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
328  if (newPos >= m_numModes) {
-
329  return false;
-
330  }
-
331  if (newPos == m_curMode) {
-
332  return true;
-
333  }
-
334  // get the target mode at the position of the shift
-
335  ModeLink *target = getModeLink(newPos);
-
336  if (!target) {
-
337  // invalid new position?
-
338  return false;
-
339  }
-
340  // special case for moving first in list forward
-
341  if (!m_curMode && offset > 0) {
-
342  // update main list ptr
- -
344  }
-
345  // unlink the current link
- -
347  // update the current position to reflect our new pos
-
348  m_curMode = newPos;
-
349  // then re-link the mode at the new spot
-
350  if (offset < 0) {
-
351  // link the link before our target link
-
352  target->linkBefore(m_pCurModeLink);
-
353  // special case for moving into first in list
-
354  if (!m_curMode) {
- -
356  }
-
357  } else {
-
358  // link the link after our target link
-
359  target->linkAfter(m_pCurModeLink);
-
360  }
-
361  return true;
-
362 }
-
363 
- -
365  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
-
366 {
-
367  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
368  return addMode(id, nullptr, &set);
-
369 }
-
370 
-
371 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
-
372 {
-
373  // max modes
-
374 #if MAX_MODES != 0
-
375  if (m_numModes >= MAX_MODES) {
-
376  return false;
-
377  }
-
378 #endif
-
379  if (id >= PATTERN_COUNT) {
+
192  // iterate each mode and read it out of it's storage slot then add it
+
193  for (uint8_t i = 0; i < numModes; ++i) {
+
194  ByteStream modeBuffer(MAX_MODE_SIZE);
+
195  // read each mode from a storage slot and load it
+
196  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
197  return false;
+
198  }
+
199  }
+
200  return true;
+
201 }
+
202 
+
203 // NOTE: Flash storage is limited to about 10,000 writes so
+
204 // use this function sparingly!
+ +
206 {
+
207  DEBUG_LOG("Saving modes...");
+
208  ByteStream headerBuffer(MAX_MODE_SIZE);
+
209  if (!serializeSaveHeader(headerBuffer)) {
+
210  return false;
+
211  }
+
212  // serialize the number of modes
+
213  if (!headerBuffer.serialize(m_numModes)) {
+
214  return false;
+
215  }
+
216  if (!Storage::write(0, headerBuffer)) {
+
217  return false;
+
218  }
+
219  // make sure the current mode is saved in case it has changed somehow
+
220  saveCurMode();
+
221  // uninstantiate cur mode so we have stack space to serialize
+
222  if (m_pCurModeLink) {
+ +
224  }
+
225  uint16_t i = 0;
+
226  ModeLink *ptr = m_storedModes;
+
227  while (ptr && i < MAX_MODES) {
+
228  ByteStream modeBuffer(MAX_MODE_SIZE);
+
229  // instantiate the mode temporarily
+
230  Mode *mode = ptr->instantiate();
+
231  if (!mode) {
+ +
233  return false;
+
234  }
+
235  // serialize it into the target modes buffer
+
236  mode->serialize(modeBuffer);
+
237  // just uninstansiate the mode after serializing
+
238  ptr->uninstantiate();
+
239  // next mode
+
240  ptr = ptr->next();
+
241  // now write this mode into a storage slot (skip first slot, that's header)
+
242  if (!Storage::write(++i, modeBuffer)) {
+
243  return false;
+
244  }
+
245  }
+
246  // reinstanstiate the current mode
+ +
248  return false;
+
249  }
+
250  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
251  return true;
+
252 }
+
253 
+
254 // Save all of the modes to a serial buffer
+
255 bool Modes::serialize(ByteStream &modesBuffer)
+
256 {
+
257  // serialize the number of modes
+
258  if (!modesBuffer.serialize(m_numModes)) {
+
259  return false;
+
260  }
+
261  // make sure the current mode is saved in case it has changed somehow
+
262  saveCurMode();
+
263  // uninstantiate cur mode so we have stack space to serialize
+
264  if (m_pCurModeLink) {
+ +
266  }
+
267  ModeLink *ptr = m_storedModes;
+
268  while (ptr) {
+
269  // instantiate the mode temporarily
+
270  Mode *mode = ptr->instantiate();
+
271  if (!mode) {
+ +
273  return false;
+
274  }
+
275  // serialize it into the target modes buffer
+
276  mode->serialize(modesBuffer);
+
277  // just uninstansiate the mode after serializing
+
278  ptr->uninstantiate();
+
279  // next mode
+
280  ptr = ptr->next();
+
281  }
+
282  // reinstanstiate the current mode
+ +
284  return false;
+
285  }
+
286  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
287  return true;
+
288 }
+
289 
+
290 // load all modes from a serial buffer
+
291 bool Modes::unserialize(ByteStream &modesBuffer)
+
292 {
+
293  DEBUG_LOG("Loading modes...");
+
294  // this is good on memory, but it erases what they have stored before we
+
295  // know whether there is something actually saved in the serial buffer
+
296  clearModes();
+
297  // unserialize the number of modes next
+
298  uint8_t numModes = 0;
+
299  modesBuffer.unserialize(&numModes);
+
300  if (!numModes) {
+
301  DEBUG_LOG("Did not find any modes");
+
302  // this kinda sucks whatever they had loaded is gone
+
303  return false;
+
304  }
+
305  // foreach expected mode
+
306  for (uint8_t i = 0; i < numModes; ++i) {
+
307  // just copy the serialized mode into the internal storage because
+
308  // we store the modes in a serialized manner so that they are smaller
+
309  // then we unpack them when we instantiate the mode
+
310  if (!addSerializedMode(modesBuffer)) {
+
311  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
312  // clear work so far?
+
313  clearModes();
+
314  return false;
+
315  }
+
316  }
+
317  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
318  return (m_numModes == numModes);
+
319 }
+
320 
+ +
322 {
+
323  clearModes();
+
324 #if DEMO_ALL_PATTERNS == 1
+
325  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
326  PatternID default_start = PATTERN_FIRST;
+
327  PatternID default_end = PATTERN_LAST;
+
328  // add 65 randomized modes
+
329  for (int i = 0; i < 65; ++i) {
+
330  Mode tmpMode;
+
331  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
332  // create a random pattern ID from all patterns
+ +
334  Colorset randSet;
+
335  randSet.randomize(8);
+
336  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
337  }
+
338  // add another mode with the given pattern and colorset
+
339  if (!addMode(&tmpMode)) {
+
340  ERROR_LOG("Failed to add mode");
+
341  // return false?
+
342  }
+
343  }
+
344  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
345 #else
+
346  // add each default mode with each of the given colors
+
347  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
348  const default_mode_entry &def = default_modes[i];
+
349  Colorset set(def.numColors, def.cols);
+
350  addMode(def.patternID, nullptr, &set);
+
351  }
+
352 #endif
+
353  return true;
+
354 }
+
355 
+ +
357 {
+
358 #if MAX_MODES != 0
+
359  if (m_numModes >= MAX_MODES) {
+
360  return false;
+
361  }
+
362 #endif
+
363  // we must unserialize then re-serialize here because the
+
364  // input argument may contain other patterns in the buffer
+
365  // so we cannot just append the input arg to m_storedModes
+
366  Mode tmpMode;
+
367  if (!tmpMode.unserialize(serializedMode)) {
+
368  return false;
+
369  }
+
370  // initialize the mode because a pattern could theoretically serialize
+
371  // differently after it has initialized
+
372  tmpMode.init();
+
373  return addMode(&tmpMode);
+
374 }
+
375 
+ +
377 {
+
378 #if MAX_MODES != 0
+
379  if (m_numModes >= MAX_MODES) {
380  return false;
381  }
-
382  Mode tmpMode(id, args, set);
-
383  // must init the mode so that it can be serialized
-
384  tmpMode.init();
-
385  // not a very good way to do this but it ensures the mode is
-
386  // added in the same way
-
387  return addMode(&tmpMode);
-
388 }
-
389 
-
390 bool Modes::addMode(const Mode *mode)
-
391 {
-
392 #if MAX_MODES != 0
-
393  // max modes
-
394  if (m_numModes >= MAX_MODES) {
-
395  return false;
-
396  }
-
397 #endif
-
398  if (!m_storedModes) {
-
399  m_storedModes = new ModeLink(mode);
-
400  if (!m_storedModes) {
- -
402  return false;
-
403  }
-
404  } else {
-
405  if (!m_storedModes->append(mode)) {
- -
407  return false;
-
408  }
-
409  }
-
410  m_numModes++;
-
411  return true;
-
412 }
-
413 
-
414 bool Modes::updateCurMode(const Mode *mode)
-
415 {
-
416  if (!mode) {
-
417  return false;
-
418  }
-
419  Mode *pCur = curMode();
-
420  if (!pCur) {
-
421  return false;
-
422  }
-
423  // utilize copy operator
-
424  *pCur = *mode;
-
425  // immediately save this mode to the internal mode storage
-
426  if (!saveCurMode()) {
-
427  return false;
-
428  }
-
429  // initialize the new mode
-
430  return initCurMode();
+
382 #endif
+
383  if (!m_storedModes->append(serializedMode)) {
+ +
385  return false;
+
386  }
+
387  // increment mode counter
+
388  m_numModes++;
+
389  return true;
+
390 }
+
391 
+
392 // shift the current mode to a different position relative to current position
+
393 // negative values for up, positive values for down, 0 for no move
+
394 bool Modes::shiftCurMode(int32_t offset)
+
395 {
+
396  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
397  if (newPos >= m_numModes) {
+
398  return false;
+
399  }
+
400  if (newPos == m_curMode) {
+
401  return true;
+
402  }
+
403  // get the target mode at the position of the shift
+
404  ModeLink *target = getModeLink(newPos);
+
405  if (!target) {
+
406  // invalid new position?
+
407  return false;
+
408  }
+
409  // special case for moving first in list forward
+
410  if (!m_curMode && offset > 0) {
+
411  // update main list ptr
+ +
413  }
+
414  // unlink the current link
+ +
416  // update the current position to reflect our new pos
+
417  m_curMode = newPos;
+
418  // then re-link the mode at the new spot
+
419  if (offset < 0) {
+
420  // link the link before our target link
+
421  target->linkBefore(m_pCurModeLink);
+
422  // special case for moving into first in list
+
423  if (!m_curMode) {
+ +
425  }
+
426  } else {
+
427  // link the link after our target link
+
428  target->linkAfter(m_pCurModeLink);
+
429  }
+
430  return true;
431 }
432 
-
433 // set the current active mode by index
-
434 Mode *Modes::setCurMode(uint8_t index)
+ +
434  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
435 {
-
436  if (!m_numModes) {
-
437  return nullptr;
-
438  }
-
439  // clear the LEDs when switching modes
-
440  Leds::clearAll();
-
441  // if we have a current mode open, close it
-
442  if (m_pCurModeLink) {
- -
444  }
-
445  int8_t newModeIdx = index % m_numModes;
-
446  // lookup the new mode link
-
447  ModeLink *newCurLink = getModeLink(newModeIdx);
-
448  if (!newCurLink) {
-
449  // what
-
450  return nullptr;
-
451  }
-
452  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
453  Mode *newCur = newCurLink->instantiate();
-
454  if (!newCur) {
- -
456  return nullptr;
-
457  }
-
458  // update to the new mode
-
459  m_curMode = newModeIdx;
-
460  m_pCurModeLink = newCurLink;
-
461  // record the current time as the last switch time
- -
463  // update the global startup mode to be this mode, if we turn off
-
464  // and turn back on into one click mode it will select this one
-
465  Modes::setStartupMode(newModeIdx);
-
466  // log the change
-
467  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
468  m_curMode, m_numModes - 1, newCur->getPatternID());
-
469  // return the new current mode
-
470  return newCur;
-
471 }
-
472 
-
473 // the current mode
- -
475 {
-
476  // empty mode list
-
477  if (!m_numModes) {
-
478  return nullptr;
-
479  }
-
480  if (!m_pCurModeLink) {
-
481  if (!initCurMode()) {
-
482  ERROR_LOG("Failed to initialize current mode");
-
483  return nullptr;
-
484  }
-
485  }
-
486  // get current mode, instantiate it if necessary
-
487  return m_pCurModeLink->instantiate();
-
488 }
-
489 
-
490 // iterate to next mode and return it
- -
492 {
-
493  if (!m_numModes) {
-
494  return nullptr;
-
495  }
-
496  // iterate the cur mode forward
-
497  return setCurMode(m_curMode + 1);
-
498 }
-
499 
-
500 // iterate to previous mode and return it
- -
502 {
-
503  if (!m_numModes) {
-
504  return nullptr;
-
505  }
-
506  // iterate the cur mode backwards
-
507  if (!m_curMode) {
-
508  return setCurMode(numModes() - 1);
-
509  }
-
510  return setCurMode(m_curMode - 1);
-
511 }
-
512 
- -
514 {
-
515  do {
-
516  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
517  break;
-
518  }
-
519  } while (m_curMode != 0);
-
520  return curMode();
-
521 }
-
522 
- -
524 {
-
525  if (!m_numModes || !m_pCurModeLink) {
-
526  return;
-
527  }
-
528  // unlink the current mode so it can be deleted and
-
529  // update the current mode link accordingly
-
530  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
531  delete m_pCurModeLink;
-
532  m_pCurModeLink = newCur;
-
533  if (m_curMode) {
-
534  m_curMode--;
-
535  } else {
- -
537  }
-
538  m_numModes--;
-
539  if (!m_numModes) {
-
540  m_storedModes = nullptr;
-
541  }
-
542 }
-
543 
- -
545 {
-
546  if (!m_numModes || !m_storedModes) {
-
547  return;
+
436  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
437  return addMode(id, nullptr, &set);
+
438 }
+
439 
+
440 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
+
441 {
+
442  // max modes
+
443 #if MAX_MODES != 0
+
444  if (m_numModes >= MAX_MODES) {
+
445  return false;
+
446  }
+
447 #endif
+
448  if (id >= PATTERN_COUNT) {
+
449  return false;
+
450  }
+
451  Mode tmpMode(id, args, set);
+
452  // must init the mode so that it can be serialized
+
453  tmpMode.init();
+
454  // not a very good way to do this but it ensures the mode is
+
455  // added in the same way
+
456  return addMode(&tmpMode);
+
457 }
+
458 
+
459 bool Modes::addMode(const Mode *mode)
+
460 {
+
461 #if MAX_MODES != 0
+
462  // max modes
+
463  if (m_numModes >= MAX_MODES) {
+
464  return false;
+
465  }
+
466 #endif
+
467  if (!m_storedModes) {
+
468  m_storedModes = new ModeLink(mode);
+
469  if (!m_storedModes) {
+ +
471  return false;
+
472  }
+
473  } else {
+
474  if (!m_storedModes->append(mode)) {
+ +
476  return false;
+
477  }
+
478  }
+
479  m_numModes++;
+
480  return true;
+
481 }
+
482 
+
483 bool Modes::updateCurMode(const Mode *mode)
+
484 {
+
485  if (!mode) {
+
486  return false;
+
487  }
+
488  Mode *pCur = curMode();
+
489  if (!pCur) {
+
490  return false;
+
491  }
+
492  // utilize copy operator
+
493  *pCur = *mode;
+
494  // immediately save this mode to the internal mode storage
+
495  if (!saveCurMode()) {
+
496  return false;
+
497  }
+
498  // initialize the new mode
+
499  return initCurMode();
+
500 }
+
501 
+
502 // set the current active mode by index
+
503 Mode *Modes::setCurMode(uint8_t index)
+
504 {
+
505  if (!m_numModes) {
+
506  return nullptr;
+
507  }
+
508  // clear the LEDs when switching modes
+
509  Leds::clearAll();
+
510  // if we have a current mode open, close it
+
511  if (m_pCurModeLink) {
+ +
513  }
+
514  int8_t newModeIdx = index % m_numModes;
+
515  // lookup the new mode link
+
516  ModeLink *newCurLink = getModeLink(newModeIdx);
+
517  if (!newCurLink) {
+
518  // what
+
519  return nullptr;
+
520  }
+
521  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
522  Mode *newCur = newCurLink->instantiate();
+
523  if (!newCur) {
+ +
525  return nullptr;
+
526  }
+
527  // update to the new mode
+
528  m_curMode = newModeIdx;
+
529  m_pCurModeLink = newCurLink;
+
530  // record the current time as the last switch time
+ +
532  // update the global startup mode to be this mode, if we turn off
+
533  // and turn back on into one click mode it will select this one
+
534  Modes::setStartupMode(newModeIdx);
+
535  // log the change
+
536  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
537  m_curMode, m_numModes - 1, newCur->getPatternID());
+
538  // return the new current mode
+
539  return newCur;
+
540 }
+
541 
+
542 // the current mode
+ +
544 {
+
545  // empty mode list
+
546  if (!m_numModes) {
+
547  return nullptr;
548  }
-
549  // delete the first node and it will delete the entire chain
-
550  delete m_storedModes;
-
551  m_pCurModeLink = nullptr;
-
552  m_storedModes = nullptr;
-
553  m_numModes = 0;
-
554  // might as well clear the leds
-
555  Leds::clearAll();
-
556 }
-
557 
-
558 void Modes::setStartupMode(uint8_t index)
-
559 {
-
560  // zero out the upper nibble to disable
-
561  m_globalFlags &= 0x0F;
-
562  // or in the index value shifted into the upper nibble
-
563  m_globalFlags |= (index << 4) & 0xF0;
-
564 }
-
565 
- -
567 {
-
568  // zero out the upper nibble to disable
-
569  return (m_globalFlags & 0xF0) >> 4;
-
570 }
-
571 
-
572 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
-
573 {
-
574  // then actually if it's enabled ensure the upper nibble is set
-
575  if (enable) {
-
576  // set the cur mode index as the upper nibble
-
577  m_globalFlags |= flag;
-
578  } else {
-
579  m_globalFlags &= ~flag;
-
580  }
-
581  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
582  return !save || saveStorage();
-
583 }
-
584 
-
585 bool Modes::getFlag(uint8_t flag)
-
586 {
-
587  return ((m_globalFlags & flag) != 0);
-
588 }
-
589 
- -
591 {
-
592  m_globalFlags = 0;
-
593 }
-
594 
-
595 #ifdef VORTEX_LIB
-
596 #include "Patterns/PatternBuilder.h"
-
597 // get the maximum size a mode can occupy
-
598 uint32_t Modes::maxModeSize()
-
599 {
-
600  Mode maxMode;
-
601  uint8_t x = 0;
-
602  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
603  // blend takes up 8 params
-
604  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
-
605  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
-
606  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
-
607  Colorset maxSet;
-
608  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
609  // different color in each slot
-
610  RGBColor col;
-
611  col.red = ++x;
-
612  col.green = ++x;
-
613  col.blue = ++x;
-
614  maxSet.addColor(col);
-
615  }
-
616  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
549  if (!m_pCurModeLink) {
+
550  if (!initCurMode()) {
+
551  ERROR_LOG("Failed to initialize current mode");
+
552  return nullptr;
+
553  }
+
554  }
+
555  // get current mode, instantiate it if necessary
+
556  return m_pCurModeLink->instantiate();
+
557 }
+
558 
+
559 // iterate to next mode and return it
+ +
561 {
+
562  if (!m_numModes) {
+
563  return nullptr;
+
564  }
+
565  // iterate the cur mode forward
+
566  return setCurMode(m_curMode + 1);
+
567 }
+
568 
+
569 // iterate to previous mode and return it
+ +
571 {
+
572  if (!m_numModes) {
+
573  return nullptr;
+
574  }
+
575  // iterate the cur mode backwards
+
576  if (!m_curMode) {
+
577  return setCurMode(numModes() - 1);
+
578  }
+
579  return setCurMode(m_curMode - 1);
+
580 }
+
581 
+ +
583 {
+
584  do {
+
585  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
586  break;
+
587  }
+
588  } while (m_curMode != 0);
+
589  return curMode();
+
590 }
+
591 
+ +
593 {
+
594  if (!m_numModes || !m_pCurModeLink) {
+
595  return;
+
596  }
+
597  // unlink the current mode so it can be deleted and
+
598  // update the current mode link accordingly
+
599  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
600  delete m_pCurModeLink;
+
601  m_pCurModeLink = newCur;
+
602  if (m_curMode) {
+
603  m_curMode--;
+
604  } else {
+ +
606  }
+
607  m_numModes--;
+
608  if (!m_numModes) {
+
609  m_storedModes = nullptr;
+
610  }
+
611 }
+
612 
+ +
614 {
+
615  if (!m_numModes || !m_storedModes) {
+
616  return;
617  }
-
618  ByteStream stream;
-
619  maxMode.saveToBuffer(stream);
-
620  return stream.size();
-
621 }
-
622 
-
623 // get the maximum size a savefile can occupy
-
624 uint32_t Modes::maxSaveSize()
-
625 {
-
626 #if MAX_MODES == 0
-
627  // unbounded
-
628  return 0;
-
629 #else
-
630  ByteStream backupModes;
-
631  saveToBuffer(backupModes);
-
632  for (uint32_t i = 0; i < MAX_MODES; ++i) {
-
633  Mode maxMode;
-
634  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
635  // blend takes up 8 params
-
636  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
-
637  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
-
638  Colorset maxSet;
-
639  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
640  // different color in each slot
-
641  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
-
642  }
-
643  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
-
644  }
-
645  addMode(&maxMode);
-
646  }
-
647  // grab the size of the new buffer
-
648  ByteStream stream;
-
649  saveToBuffer(stream);
-
650  uint32_t size = stream.size();
-
651  // restore backed up modes
-
652  loadFromBuffer(backupModes);
-
653  return size;
-
654 #endif
-
655 }
-
656 #endif
-
657 
-
658 // fetch a link from the chain by index
- +
618  // delete the first node and it will delete the entire chain
+
619  delete m_storedModes;
+
620  m_pCurModeLink = nullptr;
+
621  m_storedModes = nullptr;
+
622  m_numModes = 0;
+
623  // might as well clear the leds
+
624  Leds::clearAll();
+
625 }
+
626 
+
627 void Modes::setStartupMode(uint8_t index)
+
628 {
+
629  // zero out the upper nibble to disable
+
630  m_globalFlags &= 0x0F;
+
631  // or in the index value shifted into the upper nibble
+
632  m_globalFlags |= (index << 4) & 0xF0;
+
633 }
+
634 
+ +
636 {
+
637  // zero out the upper nibble to disable
+
638  return (m_globalFlags & 0xF0) >> 4;
+
639 }
+
640 
+
641 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
+
642 {
+
643  // then actually if it's enabled ensure the upper nibble is set
+
644  if (enable) {
+
645  // set the cur mode index as the upper nibble
+
646  m_globalFlags |= flag;
+
647  } else {
+
648  m_globalFlags &= ~flag;
+
649  }
+
650  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
651  return !save || saveStorage();
+
652 }
+
653 
+
654 bool Modes::getFlag(uint8_t flag)
+
655 {
+
656  return ((m_globalFlags & flag) != 0);
+
657 }
+
658 
+
660 {
-
661  if (index >= m_numModes) {
-
662  return nullptr;
-
663  }
-
664  ModeLink *ptr = m_storedModes;
-
665  while (index > 0 && ptr) {
-
666  ptr = ptr->next();
-
667  index--;
-
668  }
-
669  return ptr;
-
670 }
-
671 
- -
673 {
-
674  if (!m_numModes) {
-
675  return nullptr;
-
676  }
-
677  // cleanup the current mode link
-
678  if (m_pCurModeLink) {
- -
680  }
-
681  // update the current mode link based on the curmode index
- -
683  if (!m_pCurModeLink) {
-
684  return nullptr;
-
685  }
-
686  if (force) {
- -
688  }
-
689  return m_pCurModeLink->instantiate();
+
661  m_globalFlags = 0;
+
662 }
+
663 
+
664 #ifdef VORTEX_LIB
+
665 #include "Patterns/PatternBuilder.h"
+
666 // get the maximum size a mode can occupy
+
667 uint32_t Modes::maxModeSize()
+
668 {
+
669  Mode maxMode;
+
670  uint8_t x = 0;
+
671  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
672  // blend takes up 8 params
+
673  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
+
674  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
+
675  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
+
676  Colorset maxSet;
+
677  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
678  // different color in each slot
+
679  RGBColor col;
+
680  col.red = ++x;
+
681  col.green = ++x;
+
682  col.blue = ++x;
+
683  maxSet.addColor(col);
+
684  }
+
685  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
686  }
+
687  ByteStream stream;
+
688  maxMode.saveToBuffer(stream);
+
689  return stream.size();
690 }
691 
- -
693 {
-
694  if (!m_pCurModeLink) {
-
695  // if there's no loaded mode currently then there's nothing
-
696  // to save so there's no error
-
697  return false;
-
698  }
-
699  // force the current mode to save back to serial to catch changes
-
700  return m_pCurModeLink->save();
-
701 }
-
702 
-
703 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
-
704  m_pInstantiatedMode(nullptr),
-
705  m_storedMode(),
-
706  m_next(nullptr),
-
707  m_prev(nullptr)
-
708 {
-
709  if (src) {
-
710  init(src);
-
711  }
-
712  if (src && inst) {
-
713  instantiate();
-
714  }
-
715 }
-
716 
-
717 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
-
718  m_pInstantiatedMode(nullptr),
-
719  m_storedMode(src),
-
720  m_next(nullptr),
-
721  m_prev(nullptr)
-
722 {
-
723  if (src.size() && inst) {
-
724  instantiate();
-
725  }
-
726 }
-
727 
- +
692 // get the maximum size a savefile can occupy
+
693 uint32_t Modes::maxSaveSize()
+
694 {
+
695 #if MAX_MODES == 0
+
696  // unbounded
+
697  return 0;
+
698 #else
+
699  ByteStream backupModes;
+
700  saveToBuffer(backupModes);
+
701  for (uint32_t i = 0; i < MAX_MODES; ++i) {
+
702  Mode maxMode;
+
703  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
704  // blend takes up 8 params
+
705  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
+
706  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
+
707  Colorset maxSet;
+
708  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
709  // different color in each slot
+
710  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
+
711  }
+
712  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
713  }
+
714  addMode(&maxMode);
+
715  }
+
716  // grab the size of the new buffer
+
717  ByteStream stream;
+
718  saveToBuffer(stream);
+
719  uint32_t size = stream.size();
+
720  // restore backed up modes
+
721  loadFromBuffer(backupModes);
+
722  return size;
+
723 #endif
+
724 }
+
725 #endif
+
726 
+
727 // fetch a link from the chain by index
+
729 {
-
730  if (m_next) {
-
731  delete m_next;
+
730  if (index >= m_numModes) {
+
731  return nullptr;
732  }
-
733  if (m_pInstantiatedMode) {
-
734  delete m_pInstantiatedMode;
-
735  }
-
736 }
-
737 
-
738 bool Modes::ModeLink::init(const Mode *mode)
-
739 {
-
740  if (!mode) {
-
741  return false;
-
742  }
-
743  m_storedMode.clear();
-
744  // serialize the mode so it can be instantiated anytime
-
745  if (!mode->saveToBuffer(m_storedMode)) {
-
746  return false;
-
747  }
-
748  return true;
-
749 }
-
750 
-
751 bool Modes::ModeLink::append(const Mode *next)
-
752 {
-
753  if (!next) {
-
754  return false;
-
755  }
-
756  // if not end of chain, recurse on next link
-
757  if (m_next) {
-
758  return m_next->append(next);
-
759  }
-
760  m_next = new ModeLink(next);
-
761  if (!m_next) {
- -
763  return false;
-
764  }
-
765  m_next->m_prev = this;
-
766  return true;
-
767 }
-
768 
- -
770 {
-
771  if (!next.size()) {
-
772  return false;
-
773  }
-
774  // if not end of chain, recurse on next link
-
775  if (m_next) {
-
776  return m_next->append(next);
-
777  }
-
778  m_next = new ModeLink(next);
-
779  if (!m_next) {
- -
781  return false;
-
782  }
-
783  m_next->m_prev = this;
-
784  return true;
-
785 }
-
786 
- -
788 {
-
789  if (!m_pInstantiatedMode) {
-
790  return;
-
791  }
-
792  m_pInstantiatedMode->play();
-
793 }
-
794 
- -
796 {
-
797  // unlink this node from the chain
-
798  if (m_prev) {
-
799  m_prev->m_next = m_next;
-
800  }
-
801  if (m_next) {
-
802  m_next->m_prev = m_prev;
-
803  }
-
804  // grab the new link that will take this place
-
805  ModeLink *newLink = m_prev ? m_prev : m_next;
-
806  // clear the links of this node
-
807  m_prev = nullptr;
-
808  m_next = nullptr;
-
809  return newLink;
-
810 }
-
811 
- -
813 {
-
814  if (!link) {
-
815  return;
+
733  ModeLink *ptr = m_storedModes;
+
734  while (index > 0 && ptr) {
+
735  ptr = ptr->next();
+
736  index--;
+
737  }
+
738  return ptr;
+
739 }
+
740 
+ +
742 {
+
743  if (!m_numModes) {
+
744  return nullptr;
+
745  }
+
746  // cleanup the current mode link
+
747  if (m_pCurModeLink) {
+ +
749  }
+
750  // update the current mode link based on the curmode index
+ +
752  if (!m_pCurModeLink) {
+
753  return nullptr;
+
754  }
+
755  if (force) {
+ +
757  }
+
758  return m_pCurModeLink->instantiate();
+
759 }
+
760 
+ +
762 {
+
763  if (!m_pCurModeLink) {
+
764  // if there's no loaded mode currently then there's nothing
+
765  // to save so there's no error
+
766  return false;
+
767  }
+
768  // force the current mode to save back to serial to catch changes
+
769  return m_pCurModeLink->save();
+
770 }
+
771 
+
772 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
+
773  m_pInstantiatedMode(nullptr),
+
774  m_storedMode(),
+
775  m_next(nullptr),
+
776  m_prev(nullptr)
+
777 {
+
778  if (src) {
+
779  init(src);
+
780  }
+
781  if (src && inst) {
+
782  instantiate();
+
783  }
+
784 }
+
785 
+
786 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
+
787  m_pInstantiatedMode(nullptr),
+
788  m_storedMode(src),
+
789  m_next(nullptr),
+
790  m_prev(nullptr)
+
791 {
+
792  if (src.size() && inst) {
+
793  instantiate();
+
794  }
+
795 }
+
796 
+ +
798 {
+
799  if (m_next) {
+
800  delete m_next;
+
801  }
+
802  if (m_pInstantiatedMode) {
+
803  delete m_pInstantiatedMode;
+
804  }
+
805 }
+
806 
+
807 bool Modes::ModeLink::init(const Mode *mode)
+
808 {
+
809  if (!mode) {
+
810  return false;
+
811  }
+
812  m_storedMode.clear();
+
813  // serialize the mode so it can be instantiated anytime
+
814  if (!mode->saveToBuffer(m_storedMode)) {
+
815  return false;
816  }
-
817  if (m_next) {
-
818  m_next->m_prev = link;
-
819  link->m_next = m_next;
-
820  }
-
821  m_next = link;
-
822  link->m_prev = this;
-
823 }
-
824 
- -
826 {
-
827  if (!link) {
-
828  return;
-
829  }
-
830  if (m_prev) {
-
831  m_prev->m_next = link;
-
832  link->m_prev = m_prev;
+
817  return true;
+
818 }
+
819 
+
820 bool Modes::ModeLink::append(const Mode *next)
+
821 {
+
822  if (!next) {
+
823  return false;
+
824  }
+
825  // if not end of chain, recurse on next link
+
826  if (m_next) {
+
827  return m_next->append(next);
+
828  }
+
829  m_next = new ModeLink(next);
+
830  if (!m_next) {
+ +
832  return false;
833  }
-
834  m_prev = link;
-
835  link->m_next = this;
+
834  m_next->m_prev = this;
+
835  return true;
836 }
837 
- +
839 {
-
840  if (m_pInstantiatedMode) {
-
841  return m_pInstantiatedMode;
+
840  if (!next.size()) {
+
841  return false;
842  }
-
843  Mode *newMode = new Mode();
-
844  if (!newMode) {
- -
846  return nullptr;
-
847  }
-
848  m_storedMode.resetUnserializer();
-
849  if (!newMode->loadFromBuffer(m_storedMode)) {
-
850  return nullptr;
+
843  // if not end of chain, recurse on next link
+
844  if (m_next) {
+
845  return m_next->append(next);
+
846  }
+
847  m_next = new ModeLink(next);
+
848  if (!m_next) {
+ +
850  return false;
851  }
-
852  m_pInstantiatedMode = newMode;
-
853  return m_pInstantiatedMode;
+
852  m_next->m_prev = this;
+
853  return true;
854 }
855 
- +
857 {
-
858  if (m_pInstantiatedMode) {
-
859  delete m_pInstantiatedMode;
-
860  m_pInstantiatedMode = nullptr;
-
861  }
+
858  if (!m_pInstantiatedMode) {
+
859  return;
+
860  }
+
861  m_pInstantiatedMode->play();
862 }
863 
- +
865 {
-
866  if (!m_pInstantiatedMode) {
-
867  return false;
-
868  }
-
869  m_storedMode.clear();
-
870  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
-
871 }
-
872 
-
873 #if MODES_TEST == 1
-
874 #include <assert.h>
-
875 #include <stdio.h>
-
876 
-
877 #include "../Patterns/PatternBuilder.h"
-
878 
-
879 void Modes::test()
-
880 {
-
881  INFO_LOG("== Beginning Modes Test ==\n");
-
882 
-
883  RGBColor col = RGB_RED;
-
884  assert(!addMode(PATTERN_COUNT, col));
-
885  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
886  assert(addMode(pat, col));
-
887  }
- -
889  clearModes();
-
890  assert(numModes() == 0);
-
891 
- -
893  assert(!addMode(PATTERN_COUNT, nullptr, &set));
-
894  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
895  assert(addMode(pat, nullptr, &set));
-
896  }
- -
898  clearModes();
-
899  assert(numModes() == 0);
-
900 
-
901  // add a new mode in various different ways
-
902  assert(!addMode(PATTERN_COUNT, col));
- -
904  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
905  Mode tmpMode(pat, nullptr, &set2);
-
906  assert(addMode(&tmpMode));
-
907  }
- -
909  clearModes();
-
910  assert(numModes() == 0);
-
911 
-
912  INFO_LOG("addMode(): success\n");
-
913 
-
914  ByteStream modebuf;
-
915  ByteStream modesave;
-
916  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
-
917  Mode tmpMode(PATTERN_BASIC, &args, &set);
-
918  tmpMode.serialize(modebuf);
-
919  tmpMode.saveToBuffer(modesave);
-
920  assert(addSerializedMode(modebuf));
-
921  assert(numModes() == 1);
-
922  assert(addModeFromBuffer(modesave));
-
923  assert(numModes() == 2);
-
924  assert(getModeLink(0) != nullptr);
-
925  Mode *mode1 = getModeLink(0)->instantiate();
-
926  assert(mode1 != nullptr);
-
927  Mode *mode2 = getModeLink(1)->instantiate();
-
928  assert(mode2 != nullptr);
-
929  assert(mode1->equals(mode2));
-
930 
-
931  INFO_LOG("addSerializedMode(): success\n");
+
866  // unlink this node from the chain
+
867  if (m_prev) {
+
868  m_prev->m_next = m_next;
+
869  }
+
870  if (m_next) {
+
871  m_next->m_prev = m_prev;
+
872  }
+
873  // grab the new link that will take this place
+
874  ModeLink *newLink = m_prev ? m_prev : m_next;
+
875  // clear the links of this node
+
876  m_prev = nullptr;
+
877  m_next = nullptr;
+
878  return newLink;
+
879 }
+
880 
+ +
882 {
+
883  if (!link) {
+
884  return;
+
885  }
+
886  if (m_next) {
+
887  m_next->m_prev = link;
+
888  link->m_next = m_next;
+
889  }
+
890  m_next = link;
+
891  link->m_prev = this;
+
892 }
+
893 
+ +
895 {
+
896  if (!link) {
+
897  return;
+
898  }
+
899  if (m_prev) {
+
900  m_prev->m_next = link;
+
901  link->m_prev = m_prev;
+
902  }
+
903  m_prev = link;
+
904  link->m_next = this;
+
905 }
+
906 
+ +
908 {
+
909  if (m_pInstantiatedMode) {
+
910  return m_pInstantiatedMode;
+
911  }
+
912  Mode *newMode = new Mode();
+
913  if (!newMode) {
+ +
915  return nullptr;
+
916  }
+
917  m_storedMode.resetUnserializer();
+
918  if (!newMode->loadFromBuffer(m_storedMode)) {
+
919  return nullptr;
+
920  }
+
921  m_pInstantiatedMode = newMode;
+
922  return m_pInstantiatedMode;
+
923 }
+
924 
+ +
926 {
+
927  if (m_pInstantiatedMode) {
+
928  delete m_pInstantiatedMode;
+
929  m_pInstantiatedMode = nullptr;
+
930  }
+
931 }
932 
- - -
935  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
-
936  assert(setCurMode(1));
-
937  // update the current mode to match the given mode
-
938  assert(updateCurMode(PATTERN_DOPS, &newset));
-
939  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
- - -
942 
-
943  INFO_LOG("updateCurMode(): success\n");
-
944 
-
945  assert(shiftCurMode(-1));
-
946  assert(m_curMode == 0);
-
947  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
948  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
949  assert(shiftCurMode(0));
-
950  assert(m_curMode == 0);
-
951  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
952  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
953  assert(shiftCurMode(1));
-
954  assert(m_curMode == 1);
-
955  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
956  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
-
957 
-
958  INFO_LOG("shiftCurMode(): success\n");
-
959 
-
960  deleteCurMode();
-
961  assert(m_numModes == 1);
-
962  assert(m_curMode == 0);
-
963  deleteCurMode();
-
964  assert(m_numModes == 0);
-
965  assert(m_curMode == 0);
-
966 
-
967  INFO_LOG("deleteCurMode(): success\n");
-
968 
-
969  INFO_LOG("== Success Running Modes Test ==\n");
-
970 }
-
971 #endif
+ +
934 {
+
935  if (!m_pInstantiatedMode) {
+
936  return false;
+
937  }
+
938  m_storedMode.clear();
+
939  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
+
940 }
+
941 
+
942 #if MODES_TEST == 1
+
943 #include <assert.h>
+
944 #include <stdio.h>
+
945 
+
946 #include "../Patterns/PatternBuilder.h"
+
947 
+
948 void Modes::test()
+
949 {
+
950  INFO_LOG("== Beginning Modes Test ==\n");
+
951 
+
952  RGBColor col = RGB_RED;
+
953  assert(!addMode(PATTERN_COUNT, col));
+
954  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
955  assert(addMode(pat, col));
+
956  }
+ +
958  clearModes();
+
959  assert(numModes() == 0);
+
960 
+ +
962  assert(!addMode(PATTERN_COUNT, nullptr, &set));
+
963  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
964  assert(addMode(pat, nullptr, &set));
+
965  }
+ +
967  clearModes();
+
968  assert(numModes() == 0);
+
969 
+
970  // add a new mode in various different ways
+
971  assert(!addMode(PATTERN_COUNT, col));
+ +
973  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
974  Mode tmpMode(pat, nullptr, &set2);
+
975  assert(addMode(&tmpMode));
+
976  }
+ +
978  clearModes();
+
979  assert(numModes() == 0);
+
980 
+
981  INFO_LOG("addMode(): success\n");
+
982 
+
983  ByteStream modebuf;
+
984  ByteStream modesave;
+
985  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
+
986  Mode tmpMode(PATTERN_BASIC, &args, &set);
+
987  tmpMode.serialize(modebuf);
+
988  tmpMode.saveToBuffer(modesave);
+
989  assert(addSerializedMode(modebuf));
+
990  assert(numModes() == 1);
+
991  assert(addModeFromBuffer(modesave));
+
992  assert(numModes() == 2);
+
993  assert(getModeLink(0) != nullptr);
+
994  Mode *mode1 = getModeLink(0)->instantiate();
+
995  assert(mode1 != nullptr);
+
996  Mode *mode2 = getModeLink(1)->instantiate();
+
997  assert(mode2 != nullptr);
+
998  assert(mode1->equals(mode2));
+
999 
+
1000  INFO_LOG("addSerializedMode(): success\n");
+
1001 
+
1002  Colorset newset(RGB_BLUE, RGB_RED, RGB_GREEN);
+ +
1004  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
+
1005  assert(setCurMode(1));
+
1006  // update the current mode to match the given mode
+
1007  assert(updateCurMode(PATTERN_DOPS, &newset));
+
1008  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
+ + +
1011 
+
1012  INFO_LOG("updateCurMode(): success\n");
+
1013 
+
1014  assert(shiftCurMode(-1));
+
1015  assert(m_curMode == 0);
+
1016  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1017  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1018  assert(shiftCurMode(0));
+
1019  assert(m_curMode == 0);
+
1020  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1021  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1022  assert(shiftCurMode(1));
+
1023  assert(m_curMode == 1);
+
1024  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1025  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1026 
+
1027  INFO_LOG("shiftCurMode(): success\n");
+
1028 
+
1029  deleteCurMode();
+
1030  assert(m_numModes == 1);
+
1031  assert(m_curMode == 0);
+
1032  deleteCurMode();
+
1033  assert(m_numModes == 0);
+
1034  assert(m_curMode == 0);
+
1035 
+
1036  INFO_LOG("deleteCurMode(): success\n");
+
1037 
+
1038  INFO_LOG("== Success Running Modes Test ==\n");
+
1039 }
+
1040 #endif
Button * g_pButton
Definition: Buttons.cpp:16
#define RGB_ORANGE
#define RGB_BLUE
@@ -1067,8 +1136,8 @@
#define RGB_WHITE
#define RGB_YELLOW
#define assert(condition)
Definition: Compression.cpp:68
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:28
@@ -1092,8 +1161,8 @@
@ PATTERN_FIRST
Definition: Patterns.h:18
@ PATTERN_LAST
Definition: Patterns.h:100
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
-
#define MAX_MODES
Definition: VortexConfig.h:168
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define MAX_MODES
Definition: VortexConfig.h:167
bool onShortClick() const
Definition: Button.h:34
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
@@ -1117,67 +1186,69 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
- - - - - - - - - - - - - - - -
static ModeLink * m_storedModes
Definition: Modes.h:220
+ + + + + + + + + + + + + + + +
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:523
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool saveCurMode()
Definition: Modes.cpp:692
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:307
-
static uint8_t startupMode()
Definition: Modes.cpp:566
-
static void resetFlags()
Definition: Modes.cpp:590
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
-
static bool setDefaults()
Definition: Modes.cpp:252
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:325
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void deleteCurMode()
Definition: Modes.cpp:592
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:376
+
static uint8_t startupMode()
Definition: Modes.cpp:635
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static void resetFlags()
Definition: Modes.cpp:659
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
+
static bool setDefaults()
Definition: Modes.cpp:321
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:394
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
-
static void clearModes()
Definition: Modes.cpp:544
-
static Mode * nextMode()
Definition: Modes.cpp:491
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
+
static void clearModes()
Definition: Modes.cpp:613
+
static Mode * nextMode()
Definition: Modes.cpp:560
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:149
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static uint8_t m_curMode
Definition: Modes.h:211
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static Mode * previousMode()
Definition: Modes.cpp:501
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:168
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static uint8_t m_curMode
Definition: Modes.h:214
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
+
static Mode * previousMode()
Definition: Modes.cpp:570
static PatternArgs getDefaultArgs(PatternID id)
uint8_t blue
Definition: ColorTypes.h:90
uint8_t red
Definition: ColorTypes.h:88
uint8_t green
Definition: ColorTypes.h:89
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:51
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:93
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:104
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:53
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool serializeVersion(ByteStream &stream)
static bool checkVersion(uint8_t major, uint8_t minor)
diff --git a/docs/core/Modes_8h_source.html b/docs/core/Modes_8h_source.html index 56a00ef212..ae22f3e010 100644 --- a/docs/core/Modes_8h_source.html +++ b/docs/core/Modes_8h_source.html @@ -241,81 +241,84 @@
152 #endif
153 
154 private:
-
155  // linked list of internal mode storage
-
156  class ModeLink {
-
157  public:
-
158  // construct a link and optionally instantiate the link
-
159  ModeLink(const Mode *src = nullptr, bool inst = false);
-
160  ModeLink(const ByteStream &src, bool inst = false);
-
161  ~ModeLink();
-
162 
-
163  // init the link and append another link
-
164  bool init(const Mode *mode = nullptr);
-
165  bool append(const Mode *next);
-
166  bool append(const ByteStream &next);
-
167 
-
168  // play the instantiated mode inside
-
169  void play();
+
155  static bool serializeSaveHeader(ByteStream &saveBuffer);
+
156  static bool unserializeSaveHeader(ByteStream &saveBuffer);
+
157 
+
158  // linked list of internal mode storage
+
159  class ModeLink {
+
160  public:
+
161  // construct a link and optionally instantiate the link
+
162  ModeLink(const Mode *src = nullptr, bool inst = false);
+
163  ModeLink(const ByteStream &src, bool inst = false);
+
164  ~ModeLink();
+
165 
+
166  // init the link and append another link
+
167  bool init(const Mode *mode = nullptr);
+
168  bool append(const Mode *next);
+
169  bool append(const ByteStream &next);
170 
-
171  // unlink self from the chain, returns link that takes position
-
172  ModeLink *unlinkSelf();
+
171  // play the instantiated mode inside
+
172  void play();
173 
-
174  // link in a node before or after self
-
175  void linkAfter(ModeLink *link);
-
176  void linkBefore(ModeLink *link);
-
177 
-
178  // instantiate/destroy the mode
-
179  Mode *instantiate();
-
180  void uninstantiate();
-
181 
-
182  // if the mode is instantiated and the instantiated version
-
183  // has changed at all then save will re-save it to the buffer
-
184  bool save();
-
185 
-
186  // accessors
- - -
189  ModeLink *next() { return m_next; }
-
190  ModeLink *prev() { return m_prev; }
-
191 
-
192  operator ByteStream &() { return m_storedMode; }
-
193  operator ByteStream() { return m_storedMode; }
-
194  operator Mode *() { return m_pInstantiatedMode; }
-
195  private:
- - - - -
200  };
-
201 
-
202  // fetch a link from the chain by index
-
203  static ModeLink *getModeLink(uint32_t index);
+
174  // unlink self from the chain, returns link that takes position
+
175  ModeLink *unlinkSelf();
+
176 
+
177  // link in a node before or after self
+
178  void linkAfter(ModeLink *link);
+
179  void linkBefore(ModeLink *link);
+
180 
+
181  // instantiate/destroy the mode
+
182  Mode *instantiate();
+
183  void uninstantiate();
+
184 
+
185  // if the mode is instantiated and the instantiated version
+
186  // has changed at all then save will re-save it to the buffer
+
187  bool save();
+
188 
+
189  // accessors
+ + +
192  ModeLink *next() { return m_next; }
+
193  ModeLink *prev() { return m_prev; }
+
194 
+
195  operator ByteStream &() { return m_storedMode; }
+
196  operator ByteStream() { return m_storedMode; }
+
197  operator Mode *() { return m_pInstantiatedMode; }
+
198  private:
+ + + + +
203  };
204 
-
205  // initialize current mode from ByteStream, optionally force re-init which
-
206  // will destroy the current instantiated mode and re-load it from serial
-
207  static Mode *initCurMode(bool force = false);
-
208  static bool saveCurMode();
-
209 
-
210  // the current mode we're on
-
211  static uint8_t m_curMode;
+
205  // fetch a link from the chain by index
+
206  static ModeLink *getModeLink(uint32_t index);
+
207 
+
208  // initialize current mode from ByteStream, optionally force re-init which
+
209  // will destroy the current instantiated mode and re-load it from serial
+
210  static Mode *initCurMode(bool force = false);
+
211  static bool saveCurMode();
212 
-
213  // the number of modes loaded
-
214  static uint8_t m_numModes;
+
213  // the current mode we're on
+
214  static uint8_t m_curMode;
215 
-
216  // the current instantiated mode and it's respective link
- +
216  // the number of modes loaded
+
217  static uint8_t m_numModes;
218 
-
219  // list of serialized version of bufers
- +
219  // the current instantiated mode and it's respective link
+
221 
-
222  // global flags for all modes
-
223  static uint8_t m_globalFlags;
+
222  // list of serialized version of bufers
+
224 
-
225  // the last switch time of the modes
-
226  static uint32_t m_lastSwitchTime;
-
227 };
-
228 
-
229 #endif
+
225  // global flags for all modes
+
226  static uint8_t m_globalFlags;
+
227 
+
228  // the last switch time of the modes
+
229  static uint32_t m_lastSwitchTime;
+
230 };
+
231 
+
232 #endif
#define RGB_OFF
#define MODES_FLAG_LOCKED
Definition: Modes.h:18
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
@@ -325,75 +328,77 @@
Definition: Mode.h:38
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
Definition: Modes.h:29
-
static ModeLink * m_storedModes
Definition: Modes.h:220
+
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:523
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static void deleteCurMode()
Definition: Modes.cpp:592
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static bool saveStorage()
Definition: Modes.cpp:205
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static bool saveCurMode()
Definition: Modes.cpp:692
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:307
-
static uint8_t startupMode()
Definition: Modes.cpp:566
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:376
+
static uint8_t startupMode()
Definition: Modes.cpp:635
static bool setOneClickMode(bool enable, bool save=true)
Definition: Modes.h:115
-
static void resetFlags()
Definition: Modes.cpp:590
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static void resetFlags()
Definition: Modes.cpp:659
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static bool keychainModeEnabled()
Definition: Modes.h:139
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:325
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:394
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static Mode * nextMode()
Definition: Modes.cpp:491
+
static Mode * nextMode()
Definition: Modes.cpp:560
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:149
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:168
static bool advancedMenusEnabled()
Definition: Modes.h:132
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static uint8_t m_curMode
Definition: Modes.h:214
static bool setKeychainMode(bool active, bool save=true)
Definition: Modes.h:136
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static Mode * previousMode()
Definition: Modes.cpp:501
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
+
static Mode * previousMode()
Definition: Modes.cpp:570
diff --git a/docs/core/PatternBuilder_8cpp_source.html b/docs/core/PatternBuilder_8cpp_source.html index 5a660530f6..84981cb61d 100644 --- a/docs/core/PatternBuilder_8cpp_source.html +++ b/docs/core/PatternBuilder_8cpp_source.html @@ -242,12 +242,12 @@
153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/core/PatternSelect_8cpp__incl.md5 b/docs/core/PatternSelect_8cpp__incl.md5 index 7813213c66..c6a36fe221 100644 --- a/docs/core/PatternSelect_8cpp__incl.md5 +++ b/docs/core/PatternSelect_8cpp__incl.md5 @@ -1 +1 @@ -d0a4e229d6fc9aa357aaa1a8178c2977 \ No newline at end of file +4944730470c39f71591b563e85e0b8fa \ No newline at end of file diff --git a/docs/core/PatternSelect_8cpp__incl.svg b/docs/core/PatternSelect_8cpp__incl.svg index 0943143024..33d8ef621a 100644 --- a/docs/core/PatternSelect_8cpp__incl.svg +++ b/docs/core/PatternSelect_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -68,628 +68,622 @@ var sectionId = 'dynsection-0'; Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/PatternArgs.h + +../../Patterns/PatternArgs.h - + Node1->Node14 - - + + Node15 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node15 - - + + Node16 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h - + Node1->Node16 - - + + Node17 - -../Log/Log.h + +../Log/Log.h - + Node1->Node17 - - + + Node19 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node19 - - + + Node20 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node20 - - + + Node21 - -../../Random/Random.h + +../../Random/Random.h - + Node1->Node21 - - + + Node23 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node23 - - + + Node24 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node24 - - + + Node25 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node25 - - + + Node26 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node26 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node4 - - + + - + Node15->Node8 - - + + - + Node15->Node11 - - + + - + Node15->Node12 - - + + - + Node15->Node14 - - + + - + Node16->Node4 - - + + - + Node16->Node17 - - + + - + Node17->Node6 - - + + - + Node17->Node9 - - + + Node18 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node17->Node18 - - + + - + Node18->Node4 - - + + - + Node18->Node6 - - + + - + Node19->Node4 - - + + - + Node19->Node6 - - + + - + Node19->Node8 - - + + - + Node20->Node4 - - + + Node22 - -stdint.h + +stdint.h - + Node21->Node22 - - + + - + Node23->Node6 - - + + - + Node23->Node19 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node6 - - + + - + Node24->Node11 - - + + - + Node24->Node16 - - + + - + Node24->Node25 - - + + - + Node25->Node4 - - + + - + Node25->Node5 - - + + - + Node25->Node8 - - + + - + Node26->Node4 - - + + - + Node26->Node5 - - + + - + Node26->Node8 - - + + - + Node26->Node10 - - + + diff --git a/docs/core/PatternSelect_8cpp__incl_org.svg b/docs/core/PatternSelect_8cpp__incl_org.svg index 6c01a5618d..b510df3047 100644 --- a/docs/core/PatternSelect_8cpp__incl_org.svg +++ b/docs/core/PatternSelect_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.cpp Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -22,628 +22,622 @@ Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/PatternArgs.h + +../../Patterns/PatternArgs.h - + Node1->Node14 - - + + Node15 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node15 - - + + Node16 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h - + Node1->Node16 - - + + Node17 - -../Log/Log.h + +../Log/Log.h - + Node1->Node17 - - + + Node19 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node19 - - + + Node20 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node20 - - + + Node21 - -../../Random/Random.h + +../../Random/Random.h - + Node1->Node21 - - + + Node23 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node23 - - + + Node24 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node24 - - + + Node25 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node25 - - + + Node26 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node26 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node4 - - + + - + Node15->Node8 - - + + - + Node15->Node11 - - + + - + Node15->Node12 - - + + - + Node15->Node14 - - + + - + Node16->Node4 - - + + - + Node16->Node17 - - + + - + Node17->Node6 - - + + - + Node17->Node9 - - + + Node18 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node17->Node18 - - + + - + Node18->Node4 - - + + - + Node18->Node6 - - + + - + Node19->Node4 - - + + - + Node19->Node6 - - + + - + Node19->Node8 - - + + - + Node20->Node4 - - + + Node22 - -stdint.h + +stdint.h - + Node21->Node22 - - + + - + Node23->Node6 - - + + - + Node23->Node19 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node6 - - + + - + Node24->Node11 - - + + - + Node24->Node16 - - + + - + Node24->Node25 - - + + - + Node25->Node4 - - + + - + Node25->Node5 - - + + - + Node25->Node8 - - + + - + Node26->Node4 - - + + - + Node26->Node5 - - + + - + Node26->Node8 - - + + - + Node26->Node10 - - + + diff --git a/docs/core/PatternSelect_8cpp_source.html b/docs/core/PatternSelect_8cpp_source.html index c28882814c..b7cdd4c2ad 100644 --- a/docs/core/PatternSelect_8cpp_source.html +++ b/docs/core/PatternSelect_8cpp_source.html @@ -255,14 +255,14 @@
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
- - + +
void onLongClick() override
void onLedSelected() override
bool init() override
-
uint8_t m_argIndex
Definition: PatternSelect.h:31
+
uint8_t m_argIndex
Definition: PatternSelect.h:30
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
void onShortClick() override
diff --git a/docs/core/PatternSelect_8h.html b/docs/core/PatternSelect_8h.html index a4c28f3447..03c70e3f34 100644 --- a/docs/core/PatternSelect_8h.html +++ b/docs/core/PatternSelect_8h.html @@ -91,12 +91,11 @@
Include dependency graph for PatternSelect.h:
-
+
diff --git a/docs/core/PatternSelect_8h__incl.md5 b/docs/core/PatternSelect_8h__incl.md5 index 785c554411..0a715a9133 100644 --- a/docs/core/PatternSelect_8h__incl.md5 +++ b/docs/core/PatternSelect_8h__incl.md5 @@ -1 +1 @@ -b134790e4ecb9b5af9f544529d10b884 \ No newline at end of file +e80755631e50a604a644cc59be4f4b24 \ No newline at end of file diff --git a/docs/core/PatternSelect_8h__incl.svg b/docs/core/PatternSelect_8h__incl.svg index d1c16b1a1c..c492a03cdc 100644 --- a/docs/core/PatternSelect_8h__incl.svg +++ b/docs/core/PatternSelect_8h__incl.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.h Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h @@ -22,217 +22,211 @@ Node2 - -../Menu.h + +../Menu.h Node1->Node2 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h - -Node1->Node9 - - - - - -Node10 - - -../Patterns/Patterns.h - - - - -Node1->Node10 - - +Node1->Node9 + + Node11 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node1->Node11 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + + + + +Node10 + + +../Patterns/Patterns.h + + Node9->Node10 - - + + Node10->Node3 - - + + Node11->Node4 - - + + Node11->Node5 - - + + diff --git a/docs/core/PatternSelect_8h_source.html b/docs/core/PatternSelect_8h_source.html index 0da606f56e..422302ebc5 100644 --- a/docs/core/PatternSelect_8h_source.html +++ b/docs/core/PatternSelect_8h_source.html @@ -93,49 +93,48 @@
4 #include "../Menu.h"
5 
6 #include "../../Colors/Colorset.h"
-
7 #include "../../Patterns/Patterns.h"
-
8 #include "../../Modes/Mode.h"
-
9 
-
10 class PatternSelect : public Menu
-
11 {
-
12 public:
-
13  PatternSelect(const RGBColor &col, bool advanced);
- -
15 
-
16  bool init() override;
-
17  MenuAction run() override;
-
18 
-
19  // callback after the user selects the target led
-
20  void onLedSelected() override;
-
21 
-
22  // handlers for clicks
-
23  void onShortClick() override;
-
24  void onLongClick() override;
-
25 
-
26 private:
-
27  // helpful member
- -
29 
-
30  // used for adv pat select
-
31  uint8_t m_argIndex;
-
32 
-
33  // the pat select starts by showing the current pattern
-
34  // then the first click begin cycling the list of pats
-
35  bool m_started;
-
36 };
-
37 
-
38 #endif
+
7 #include "../../Modes/Mode.h"
+
8 
+
9 class PatternSelect : public Menu
+
10 {
+
11 public:
+
12  PatternSelect(const RGBColor &col, bool advanced);
+ +
14 
+
15  bool init() override;
+
16  MenuAction run() override;
+
17 
+
18  // callback after the user selects the target led
+
19  void onLedSelected() override;
+
20 
+
21  // handlers for clicks
+
22  void onShortClick() override;
+
23  void onLongClick() override;
+
24 
+
25 private:
+
26  // helpful member
+ +
28 
+
29  // used for adv pat select
+
30  uint8_t m_argIndex;
+
31 
+
32  // the pat select starts by showing the current pattern
+
33  // then the first click begin cycling the list of pats
+
34  bool m_started;
+
35 };
+
36 
+
37 #endif
LedPos
Definition: LedTypes.h:11
Definition: Menu.h:11
MenuAction
Definition: Menu.h:19
- + - - + +
void onLongClick() override
void onLedSelected() override
bool init() override
-
uint8_t m_argIndex
Definition: PatternSelect.h:31
+
uint8_t m_argIndex
Definition: PatternSelect.h:30
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
void onShortClick() override
diff --git a/docs/core/Patterns_8h__dep__incl.md5 b/docs/core/Patterns_8h__dep__incl.md5 index 1033ee9c48..2a0cec6c38 100644 --- a/docs/core/Patterns_8h__dep__incl.md5 +++ b/docs/core/Patterns_8h__dep__incl.md5 @@ -1 +1 @@ -e68a2973410d50e03e79205436f3cc94 \ No newline at end of file +f61abfe1829e56d257be14bbf407be61 \ No newline at end of file diff --git a/docs/core/Patterns_8h__dep__incl.svg b/docs/core/Patterns_8h__dep__incl.svg index f694f4cb3f..9b0e88b4e8 100644 --- a/docs/core/Patterns_8h__dep__incl.svg +++ b/docs/core/Patterns_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,1160 +58,1154 @@ var sectionId = 'dynsection-1'; Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - - - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h - +Node6->Node13 + + - - - -Node9->Node14 - - - - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node15 - - + + +Node6->Node18 + + - - -Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - + -Node9->Node20 - - +Node6->Node19 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + - + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + + + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + - + + +Node14->Node11 + + + + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + + + + +Node20 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + + + + +Node23->Node11 + + - + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - + Node39->Node3 - - + + - - -Node39->Node6 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node10 + + - - -Node39->Node13 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/core/Patterns_8h__dep__incl_org.svg b/docs/core/Patterns_8h__dep__incl_org.svg index 4c42ad502f..3dd828105b 100644 --- a/docs/core/Patterns_8h__dep__incl_org.svg +++ b/docs/core/Patterns_8h__dep__incl_org.svg @@ -4,1168 +4,1162 @@ - + VortexEngine/src/Patterns/Patterns.h Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - - - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h - +Node6->Node13 + + - - - -Node9->Node14 - - - - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node15 - - + + +Node6->Node18 + + - - -Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - + -Node9->Node20 - - +Node6->Node19 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + - + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + + + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + - + + +Node14->Node11 + + + + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + + + + +Node20 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + + + + +Node23->Node11 + + - + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - + Node39->Node3 - - + + - - -Node39->Node6 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node10 + + - - -Node39->Node13 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/core/Randomizer_8cpp_source.html b/docs/core/Randomizer_8cpp_source.html index c7ecaf90aa..57ae7abaaa 100644 --- a/docs/core/Randomizer_8cpp_source.html +++ b/docs/core/Randomizer_8cpp_source.html @@ -458,8 +458,8 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
uint8_t arg7
Definition: PatternArgs.h:89
diff --git a/docs/core/Storage_8cpp.html b/docs/core/Storage_8cpp.html index 28a47d8c32..6c6266fee7 100644 --- a/docs/core/Storage_8cpp.html +++ b/docs/core/Storage_8cpp.html @@ -96,7 +96,6 @@ #include "../Memory/Memory.h"
#include "../Serial/ByteStream.h"
#include "../Log/Log.h"
-#include <unistd.h>
Include dependency graph for Storage.cpp:
@@ -126,7 +125,7 @@

-

Definition at line 21 of file Storage.cpp.

+

Definition at line 23 of file Storage.cpp.

@@ -142,7 +141,7 @@

-

Definition at line 27 of file Storage.cpp.

+

Definition at line 29 of file Storage.cpp.

diff --git a/docs/core/Storage_8cpp__incl.md5 b/docs/core/Storage_8cpp__incl.md5 index 82bceaa654..b89e7f3287 100644 --- a/docs/core/Storage_8cpp__incl.md5 +++ b/docs/core/Storage_8cpp__incl.md5 @@ -1 +1 @@ -66842402029d428d1710fad5c2bc9897 \ No newline at end of file +f1191785a90e09a838dd0a8e48a961cc \ No newline at end of file diff --git a/docs/core/Storage_8cpp__incl.svg b/docs/core/Storage_8cpp__incl.svg index 3194241aca..da176a66c1 100644 --- a/docs/core/Storage_8cpp__incl.svg +++ b/docs/core/Storage_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -76,221 +76,206 @@ var sectionId = 'dynsection-0'; Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - - - - -Node13 - - -unistd.h - - - - - -Node1->Node13 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/core/Storage_8cpp__incl_org.svg b/docs/core/Storage_8cpp__incl_org.svg index 44b11ce069..4807809e7a 100644 --- a/docs/core/Storage_8cpp__incl_org.svg +++ b/docs/core/Storage_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Storage/Storage.cpp Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -30,221 +30,206 @@ Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - - - - -Node13 - - -unistd.h - - - - - -Node1->Node13 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/core/Storage_8cpp_source.html b/docs/core/Storage_8cpp_source.html index 7ad9ff33f0..7c76f75169 100644 --- a/docs/core/Storage_8cpp_source.html +++ b/docs/core/Storage_8cpp_source.html @@ -101,163 +101,181 @@
12 #include "../VortexLib/VortexLib.h"
13 #endif
14 
-
15 #ifdef _WIN32
-
16 #include <Windows.h>
-
17 #else
-
18 #include <unistd.h>
-
19 #endif
-
20 
-
21 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
15 #ifndef VORTEX_EMBEDDED
+
16 #ifdef _WIN32
+
17 #include <Windows.h>
+
18 #else
+
19 #include <unistd.h>
+
20 #endif
+
21 #endif
22 
-
23 #ifdef VORTEX_LIB
-
24 std::string Storage::m_storageFilename;
-
25 #define STORAGE_FILENAME m_storageFilename.c_str()
-
26 #else
-
27 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
-
28 #endif
-
29 
-
30 uint32_t Storage::m_lastSaveSize = 0;
+
23 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
24 
+
25 #ifdef VORTEX_LIB
+
26 std::string Storage::m_storageFilename;
+
27 #define STORAGE_FILENAME m_storageFilename.c_str()
+
28 #else
+
29 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
+
30 #endif
31 
- -
33 {
-
34 }
-
35 
- -
37 {
-
38 #ifdef VORTEX_LIB
-
39  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
40  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
41  }
-
42 #endif
-
43  return true;
-
44 }
-
45 
- -
47 {
-
48 }
-
49 
-
50 // store a serial buffer to storage
- -
52 {
-
53 #ifdef VORTEX_LIB
-
54  if (!Vortex::storageEnabled()) {
-
55  // success so the system thinks it all worked
-
56  return true;
-
57  }
-
58 #endif
-
59  // check size
-
60  if (buffer.rawSize() > STORAGE_SIZE) {
-
61  ERROR_LOG("Buffer too big for storage space");
-
62  return false;
-
63  }
-
64 #ifdef VORTEX_EMBEDDED
-
65  // implement device storage here
-
66 #elif defined(_WIN32)
-
67  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
68  if (hFile == INVALID_HANDLE_VALUE) {
-
69  // error
-
70  return false;
-
71  }
-
72  DWORD written = 0;
-
73  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
74  // error
-
75  return false;
-
76  }
-
77  CloseHandle(hFile);
-
78 #else
-
79  FILE *f = fopen(STORAGE_FILENAME, "w");
-
80  if (!f) {
-
81  return false;
-
82  }
-
83  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
+
32 uint32_t Storage::m_lastSaveSize = 0;
+
33 
+ +
35 {
+
36 }
+
37 
+ +
39 {
+
40 #ifdef VORTEX_LIB
+
41  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
42  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
43  }
+
44 #endif
+
45  return true;
+
46 }
+
47 
+ +
49 {
+
50 }
+
51 
+
52 // store a serial buffer to storage
+
53 bool Storage::write(uint16_t slot, ByteStream &buffer)
+
54 {
+
55 #ifdef VORTEX_LIB
+
56  if (!Vortex::storageEnabled()) {
+
57  // success so the system thinks it all worked
+
58  return true;
+
59  }
+
60 #endif
+
61  // check size
+
62  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
63  ERROR_LOG("Buffer too big for storage space");
+
64  return false;
+
65  }
+
66  if (slot >= NUM_MODE_SLOTS) {
+
67  return false;
+
68  }
+
69  // just in case
+
70  buffer.recalcCRC();
+
71 #ifdef VORTEX_EMBEDDED
+
72  // implement device storage here
+
73 #elif defined(_WIN32)
+
74  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
75  if (hFile == INVALID_HANDLE_VALUE) {
+
76  // error
+
77  return false;
+
78  }
+
79  DWORD written = 0;
+
80  DWORD offset = slot * MAX_MODE_SIZE;
+
81  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
82  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
83  // error
84  return false;
85  }
-
86  fclose(f);
-
87 #endif // VORTEX_EMBEDDED
-
88  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
89  return true;
-
90 }
-
91 
-
92 // read a serial buffer from storage
- -
94 {
-
95 #ifdef VORTEX_LIB
-
96  if (!Vortex::storageEnabled()) {
-
97  // return false here, but true in write because we don't want to return
-
98  // an empty buffer after returning true
-
99  return false;
-
100  }
-
101 #endif
-
102  uint32_t size = STORAGE_SIZE;
-
103  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
104  return false;
-
105  }
-
106  if (!buffer.init(size)) {
-
107  return false;
-
108  }
-
109 #ifdef VORTEX_EMBEDDED
-
110  // implement device storage here
-
111 #elif defined(_WIN32)
-
112  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
113  if (hFile == INVALID_HANDLE_VALUE) {
-
114  // error
+
86  CloseHandle(hFile);
+
87 #else
+
88  FILE *f = fopen(STORAGE_FILENAME, "w");
+
89  if (!f) {
+
90  return false;
+
91  }
+
92  long offset = slot * MAX_MODE_SIZE;
+
93  fseek(f, offset, SEEK_SET);
+
94  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
95  return false;
+
96  }
+
97  fclose(f);
+
98 #endif // VORTEX_EMBEDDED
+
99  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
100  return true;
+
101 }
+
102 
+
103 // read a serial buffer from storage
+
104 bool Storage::read(uint16_t slot, ByteStream &buffer)
+
105 {
+
106 #ifdef VORTEX_LIB
+
107  if (!Vortex::storageEnabled()) {
+
108  // return false here, but true in write because we don't want to return
+
109  // an empty buffer after returning true
+
110  return false;
+
111  }
+
112 #endif
+
113  uint32_t size = MAX_MODE_SIZE;
+
114  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
115  return false;
116  }
-
117  DWORD bytesRead = 0;
-
118  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
119  // error
-
120  return false;
-
121  }
-
122  CloseHandle(hFile);
-
123 #else
-
124  FILE *f = fopen(STORAGE_FILENAME, "r");
-
125  if (!f) {
+
117  if (!buffer.init(size)) {
+
118  return false;
+
119  }
+
120 #ifdef VORTEX_EMBEDDED
+
121  // implement device storage here
+
122 #elif defined(_WIN32)
+
123  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
124  if (hFile == INVALID_HANDLE_VALUE) {
+
125  // error
126  return false;
127  }
-
128  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
129  return false;
-
130  }
-
131  fclose(f);
-
132 #endif
-
133  // ensure the internal buffer is sane after reading it out, this
-
134  // prevents segfaults if the internal size reports larger than capacity
-
135  buffer.sanity();
-
136  // check crc immediately since we read into raw data copying the
-
137  // array could be dangerous
-
138  if (!buffer.checkCRC()) {
-
139  buffer.clear();
-
140  ERROR_LOG("Could not verify buffer");
-
141  return false;
-
142  }
-
143  m_lastSaveSize = size;
-
144  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
145  return true;
-
146 }
-
147 
- -
149 {
-
150  return m_lastSaveSize;
-
151 }
+
128  DWORD bytesRead = 0;
+
129  DWORD offset = slot * MAX_MODE_SIZE;
+
130  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
131  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
132  // error
+
133  return false;
+
134  }
+
135  CloseHandle(hFile);
+
136 #else
+
137  FILE *f = fopen(STORAGE_FILENAME, "r");
+
138  if (!f) {
+
139  return false;
+
140  }
+
141  long offset = slot * MAX_MODE_SIZE;
+
142  fseek(f, offset, SEEK_SET);
+
143  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
144  return false;
+
145  }
+
146  fclose(f);
+
147 #endif
+
148  // ensure the internal buffer is sane after reading it out, this
+
149  // prevents segfaults if the internal size reports larger than capacity
+
150  buffer.sanity();
+
151  // check crc immediately since we read into raw data copying the
+
152  // array could be dangerous
+
153  if (!buffer.checkCRC()) {
+
154  buffer.clear();
+
155  ERROR_LOG("Could not verify buffer");
+
156  return false;
+
157  }
+
158  m_lastSaveSize = size;
+
159  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
160  return true;
+
161 }
+
162 
+ +
164 {
+
165  return m_lastSaveSize;
+
166 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:502
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
void * rawData() const
Definition: ByteStream.h:121
uint32_t rawSize() const
Definition: ByteStream.h:122
void clear()
Definition: ByteStream.cpp:107
uint32_t size() const
Definition: ByteStream.h:123
bool checkCRC() const
Definition: ByteStream.cpp:327
void sanity()
Definition: ByteStream.cpp:319
-
static bool init()
Definition: Storage.cpp:36
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:51
-
static void cleanup()
Definition: Storage.cpp:46
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:93
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:148
-
Storage()
Definition: Storage.cpp:32
+
static bool init()
Definition: Storage.cpp:38
+
static void cleanup()
Definition: Storage.cpp:48
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:104
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:163
+
Storage()
Definition: Storage.cpp:34
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:53
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/core/Storage_8h_source.html b/docs/core/Storage_8h_source.html index a326f76e41..337aff8a02 100644 --- a/docs/core/Storage_8h_source.html +++ b/docs/core/Storage_8h_source.html @@ -108,9 +108,9 @@
19  static void cleanup();
20 
21  // store a serial buffer to storage
-
22  static bool write(ByteStream &buffer);
+
22  static bool write(uint16_t slot, ByteStream &buffer);
23  // read a serial buffer from storage
-
24  static bool read(ByteStream &buffer);
+
24  static bool read(uint16_t slot, ByteStream &buffer);
25 
26  // the last save size (use STORAGE_SIZE For total space)
27  static uint32_t lastSaveSize();
@@ -132,12 +132,12 @@
43 #endif
-
static bool init()
Definition: Storage.cpp:36
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:51
-
static void cleanup()
Definition: Storage.cpp:46
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:93
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:148
-
Storage()
Definition: Storage.cpp:32
+
static bool init()
Definition: Storage.cpp:38
+
static void cleanup()
Definition: Storage.cpp:48
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:104
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:163
+
Storage()
Definition: Storage.cpp:34
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:53
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/core/TimeControl_8cpp_source.html b/docs/core/TimeControl_8cpp_source.html index d2a0fb0295..37c61503ed 100644 --- a/docs/core/TimeControl_8cpp_source.html +++ b/docs/core/TimeControl_8cpp_source.html @@ -195,7 +195,7 @@
106  uint32_t sleepTime = 0;
107  if (required > elapsed_us) {
108  // in vortex lib on linux we can just sleep instead of spinning
-
109  // but on arduino we must spin and on windows it actually ends
+
109  // but on embedded we must spin and on windows it actually ends
110  // up being more accurate to poll QPF + QPC via microseconds()
111  sleepTime = required - elapsed_us;
112  }
@@ -419,7 +419,7 @@
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static bool init()
Definition: TimeControl.cpp:46
static void delayMicroseconds(uint32_t us)
static uint32_t getRealCurtime()
diff --git a/docs/core/Timings_8h_source.html b/docs/core/Timings_8h_source.html index 5d20d7b0a5..c0624b13e7 100644 --- a/docs/core/Timings_8h_source.html +++ b/docs/core/Timings_8h_source.html @@ -98,17 +98,17 @@
9 // through the MS_TO_TICKS macro which calculates the corresponding number of ticks for
10 // the given duration at the current tickrate, on embedded this is 1 to 1 but in vortexlib
11 // the tickrate can be adjusted so these will expand out to function calls to millisecondsToTicks()
-
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
-
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
-
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
-
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
-
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
-
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
-
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
-
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
-
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
-
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
-
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
+
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
+
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
+
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
+
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
+
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
+
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
+
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
+
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
+
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
+
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
+
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
23 
24 // Strobe Timings
25 //
diff --git a/docs/core/VortexConfig_8h.html b/docs/core/VortexConfig_8h.html index d0a252c9e6..a5526e388c 100644 --- a/docs/core/VortexConfig_8h.html +++ b/docs/core/VortexConfig_8h.html @@ -155,7 +155,7 @@   #define DEFAULT_BRIGHTNESS   185   -#define MAX_MODES   0 +#define MAX_MODES   13   #define DEFAULT_TICKRATE   1000   @@ -269,7 +269,11 @@   #define EDITOR_VERB_GOODBYE   "l"   -#define STORAGE_SIZE   4096 +#define MAX_MODE_SIZE   512 +  +#define NUM_MODE_SLOTS   (MAX_MODES + 1) +  +#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)   #define VORTEX_EMBEDDED   1   @@ -323,7 +327,7 @@

-

Definition at line 274 of file VortexConfig.h.

+

Definition at line 273 of file VortexConfig.h.

@@ -387,7 +391,7 @@

-

Definition at line 280 of file VortexConfig.h.

+

Definition at line 279 of file VortexConfig.h.

@@ -403,7 +407,7 @@

-

Definition at line 281 of file VortexConfig.h.

+

Definition at line 280 of file VortexConfig.h.

@@ -419,7 +423,7 @@

-

Definition at line 282 of file VortexConfig.h.

+

Definition at line 281 of file VortexConfig.h.

@@ -435,7 +439,7 @@

-

Definition at line 283 of file VortexConfig.h.

+

Definition at line 282 of file VortexConfig.h.

@@ -499,7 +503,7 @@

-

Definition at line 391 of file VortexConfig.h.

+

Definition at line 390 of file VortexConfig.h.

@@ -531,7 +535,7 @@

-

Definition at line 332 of file VortexConfig.h.

+

Definition at line 331 of file VortexConfig.h.

@@ -563,7 +567,7 @@

-

Definition at line 199 of file VortexConfig.h.

+

Definition at line 198 of file VortexConfig.h.

@@ -579,7 +583,7 @@

-

Definition at line 189 of file VortexConfig.h.

+

Definition at line 188 of file VortexConfig.h.

@@ -595,7 +599,7 @@

-

Definition at line 321 of file VortexConfig.h.

+

Definition at line 320 of file VortexConfig.h.

@@ -627,7 +631,7 @@

-

Definition at line 486 of file VortexConfig.h.

+

Definition at line 485 of file VortexConfig.h.

@@ -643,7 +647,7 @@

-

Definition at line 488 of file VortexConfig.h.

+

Definition at line 487 of file VortexConfig.h.

@@ -659,7 +663,7 @@

-

Definition at line 481 of file VortexConfig.h.

+

Definition at line 480 of file VortexConfig.h.

@@ -675,7 +679,7 @@

-

Definition at line 483 of file VortexConfig.h.

+

Definition at line 482 of file VortexConfig.h.

@@ -691,7 +695,7 @@

-

Definition at line 492 of file VortexConfig.h.

+

Definition at line 491 of file VortexConfig.h.

@@ -707,7 +711,7 @@

-

Definition at line 457 of file VortexConfig.h.

+

Definition at line 456 of file VortexConfig.h.

@@ -723,7 +727,7 @@

-

Definition at line 456 of file VortexConfig.h.

+

Definition at line 455 of file VortexConfig.h.

@@ -739,7 +743,7 @@

-

Definition at line 455 of file VortexConfig.h.

+

Definition at line 454 of file VortexConfig.h.

@@ -755,7 +759,7 @@

-

Definition at line 460 of file VortexConfig.h.

+

Definition at line 459 of file VortexConfig.h.

@@ -771,7 +775,7 @@

-

Definition at line 469 of file VortexConfig.h.

+

Definition at line 468 of file VortexConfig.h.

@@ -787,7 +791,7 @@

-

Definition at line 473 of file VortexConfig.h.

+

Definition at line 472 of file VortexConfig.h.

@@ -803,7 +807,7 @@

-

Definition at line 471 of file VortexConfig.h.

+

Definition at line 470 of file VortexConfig.h.

@@ -819,7 +823,7 @@

-

Definition at line 476 of file VortexConfig.h.

+

Definition at line 475 of file VortexConfig.h.

@@ -835,7 +839,7 @@

-

Definition at line 478 of file VortexConfig.h.

+

Definition at line 477 of file VortexConfig.h.

@@ -851,7 +855,7 @@

-

Definition at line 466 of file VortexConfig.h.

+

Definition at line 465 of file VortexConfig.h.

@@ -867,7 +871,7 @@

-

Definition at line 384 of file VortexConfig.h.

+

Definition at line 383 of file VortexConfig.h.

@@ -903,7 +907,7 @@

-

Definition at line 312 of file VortexConfig.h.

+

Definition at line 311 of file VortexConfig.h.

@@ -919,7 +923,7 @@

-

Definition at line 377 of file VortexConfig.h.

+

Definition at line 376 of file VortexConfig.h.

@@ -935,7 +939,7 @@

-

Definition at line 254 of file VortexConfig.h.

+

Definition at line 253 of file VortexConfig.h.

@@ -951,7 +955,7 @@

-

Definition at line 261 of file VortexConfig.h.

+

Definition at line 260 of file VortexConfig.h.

@@ -967,7 +971,7 @@

-

Definition at line 268 of file VortexConfig.h.

+

Definition at line 267 of file VortexConfig.h.

@@ -999,7 +1003,7 @@

-

Definition at line 225 of file VortexConfig.h.

+

Definition at line 224 of file VortexConfig.h.

@@ -1015,7 +1019,7 @@

-

Definition at line 230 of file VortexConfig.h.

+

Definition at line 229 of file VortexConfig.h.

@@ -1031,7 +1035,7 @@

-

Definition at line 219 of file VortexConfig.h.

+

Definition at line 218 of file VortexConfig.h.

@@ -1063,7 +1067,23 @@

-

Definition at line 207 of file VortexConfig.h.

+

Definition at line 206 of file VortexConfig.h.

+ + + + +

◆ MAX_MODE_SIZE

+ +
+
+ + + + +
#define MAX_MODE_SIZE   512
+
+ +

Definition at line 499 of file VortexConfig.h.

@@ -1074,12 +1094,12 @@

- +
#define MAX_MODES   0#define MAX_MODES   13
-

Definition at line 168 of file VortexConfig.h.

+

Definition at line 167 of file VortexConfig.h.

@@ -1111,7 +1131,23 @@

-

Definition at line 405 of file VortexConfig.h.

+

Definition at line 404 of file VortexConfig.h.

+ + + + +

◆ NUM_MODE_SLOTS

+ +
+
+ + + + +
#define NUM_MODE_SLOTS   (MAX_MODES + 1)
+
+ +

Definition at line 502 of file VortexConfig.h.

@@ -1143,7 +1179,7 @@

-

Definition at line 440 of file VortexConfig.h.

+

Definition at line 439 of file VortexConfig.h.

@@ -1159,7 +1195,7 @@

-

Definition at line 434 of file VortexConfig.h.

+

Definition at line 433 of file VortexConfig.h.

@@ -1175,7 +1211,7 @@

-

Definition at line 431 of file VortexConfig.h.

+

Definition at line 430 of file VortexConfig.h.

@@ -1191,7 +1227,7 @@

-

Definition at line 443 of file VortexConfig.h.

+

Definition at line 442 of file VortexConfig.h.

@@ -1207,7 +1243,7 @@

-

Definition at line 428 of file VortexConfig.h.

+

Definition at line 427 of file VortexConfig.h.

@@ -1223,7 +1259,7 @@

-

Definition at line 437 of file VortexConfig.h.

+

Definition at line 436 of file VortexConfig.h.

@@ -1239,7 +1275,7 @@

-

Definition at line 425 of file VortexConfig.h.

+

Definition at line 424 of file VortexConfig.h.

@@ -1255,7 +1291,7 @@

-

Definition at line 289 of file VortexConfig.h.

+

Definition at line 288 of file VortexConfig.h.

@@ -1271,7 +1307,7 @@

-

Definition at line 290 of file VortexConfig.h.

+

Definition at line 289 of file VortexConfig.h.

@@ -1287,7 +1323,7 @@

-

Definition at line 291 of file VortexConfig.h.

+

Definition at line 290 of file VortexConfig.h.

@@ -1303,7 +1339,7 @@

-

Definition at line 292 of file VortexConfig.h.

+

Definition at line 291 of file VortexConfig.h.

@@ -1335,7 +1371,7 @@

-

Definition at line 397 of file VortexConfig.h.

+

Definition at line 396 of file VortexConfig.h.

@@ -1346,12 +1382,12 @@

- +
#define STORAGE_SIZE   4096#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)
-

Definition at line 501 of file VortexConfig.h.

+

Definition at line 506 of file VortexConfig.h.

@@ -1367,7 +1403,7 @@

-

Definition at line 411 of file VortexConfig.h.

+

Definition at line 410 of file VortexConfig.h.

@@ -1383,7 +1419,7 @@

-

Definition at line 298 of file VortexConfig.h.

+

Definition at line 297 of file VortexConfig.h.

@@ -1399,7 +1435,7 @@

-

Definition at line 299 of file VortexConfig.h.

+

Definition at line 298 of file VortexConfig.h.

@@ -1415,7 +1451,7 @@

-

Definition at line 300 of file VortexConfig.h.

+

Definition at line 299 of file VortexConfig.h.

@@ -1431,7 +1467,7 @@

-

Definition at line 301 of file VortexConfig.h.

+

Definition at line 300 of file VortexConfig.h.

@@ -1447,7 +1483,7 @@

-

Definition at line 346 of file VortexConfig.h.

+

Definition at line 345 of file VortexConfig.h.

@@ -1463,7 +1499,7 @@

-

Definition at line 512 of file VortexConfig.h.

+

Definition at line 517 of file VortexConfig.h.

@@ -1479,7 +1515,7 @@

-

Definition at line 365 of file VortexConfig.h.

+

Definition at line 364 of file VortexConfig.h.

@@ -1511,7 +1547,7 @@

-

Definition at line 235 of file VortexConfig.h.

+

Definition at line 234 of file VortexConfig.h.

diff --git a/docs/core/VortexConfig_8h.js b/docs/core/VortexConfig_8h.js index 59c86b3f1b..5f6d05480b 100644 --- a/docs/core/VortexConfig_8h.js +++ b/docs/core/VortexConfig_8h.js @@ -49,9 +49,11 @@ var VortexConfig_8h = [ "LOGGING_LEVEL", "VortexConfig_8h.html#aaff29f732338b733b8d1fee0e8df32ab", null ], [ "MAX_COLOR_SLOTS", "VortexConfig_8h.html#a1a0b694e2871554a4066f8d61f577c4c", null ], [ "MAX_MEMORY", "VortexConfig_8h.html#add0367147bdc878651ddf447424b50d5", null ], + [ "MAX_MODE_SIZE", "VortexConfig_8h.html#a4d5f0e0392f00d31715ddf81eb87434a", null ], [ "MAX_MODES", "VortexConfig_8h.html#a95b270e9c99aea216b47fd1e95b2cf34", null ], [ "MENU_TRIGGER_TIME", "VortexConfig_8h.html#adda1b08b81d68fa6a4a6109701f9dd57", null ], [ "MODES_TEST", "VortexConfig_8h.html#a9c95eccf51317b46e19269c6dbc7628e", null ], + [ "NUM_MODE_SLOTS", "VortexConfig_8h.html#ab0c5cc9223512ec01c405592b6741898", null ], [ "RESET_HOLD_TIME", "VortexConfig_8h.html#a18f22a5b8ac9dfe404fd4b83e502eda2", null ], [ "RGB_MENU_BRIGHTNESS_SELECT", "VortexConfig_8h.html#a3fd5d16a2fea0175b3b34083c6dfb42f", null ], [ "RGB_MENU_COLOR_SELECT", "VortexConfig_8h.html#a3b335e17dcc12be29e18e3373e5352cb", null ], diff --git a/docs/core/VortexConfig_8h_source.html b/docs/core/VortexConfig_8h_source.html index d28e0905b2..aeaf219128 100644 --- a/docs/core/VortexConfig_8h_source.html +++ b/docs/core/VortexConfig_8h_source.html @@ -250,434 +250,439 @@
161 // two fold the issues with space because they are already limited
162 // and the lack of compression makes their save files bigger
163 //
-
164 // This is set to 0 by default which allows for any number of modes
-
165 // to be stored, however this is not recommended for production and
-
166 // a specific maximum should be chosen for each device
-
167 //
-
168 #define MAX_MODES 0
-
169 
-
170 // Default Tickrate in Ticks Per Second (TPS)
-
171 //
-
172 // The valid range for this is 1 <= x <= 1000000 (default 1000)
-
173 //
-
174 // Any value near or above 10000 will most likely be too fast for
-
175 // the processor to handle.
-
176 //
-
177 // Any value less than 100 and you risk a single tick taking longer
-
178 // than some pattern timings which results in very weird behaviour
-
179 //
-
180 // It's probably best that you leave this at 1000
-
181 //
-
182 // WARNING:
-
183 //
-
184 // The timer system was not designed to handle ticks that are not
-
185 // exactly 1 ms. This means that if you change the tickrate to any
-
186 // value other than 1000 the timer system will miss alarms, patterns
-
187 // will not look correct and there is no fix at the moment.
-
188 //
-
189 #define DEFAULT_TICKRATE 1000
-
190 
-
191 // Pair time offset in ticks
-
192 //
-
193 // This changes how many ticks out of sync each finger will run.
-
194 // So 33 means each finger runs 33 ticks out of sync with the
-
195 // previous finger.
-
196 //
-
197 // This was an early feature that fell into disrepair, I don't
-
198 // think it works anymore and really hasn't proven to be useful
-
199 #define DEFAULT_TICK_OFFSET 0
-
200 
-
201 // Max Memory Usage
-
202 //
-
203 // The maximum memory usage allowed by the memory tracker.
-
204 // The memory tracker isn't present in final builds, only debug
-
205 // so this number doesn't actually do anything in production.
-
206 // Mostly for catching leaks or high memory usage in development.
-
207 #define MAX_MEMORY 8000
-
208 
-
209 // Log Level
-
210 //
-
211 // Set the logging level to control info/error/debug logs accordingly
-
212 // The available logging levels are:
-
213 //
-
214 // 0 Off All logging is disabled
-
215 // 1 Info Only info logs are present
-
216 // 2 Errors Info and error logs are present
-
217 // 3 Debug All logs are present, info, error, and debug
-
218 //
-
219 #define LOGGING_LEVEL 0
-
220 
-
221 // Log to Console
-
222 //
-
223 // Enable logging to console, still need to change LOGGING_LEVEL
-
224 // this only enables the console output connection
-
225 #define LOG_TO_CONSOLE 0
-
226 
-
227 // Log to File
-
228 //
-
229 // Enable this configuration to enable logging to the file
-
230 #define LOG_TO_FILE 0
-
231 
-
232 // Log Name
-
233 //
-
234 // The name of the file on disk that will receive the log info
-
235 #define VORTEX_LOG_NAME "vortexlog"
-
236 
-
237 // HSV to RGB Conversion Algorithm
-
238 //
-
239 // Here you can choose the HSV to RGB conversion algorithm, this will
-
240 // control the overall appearance of all colours produced with HSV.
-
241 // The available options are:
-
242 //
-
243 // 1 FastLED 'hsv to rgb rainbow'
-
244 // 2 FastLED 'hsv to rgb raw C'
-
245 // 3 generic hsv to rgb 'pastel'
-
246 //
-
247 // Option 1 is the default and legacy choice, also looks best because
-
248 // it puts even weight into every color of the rainbow which involves
-
249 // stretching some segments like yellow to take up more hue space.
-
250 //
-
251 // Note you can still call the other routines from your pattern code,
-
252 // for example blend and complementary blend use hsv to rgb 'pastel'
-
253 // because it looks better than hsv to rgb rainbow
-
254 #define HSV_TO_RGB_ALGORITHM 3
-
255 
-
256 // IR Receiver Time-out Duration (ms)
-
257 //
-
258 // This is the amount of time in ms for the IR receiver to wait
-
259 // before reseting itself in the case that communication gets
-
260 // interrupted.
-
261 #define IR_RECEIVER_TIMEOUT_DURATION 2000
-
262 
-
263 // IR Sender Wait Duration (ms)
-
264 //
-
265 // This is the amount of time in ms for the IR sender to wait
-
266 // between IR sends. This duration allows the user to give input
-
267 // as it is not possible to give input during a send.
-
268 #define IR_SENDER_WAIT_DURATION 2000
-
269 
-
270 // Enter Advanced Menus Click Duration (ms)
-
271 //
-
272 // How long the user must long click on the menu item to enter the
-
273 // 'advanced' version of the menu
-
274 #define ADVANCED_MENU_ENTER_DURATION 1500
-
275 
-
276 // Brightness Options
-
277 //
-
278 // These are the four options available in the global brightness menu
-
279 // There is only four options, be careful not to go too low
-
280 #define BRIGHTNESS_OPTION_1 40
-
281 #define BRIGHTNESS_OPTION_2 120
-
282 #define BRIGHTNESS_OPTION_3 185
-
283 #define BRIGHTNESS_OPTION_4 255
-
284 
-
285 // Saturation Options
-
286 //
-
287 // These are the four saturations available in the color selection menu
-
288 // Any color can be picked with any of these 4 saturations
-
289 #define SAT_OPTION_1 0
-
290 #define SAT_OPTION_2 85
-
291 #define SAT_OPTION_3 170
-
292 #define SAT_OPTION_4 255
-
293 
-
294 // Value/Luminance Options
-
295 //
-
296 // These are the four values/luminance options in the color selection menu
-
297 // Any color can be picked with any of these 4 values
-
298 #define VAL_OPTION_1 0
-
299 #define VAL_OPTION_2 85
-
300 #define VAL_OPTION_3 170
-
301 #define VAL_OPTION_4 255
-
302 
-
303 // ===================================================================
-
304 // Boolean Configurations (0 or 1)
-
305 
-
306 // Fill From Thumb
-
307 //
-
308 // The ring menu will fill from the thumb if this is present, otherwise
-
309 // it will fill from the pinkie.
-
310 //
-
311 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
-
312 #define FILL_FROM_THUMB 1
-
313 
-
314 // Demo All Patterns
-
315 //
-
316 // The default modes that are set on the gloveset will be dynamically
-
317 // generated with one mode per pattern in the patterns list
-
318 //
-
319 // This can be used to quickly demo all possible patterns, mostly useful
-
320 // for testing and development
-
321 #define DEMO_ALL_PATTERNS 0
-
322 
-
323 // Debug Allocations
-
324 //
-
325 // Tracks all memory allocations and logs them, useful for finding leaks
-
326 //
-
327 // Note tracking allocations while using the test framework will be inaccurate
-
328 // because the test framework allocations will be caught as well.
-
329 //
-
330 // When the test framework does things like display a color for the first time
-
331 // it will allocate space permanently for the new brush and never free it
-
332 #define DEBUG_ALLOCATIONS 0
-
333 
-
334 // Variable Tickrate
-
335 //
-
336 // This controls whether the setTickrate function is available and
-
337 // whether changing the tickrate is allowed. This goes hand-in-hand
-
338 // with the Default Tickrate configuration above
-
339 //
-
340 // The tickrate should always be fixed in final builds because this
-
341 // functionality induces extra performance costs and the intended
-
342 // tickrate for the final build should already be known.
-
343 //
-
344 // However there may be some clever uses for variable tickrate in
-
345 // the final build? I'm not sure.
-
346 #define VARIABLE_TICKRATE 0
-
347 
-
348 // Error Blinker System
-
349 //
-
350 // This toggles the vortex error blinker system, this system reports
-
351 // fatal errors as a series of blinks. If an error is encountered the
-
352 // chip will only blink out the error code from there forward.
-
353 //
-
354 // Note that enabling this system takes a non-negligible amount
-
355 // of space for all of the code, it really should only be used
-
356 // for debug settings or given tiers like logging level.
-
357 //
-
358 // This is mainly useful for tracking down issues on devices that don't
-
359 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
-
360 // set the error code and then the device will blink out the error
-
361 //
-
362 // for ex: red red green blue blue blue is code 213
-
363 //
-
364 // See Log/ErrorBlinker.h for details on the error codes
-
365 #define VORTEX_ERROR_BLINK 0
-
366 
-
367 // Fixed LED Count
-
368 //
-
369 // Do not allow the Mode loader to dynamically load however many modes
-
370 // are saved in the savefile. This should be enabled for arduino or vortex
-
371 // device builds because they cannot change their number of LEDs. However
-
372 // other tools like the editor or vortex emulator may be able to make use
-
373 // of this to dynamically adjust the number of leds that a mode can handle
-
374 //
-
375 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
-
376 // a mode will stretch it's list of patterns to match the number of leds
-
377 #define FIXED_LED_COUNT 1
-
378 
-
379 // Enable Editor Connection
-
380 //
-
381 // Turn on the editor connection, some devices are capable of connecting to
-
382 // the pc-based editor, this controls whether the engine exposes the purple
-
383 // editor connection menu or not
-
384 #define ENABLE_EDITOR_CONNECTION 1
-
385 
-
386 // Compression Test
-
387 //
-
388 // Run the built-in compression test that will find any faults
-
389 // in the compressor or decompressor. This is useful if you install
-
390 // a new compressor or want to test any changes to the compressor
-
391 #define COMPRESSION_TEST 0
-
392 
-
393 // Serialization Test
-
394 //
-
395 // Run the serializer/unserializer test which will find any objects
-
396 // which don't serialize and unserialize cleanly
-
397 #define SERIALIZATION_TEST 0
-
398 
-
399 // Modes Test
-
400 //
-
401 // Run unit tests on the Modes class which manages the list of Modes.
-
402 // If any patterns fail to instantiate or perform basic operations
-
403 // it should show up in the modes test. Also if the Modes api has been
-
404 // updated then this will test for any issues
-
405 #define MODES_TEST 0
-
406 
-
407 // Timer Test
-
408 //
-
409 // Tests the timers, time control, and timestep system to ensure they
-
410 // are all working as expected and behaving properly
-
411 #define TIMER_TEST 0
+
164 // This should not be set to 0, it should be a specific maximum for
+
165 // each separate device
+
166 //
+
167 #define MAX_MODES 13
+
168 
+
169 // Default Tickrate in Ticks Per Second (TPS)
+
170 //
+
171 // The valid range for this is 1 <= x <= 1000000 (default 1000)
+
172 //
+
173 // Any value near or above 10000 will most likely be too fast for
+
174 // the processor to handle.
+
175 //
+
176 // Any value less than 100 and you risk a single tick taking longer
+
177 // than some pattern timings which results in very weird behaviour
+
178 //
+
179 // It's probably best that you leave this at 1000
+
180 //
+
181 // WARNING:
+
182 //
+
183 // The timer system was not designed to handle ticks that are not
+
184 // exactly 1 ms. This means that if you change the tickrate to any
+
185 // value other than 1000 the timer system will miss alarms, patterns
+
186 // will not look correct and there is no fix at the moment.
+
187 //
+
188 #define DEFAULT_TICKRATE 1000
+
189 
+
190 // Pair time offset in ticks
+
191 //
+
192 // This changes how many ticks out of sync each finger will run.
+
193 // So 33 means each finger runs 33 ticks out of sync with the
+
194 // previous finger.
+
195 //
+
196 // This was an early feature that fell into disrepair, I don't
+
197 // think it works anymore and really hasn't proven to be useful
+
198 #define DEFAULT_TICK_OFFSET 0
+
199 
+
200 // Max Memory Usage
+
201 //
+
202 // The maximum memory usage allowed by the memory tracker.
+
203 // The memory tracker isn't present in final builds, only debug
+
204 // so this number doesn't actually do anything in production.
+
205 // Mostly for catching leaks or high memory usage in development.
+
206 #define MAX_MEMORY 8000
+
207 
+
208 // Log Level
+
209 //
+
210 // Set the logging level to control info/error/debug logs accordingly
+
211 // The available logging levels are:
+
212 //
+
213 // 0 Off All logging is disabled
+
214 // 1 Info Only info logs are present
+
215 // 2 Errors Info and error logs are present
+
216 // 3 Debug All logs are present, info, error, and debug
+
217 //
+
218 #define LOGGING_LEVEL 0
+
219 
+
220 // Log to Console
+
221 //
+
222 // Enable logging to console, still need to change LOGGING_LEVEL
+
223 // this only enables the console output connection
+
224 #define LOG_TO_CONSOLE 0
+
225 
+
226 // Log to File
+
227 //
+
228 // Enable this configuration to enable logging to the file
+
229 #define LOG_TO_FILE 0
+
230 
+
231 // Log Name
+
232 //
+
233 // The name of the file on disk that will receive the log info
+
234 #define VORTEX_LOG_NAME "vortexlog"
+
235 
+
236 // HSV to RGB Conversion Algorithm
+
237 //
+
238 // Here you can choose the HSV to RGB conversion algorithm, this will
+
239 // control the overall appearance of all colours produced with HSV.
+
240 // The available options are:
+
241 //
+
242 // 1 FastLED 'hsv to rgb rainbow'
+
243 // 2 FastLED 'hsv to rgb raw C'
+
244 // 3 generic hsv to rgb 'pastel'
+
245 //
+
246 // Option 1 is the default and legacy choice, also looks best because
+
247 // it puts even weight into every color of the rainbow which involves
+
248 // stretching some segments like yellow to take up more hue space.
+
249 //
+
250 // Note you can still call the other routines from your pattern code,
+
251 // for example blend and complementary blend use hsv to rgb 'pastel'
+
252 // because it looks better than hsv to rgb rainbow
+
253 #define HSV_TO_RGB_ALGORITHM 3
+
254 
+
255 // IR Receiver Time-out Duration (ms)
+
256 //
+
257 // This is the amount of time in ms for the IR receiver to wait
+
258 // before reseting itself in the case that communication gets
+
259 // interrupted.
+
260 #define IR_RECEIVER_TIMEOUT_DURATION 2000
+
261 
+
262 // IR Sender Wait Duration (ms)
+
263 //
+
264 // This is the amount of time in ms for the IR sender to wait
+
265 // between IR sends. This duration allows the user to give input
+
266 // as it is not possible to give input during a send.
+
267 #define IR_SENDER_WAIT_DURATION 2000
+
268 
+
269 // Enter Advanced Menus Click Duration (ms)
+
270 //
+
271 // How long the user must long click on the menu item to enter the
+
272 // 'advanced' version of the menu
+
273 #define ADVANCED_MENU_ENTER_DURATION 1500
+
274 
+
275 // Brightness Options
+
276 //
+
277 // These are the four options available in the global brightness menu
+
278 // There is only four options, be careful not to go too low
+
279 #define BRIGHTNESS_OPTION_1 40
+
280 #define BRIGHTNESS_OPTION_2 120
+
281 #define BRIGHTNESS_OPTION_3 185
+
282 #define BRIGHTNESS_OPTION_4 255
+
283 
+
284 // Saturation Options
+
285 //
+
286 // These are the four saturations available in the color selection menu
+
287 // Any color can be picked with any of these 4 saturations
+
288 #define SAT_OPTION_1 0
+
289 #define SAT_OPTION_2 85
+
290 #define SAT_OPTION_3 170
+
291 #define SAT_OPTION_4 255
+
292 
+
293 // Value/Luminance Options
+
294 //
+
295 // These are the four values/luminance options in the color selection menu
+
296 // Any color can be picked with any of these 4 values
+
297 #define VAL_OPTION_1 0
+
298 #define VAL_OPTION_2 85
+
299 #define VAL_OPTION_3 170
+
300 #define VAL_OPTION_4 255
+
301 
+
302 // ===================================================================
+
303 // Boolean Configurations (0 or 1)
+
304 
+
305 // Fill From Thumb
+
306 //
+
307 // The ring menu will fill from the thumb if this is present, otherwise
+
308 // it will fill from the pinkie.
+
309 //
+
310 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
+
311 #define FILL_FROM_THUMB 1
+
312 
+
313 // Demo All Patterns
+
314 //
+
315 // The default modes that are set on the gloveset will be dynamically
+
316 // generated with one mode per pattern in the patterns list
+
317 //
+
318 // This can be used to quickly demo all possible patterns, mostly useful
+
319 // for testing and development
+
320 #define DEMO_ALL_PATTERNS 0
+
321 
+
322 // Debug Allocations
+
323 //
+
324 // Tracks all memory allocations and logs them, useful for finding leaks
+
325 //
+
326 // Note tracking allocations while using the test framework will be inaccurate
+
327 // because the test framework allocations will be caught as well.
+
328 //
+
329 // When the test framework does things like display a color for the first time
+
330 // it will allocate space permanently for the new brush and never free it
+
331 #define DEBUG_ALLOCATIONS 0
+
332 
+
333 // Variable Tickrate
+
334 //
+
335 // This controls whether the setTickrate function is available and
+
336 // whether changing the tickrate is allowed. This goes hand-in-hand
+
337 // with the Default Tickrate configuration above
+
338 //
+
339 // The tickrate should always be fixed in final builds because this
+
340 // functionality induces extra performance costs and the intended
+
341 // tickrate for the final build should already be known.
+
342 //
+
343 // However there may be some clever uses for variable tickrate in
+
344 // the final build? I'm not sure.
+
345 #define VARIABLE_TICKRATE 0
+
346 
+
347 // Error Blinker System
+
348 //
+
349 // This toggles the vortex error blinker system, this system reports
+
350 // fatal errors as a series of blinks. If an error is encountered the
+
351 // chip will only blink out the error code from there forward.
+
352 //
+
353 // Note that enabling this system takes a non-negligible amount
+
354 // of space for all of the code, it really should only be used
+
355 // for debug settings or given tiers like logging level.
+
356 //
+
357 // This is mainly useful for tracking down issues on devices that don't
+
358 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
+
359 // set the error code and then the device will blink out the error
+
360 //
+
361 // for ex: red red green blue blue blue is code 213
+
362 //
+
363 // See Log/ErrorBlinker.h for details on the error codes
+
364 #define VORTEX_ERROR_BLINK 0
+
365 
+
366 // Fixed LED Count
+
367 //
+
368 // Do not allow the Mode loader to dynamically load however many modes
+
369 // are saved in the savefile. This should be enabled for embedded or vortex
+
370 // device builds because they cannot change their number of LEDs. However
+
371 // other tools like the editor or vortex emulator may be able to make use
+
372 // of this to dynamically adjust the number of leds that a mode can handle
+
373 //
+
374 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
+
375 // a mode will stretch it's list of patterns to match the number of leds
+
376 #define FIXED_LED_COUNT 1
+
377 
+
378 // Enable Editor Connection
+
379 //
+
380 // Turn on the editor connection, some devices are capable of connecting to
+
381 // the pc-based editor, this controls whether the engine exposes the purple
+
382 // editor connection menu or not
+
383 #define ENABLE_EDITOR_CONNECTION 1
+
384 
+
385 // Compression Test
+
386 //
+
387 // Run the built-in compression test that will find any faults
+
388 // in the compressor or decompressor. This is useful if you install
+
389 // a new compressor or want to test any changes to the compressor
+
390 #define COMPRESSION_TEST 0
+
391 
+
392 // Serialization Test
+
393 //
+
394 // Run the serializer/unserializer test which will find any objects
+
395 // which don't serialize and unserialize cleanly
+
396 #define SERIALIZATION_TEST 0
+
397 
+
398 // Modes Test
+
399 //
+
400 // Run unit tests on the Modes class which manages the list of Modes.
+
401 // If any patterns fail to instantiate or perform basic operations
+
402 // it should show up in the modes test. Also if the Modes api has been
+
403 // updated then this will test for any issues
+
404 #define MODES_TEST 0
+
405 
+
406 // Timer Test
+
407 //
+
408 // Tests the timers, time control, and timestep system to ensure they
+
409 // are all working as expected and behaving properly
+
410 #define TIMER_TEST 0
+
411 
412 
-
413 
-
414 // ===================================================================
-
415 // Menu Colors
-
416 //
-
417 // These are the colors for the respective menus, each color should
-
418 // be unique and distinct from the others. It should also be bright
-
419 // enough to be seen on the lowest brightness setting of the device
-
420 //
-
421 // See the below header for all of the available color constants
-
422 #include "Colors/ColorConstants.h"
-
423 
-
424 // Randomizer Menu Color
-
425 #define RGB_MENU_RANDOMIZER RGB_WHITE1
-
426 
-
427 // Mode Sharing Menu Color
-
428 #define RGB_MENU_MODE_SHARING RGB_CYAN1
-
429 
-
430 // Editor Connection Menu Color
-
431 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
-
432 
-
433 // Color Select Menu Color
-
434 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
-
435 
-
436 // Pattern Select Menu Color
-
437 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
-
438 
-
439 // Global Brightness Menu Color
-
440 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
-
441 
-
442 // Factory Reset Menu Color
-
443 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
413 // ===================================================================
+
414 // Menu Colors
+
415 //
+
416 // These are the colors for the respective menus, each color should
+
417 // be unique and distinct from the others. It should also be bright
+
418 // enough to be seen on the lowest brightness setting of the device
+
419 //
+
420 // See the below header for all of the available color constants
+
421 #include "Colors/ColorConstants.h"
+
422 
+
423 // Randomizer Menu Color
+
424 #define RGB_MENU_RANDOMIZER RGB_WHITE1
+
425 
+
426 // Mode Sharing Menu Color
+
427 #define RGB_MENU_MODE_SHARING RGB_CYAN1
+
428 
+
429 // Editor Connection Menu Color
+
430 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
+
431 
+
432 // Color Select Menu Color
+
433 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
+
434 
+
435 // Pattern Select Menu Color
+
436 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
+
437 
+
438 // Global Brightness Menu Color
+
439 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
+
440 
+
441 // Factory Reset Menu Color
+
442 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
443 
444 
-
445 
-
446 // ===================================================================
-
447 // Editor Verbs
-
448 //
-
449 // These are the commands used in the protocol with the editor.
-
450 // They are defined here so the editor can access them easily,
-
451 // also so you can configure them at your own free will.
-
452 
-
453 // the initial hello from the gloveset to the editor
-
454 // is the full name of this build of vortex
-
455 #define EDITOR_VERB_GREETING_PREFIX "== "
-
456 #define EDITOR_VERB_GREETING_POSTFIX " =="
-
457 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
-
458 
-
459 // the hello from the editor to the gloves
-
460 #define EDITOR_VERB_HELLO "a"
-
461 
-
462 // the response from the gloveset when it's ready to receive something
-
463 // after the editor has given it a command to do something the gloveset
-
464 // will respond with this then once it's done doing the action it will
-
465 // send a different finished response for each action
-
466 #define EDITOR_VERB_READY "b"
-
467 
-
468 // the command from the editor to send modes over
-
469 #define EDITOR_VERB_PULL_MODES "c"
-
470 // the response from the editor once modes are received
-
471 #define EDITOR_VERB_PULL_MODES_DONE "d"
-
472 // the response from the gloves once it acknowledges the editor got the modes
-
473 #define EDITOR_VERB_PULL_MODES_ACK "e"
-
474 
-
475 // the command from the editor to send modes over
-
476 #define EDITOR_VERB_PUSH_MODES "f"
-
477 // the response from the gloveset when it received the mode
-
478 #define EDITOR_VERB_PUSH_MODES_ACK "g"
-
479 
-
480 // the command from the editor to tell the gloveset to demo a mode
-
481 #define EDITOR_VERB_DEMO_MODE "h"
-
482 // the response from the gloveset when it's received the mode to demo
-
483 #define EDITOR_VERB_DEMO_MODE_ACK "i"
-
484 
-
485 // the command from the editor to tell the gloveset to clear the demo
-
486 #define EDITOR_VERB_CLEAR_DEMO "j"
-
487 // the response from the gloveset when it's received disabled the demo
-
488 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
-
489 
-
490 // when the gloveset is leaving the menu and needs to tell the editor
-
491 // that it's no longer listening
-
492 #define EDITOR_VERB_GOODBYE "l"
-
493 
-
494 // ===================================================================
-
495 // Manually Configured Sizes
-
496 //
-
497 // These are the various storage space constants of the vortex device
-
498 
-
499 // the space available for storing modes, we can't make this too big
-
500 // otherwise we will have trouble loading it into memory
-
501 #define STORAGE_SIZE 4096
-
502 
-
503 // ===================================================================
-
504 // Test Framework configurations
-
505 //
-
506 // * Unless you are using the test framework, don't touch these! *
+
445 // ===================================================================
+
446 // Editor Verbs
+
447 //
+
448 // These are the commands used in the protocol with the editor.
+
449 // They are defined here so the editor can access them easily,
+
450 // also so you can configure them at your own free will.
+
451 
+
452 // the initial hello from the gloveset to the editor
+
453 // is the full name of this build of vortex
+
454 #define EDITOR_VERB_GREETING_PREFIX "== "
+
455 #define EDITOR_VERB_GREETING_POSTFIX " =="
+
456 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
+
457 
+
458 // the hello from the editor to the gloves
+
459 #define EDITOR_VERB_HELLO "a"
+
460 
+
461 // the response from the gloveset when it's ready to receive something
+
462 // after the editor has given it a command to do something the gloveset
+
463 // will respond with this then once it's done doing the action it will
+
464 // send a different finished response for each action
+
465 #define EDITOR_VERB_READY "b"
+
466 
+
467 // the command from the editor to send modes over
+
468 #define EDITOR_VERB_PULL_MODES "c"
+
469 // the response from the editor once modes are received
+
470 #define EDITOR_VERB_PULL_MODES_DONE "d"
+
471 // the response from the gloves once it acknowledges the editor got the modes
+
472 #define EDITOR_VERB_PULL_MODES_ACK "e"
+
473 
+
474 // the command from the editor to send modes over
+
475 #define EDITOR_VERB_PUSH_MODES "f"
+
476 // the response from the gloveset when it received the mode
+
477 #define EDITOR_VERB_PUSH_MODES_ACK "g"
+
478 
+
479 // the command from the editor to tell the gloveset to demo a mode
+
480 #define EDITOR_VERB_DEMO_MODE "h"
+
481 // the response from the gloveset when it's received the mode to demo
+
482 #define EDITOR_VERB_DEMO_MODE_ACK "i"
+
483 
+
484 // the command from the editor to tell the gloveset to clear the demo
+
485 #define EDITOR_VERB_CLEAR_DEMO "j"
+
486 // the response from the gloveset when it's received disabled the demo
+
487 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
+
488 
+
489 // when the gloveset is leaving the menu and needs to tell the editor
+
490 // that it's no longer listening
+
491 #define EDITOR_VERB_GOODBYE "l"
+
492 
+
493 // ===================================================================
+
494 // Manually Configured Sizes
+
495 //
+
496 // These are the various storage space constants of the vortex device
+
497 
+
498 // maximum size of a mode here
+
499 #define MAX_MODE_SIZE 512
+
500 
+
501 // the number of storage slots for modes, add 1 for the header
+
502 #define NUM_MODE_SLOTS (MAX_MODES + 1)
+
503 
+
504 // the space available for storing modes, we can't make this too big
+
505 // otherwise we will have trouble loading it into memory
+
506 #define STORAGE_SIZE (MAX_MODE_SIZE * NUM_MODE_SLOTS)
507 
-
508 // These defines come from the project settings for preprocessor, an
-
509 // entry for $(SolutionName) produces preprocessor definitions that
-
510 // match the solution that is compiling the engine
-
511 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
-
512 #define VORTEX_EMBEDDED 1
-
513 #endif
-
514 
-
515 // if building for editor or test framework then we're building vortex lib, it should
-
516 // be defined in the project settings but sometimes it's not for example if a cpp file
-
517 // from the test framework includes a header from the engine it might not have VORTEX_LIB
-
518 // this will ensure that anything which includes this config file will have VORTEX_LIB
-
519 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
-
520 #undef VORTEX_LIB
-
521 #define VORTEX_LIB
-
522 #endif
-
523 
-
524 #ifdef VORTEX_LIB
-
525 #undef VORTEX_SLIM
-
526 #define VORTEX_SLIM 0
-
527 
-
528 // The test framework needs brighter menu colors can't really see them on the screen
-
529 #undef RGB_MENU_RANDOMIZER
-
530 #undef RGB_MENU_MODE_SHARING
-
531 #undef RGB_MENU_EDITOR_CONNECTION
-
532 #undef RGB_MENU_COLOR_SELECT
-
533 #undef RGB_MENU_PATTERN_SELECT
-
534 #undef RGB_MENU_BRIGHTNESS_SELECT
-
535 #undef RGB_MENU_FACTORY_RESET
-
536 #define RGB_MENU_RANDOMIZER RGB_WHITE4
-
537 #define RGB_MENU_MODE_SHARING RGB_CYAN4
-
538 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
-
539 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
-
540 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
-
541 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
-
542 #define RGB_MENU_FACTORY_RESET RGB_RED4
-
543 
-
544 #endif // ifdef VORTEX_LIB
-
545 
-
546 // This will be defined if the project is being built inside the test framework
-
547 #ifdef PROJECT_NAME_VortexTestingFramework
+
508 // ===================================================================
+
509 // Test Framework configurations
+
510 //
+
511 // * Unless you are using the test framework, don't touch these! *
+
512 
+
513 // These defines come from the project settings for preprocessor, an
+
514 // entry for $(SolutionName) produces preprocessor definitions that
+
515 // match the solution that is compiling the engine
+
516 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
+
517 #define VORTEX_EMBEDDED 1
+
518 #endif
+
519 
+
520 // if building for editor or test framework then we're building vortex lib, it should
+
521 // be defined in the project settings but sometimes it's not for example if a cpp file
+
522 // from the test framework includes a header from the engine it might not have VORTEX_LIB
+
523 // this will ensure that anything which includes this config file will have VORTEX_LIB
+
524 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
+
525 #undef VORTEX_LIB
+
526 #define VORTEX_LIB
+
527 #endif
+
528 
+
529 #ifdef VORTEX_LIB
+
530 #undef VORTEX_SLIM
+
531 #define VORTEX_SLIM 0
+
532 
+
533 // The test framework needs brighter menu colors can't really see them on the screen
+
534 #undef RGB_MENU_RANDOMIZER
+
535 #undef RGB_MENU_MODE_SHARING
+
536 #undef RGB_MENU_EDITOR_CONNECTION
+
537 #undef RGB_MENU_COLOR_SELECT
+
538 #undef RGB_MENU_PATTERN_SELECT
+
539 #undef RGB_MENU_BRIGHTNESS_SELECT
+
540 #undef RGB_MENU_FACTORY_RESET
+
541 #define RGB_MENU_RANDOMIZER RGB_WHITE4
+
542 #define RGB_MENU_MODE_SHARING RGB_CYAN4
+
543 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
+
544 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
+
545 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
+
546 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
+
547 #define RGB_MENU_FACTORY_RESET RGB_RED4
548 
-
549 // In the test framework variable tickrate must be enabled to allow
-
550 // the tickrate slider to function, also the test framework never runs
-
551 // at full tickrate, maximum is 500 tps
-
552 #undef VARIABLE_TICKRATE
-
553 #define VARIABLE_TICKRATE 1
-
554 
-
555 #undef DEFAULT_BRIGHTNESS
-
556 #define DEFAULT_BRIGHTNESS 255
-
557 
-
558 // test framework needs more time to click idk
-
559 #undef CONSECUTIVE_WINDOW
-
560 #define CONSECUTIVE_WINDOW 300
-
561 
-
562 // force logging to 3 on linux build
-
563 #ifndef _WIN32
-
564 #undef LOGGING_LEVEL
-
565 #define LOGGING_LEVEL 3
-
566 #endif
-
567 
-
568 #endif // VortexTestingFramework
-
569 
-
570 // This will be defined if the project is being built inside the editor
-
571 #ifdef PROJECT_NAME_VortexEditor
+
549 #endif // ifdef VORTEX_LIB
+
550 
+
551 // This will be defined if the project is being built inside the test framework
+
552 #ifdef PROJECT_NAME_VortexTestingFramework
+
553 
+
554 // In the test framework variable tickrate must be enabled to allow
+
555 // the tickrate slider to function, also the test framework never runs
+
556 // at full tickrate, maximum is 500 tps
+
557 #undef VARIABLE_TICKRATE
+
558 #define VARIABLE_TICKRATE 1
+
559 
+
560 #undef DEFAULT_BRIGHTNESS
+
561 #define DEFAULT_BRIGHTNESS 255
+
562 
+
563 // test framework needs more time to click idk
+
564 #undef CONSECUTIVE_WINDOW
+
565 #define CONSECUTIVE_WINDOW 300
+
566 
+
567 // force logging to 3 on linux build
+
568 #ifndef _WIN32
+
569 #undef LOGGING_LEVEL
+
570 #define LOGGING_LEVEL 3
+
571 #endif
572 
-
573 // The editor needs an unfixed led count in order to load any mode
-
574 #undef FIXED_LED_COUNT
-
575 #define FIXED_LED_COUNT 0
-
576 
-
577 #endif // VortexEditor
-
578 
-
579 // When running in the test framework with demo all patterns enabled
-
580 // we should change the max patterns to the total pattern count because
-
581 // the test framework can handle the memory usage and we can't demo
-
582 // all the patterns without the increased limit
-
583 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
-
584  #undef MAX_MODES
-
585  #include "Patterns/Patterns.h"
-
586  #define MAX_MODES 0
-
587  #undef LOGGING_LEVEL
-
588  #define LOGGING_LEVEL 3
-
589 #endif
-
590 
-
591 #endif // VORTEX_CONFIG_H
+
573 #endif // VortexTestingFramework
+
574 
+
575 // This will be defined if the project is being built inside the editor
+
576 #ifdef PROJECT_NAME_VortexEditor
+
577 
+
578 // The editor needs an unfixed led count in order to load any mode
+
579 #undef FIXED_LED_COUNT
+
580 #define FIXED_LED_COUNT 0
+
581 
+
582 #endif // VortexEditor
+
583 
+
584 // When running in the test framework with demo all patterns enabled
+
585 // we should change the max patterns to the total pattern count because
+
586 // the test framework can handle the memory usage and we can't demo
+
587 // all the patterns without the increased limit
+
588 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
+
589  #undef MAX_MODES
+
590  #include "Patterns/Patterns.h"
+
591  #define MAX_MODES 0
+
592  #undef LOGGING_LEVEL
+
593  #define LOGGING_LEVEL 3
+
594 #endif
+
595 
+
596 #endif // VORTEX_CONFIG_H
diff --git a/docs/core/VortexEngine_8cpp_source.html b/docs/core/VortexEngine_8cpp_source.html index 4dbe357730..c832b5a9a8 100644 --- a/docs/core/VortexEngine_8cpp_source.html +++ b/docs/core/VortexEngine_8cpp_source.html @@ -180,7 +180,7 @@
92 {
93  // cleanup in reverse order
-
94  // NOTE: the arduino doesn't actually cleanup,
+
94  // NOTE: the embedded doesn't actually cleanup,
95  // but the test frameworks do
96 #ifdef VORTEX_LIB
@@ -536,7 +536,7 @@
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
#define DEVICE_LOCK_CLICKS
Definition: VortexConfig.h:65
#define VORTEX_VERSION_MINOR
Definition: VortexConfig.h:17
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
#define AUTO_CYCLE_MODES_CLICKS
Definition: VortexConfig.h:99
#define VORTEX_VERSION_MAJOR
Definition: VortexConfig.h:10
#define AUTO_RANDOM_DELAY
Definition: VortexConfig.h:90
@@ -583,21 +583,21 @@
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
uint8_t numArgs
Definition: PatternArgs.h:121
static PatternArgs getDefaultArgs(PatternID id)
@@ -605,9 +605,9 @@
Definition: Random.h:6
static void cleanup()
Definition: Serial.cpp:26
static bool init()
Definition: Serial.cpp:19
-
static bool init()
Definition: Storage.cpp:36
-
static void cleanup()
Definition: Storage.cpp:46
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:148
+
static bool init()
Definition: Storage.cpp:38
+
static void cleanup()
Definition: Storage.cpp:48
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:163
static bool init()
Definition: TimeControl.cpp:46
static uint32_t getCurtime()
Definition: TimeControl.h:40
static void tickClock()
Definition: TimeControl.cpp:71
diff --git a/docs/core/classBlendPattern.html b/docs/core/classBlendPattern.html index 22e7bc979b..81cc323ed0 100644 --- a/docs/core/classBlendPattern.html +++ b/docs/core/classBlendPattern.html @@ -468,7 +468,7 @@

46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -478,7 +478,7 @@

56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/core/classByteStream.html b/docs/core/classByteStream.html index 0cfae8bff0..6081daa530 100644 --- a/docs/core/classByteStream.html +++ b/docs/core/classByteStream.html @@ -440,7 +440,7 @@

References isCRCDirty(), m_pData, and ByteStream::RawBuffer::verify().

-

Referenced by Storage::read().

+

Referenced by Storage::read().

@@ -472,7 +472,7 @@

References m_capacity, m_pData, m_position, and vfree.

-

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

+

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

@@ -549,7 +549,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, compress_buffer, compress_size, DEBUG_LOG, DEBUG_LOGF, ByteStream::RawBuffer::flags, is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), recalcCRC(), shrink(), and ByteStream::RawBuffer::size.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

@@ -687,7 +687,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, DEBUG_LOG, DEBUG_LOGF, decompress_buffer, ERROR_LOGF, ByteStream::RawBuffer::flags, init(), is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), sanity(), shrink(), ByteStream::RawBuffer::size, and ByteStream::RawBuffer::verify().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

+

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

@@ -904,7 +904,7 @@

References ByteStream::RawBuffer::buf, clear(), ByteStream::RawBuffer::crc32, ERROR_OUT_OF_MEMORY, ByteStream::RawBuffer::flags, m_capacity, m_pData, ByteStream::RawBuffer::recalcCRC(), size(), ByteStream::RawBuffer::size, and vcalloc.

-

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

+

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

@@ -1406,7 +1406,7 @@

References m_pData.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1492,7 +1492,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), VLReceiver::receiveMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), VLReceiver::receiveMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1532,7 +1532,7 @@

References BUFFER_FLAG_DIRTY, ByteStream::RawBuffer::crc32, ByteStream::RawBuffer::flags, m_pData, ByteStream::RawBuffer::recalcCRC(), and ByteStream::RawBuffer::size.

-

Referenced by compress(), Randomizer::init(), and SerialComs::write().

+

Referenced by compress(), Randomizer::init(), SerialComs::write(), and Storage::write().

@@ -1559,7 +1559,7 @@

References moveUnserializer().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), and EditorConnection::receiveModes().

+

Referenced by Mode::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), and Modes::unserializeSaveHeader().

@@ -1588,7 +1588,7 @@

References m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by decompress(), rawInit(), and Storage::read().

+

Referenced by decompress(), rawInit(), and Storage::read().

@@ -1698,7 +1698,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_DIRTY, extend(), ByteStream::RawBuffer::flags, m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by operator+=(), SerialComs::read(), Modes::saveToBuffer(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), and VortexEngine::serializeVersion().

+

Referenced by operator+=(), SerialComs::read(), Modes::saveStorage(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), Modes::serializeSaveHeader(), and VortexEngine::serializeVersion().

@@ -1769,7 +1769,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), and Modes::unserialize().

+

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), and Modes::unserialize().

@@ -1903,7 +1903,7 @@

References ByteStream::RawBuffer::buf, m_pData, m_position, and ByteStream::RawBuffer::size.

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), and unserialize8().

+

Referenced by Mode::loadFromBuffer(), Modes::loadStorage(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), unserialize8(), and Modes::unserializeSaveHeader().

diff --git a/docs/core/classColorSelect.html b/docs/core/classColorSelect.html index 3d8cbd7863..04784a6b1b 100644 --- a/docs/core/classColorSelect.html +++ b/docs/core/classColorSelect.html @@ -383,9 +383,9 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
bool isEmpty() const
Definition: Mode.cpp:735
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

@@ -429,7 +429,7 @@

LedMap m_targetLeds
Definition: Menu.h:53
const Colorset getColorset(LedPos pos=LED_ANY) const
Definition: Mode.cpp:467
-

References Modes::curMode(), Mode::getColorset(), m_colorset, Menu::m_targetLeds, MAP_LED_ALL, and mapGetFirstLed().

+

References Modes::curMode(), Mode::getColorset(), m_colorset, Menu::m_targetLeds, MAP_LED_ALL, and mapGetFirstLed().

@@ -472,7 +472,7 @@

122  }
123  // reuse these variables lots
124  uint8_t numColors = m_colorset.numColors();
-
125  uint8_t holdDur = g_pButton->holdDuration();
+
125  uint32_t holdDur = g_pButton->holdDuration();
126  switch (m_state) {
127  case STATE_INIT:
128  // nothing
@@ -545,7 +545,7 @@

virtual void init()
Definition: Mode.cpp:120
bool setColorsetMap(LedMap map, const Colorset &set)
Definition: Mode.cpp:616
-

References Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, Menu::m_curSelection, m_newColor, m_state, m_targetHue1, Menu::m_targetLeds, m_targetSlot, MAX_COLOR_SLOTS, Colorset::numColors(), Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorsetMap(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

+

References Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, Menu::m_curSelection, m_newColor, m_state, m_targetHue1, Menu::m_targetLeds, m_targetSlot, MAX_COLOR_SLOTS, Colorset::numColors(), Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorsetMap(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

@@ -1017,10 +1017,10 @@

SAT_OPTION_2,
}
-
#define SAT_OPTION_3
Definition: VortexConfig.h:291
-
#define SAT_OPTION_2
Definition: VortexConfig.h:290
-
#define SAT_OPTION_4
Definition: VortexConfig.h:292
-
#define SAT_OPTION_1
Definition: VortexConfig.h:289
+
#define SAT_OPTION_3
Definition: VortexConfig.h:290
+
#define SAT_OPTION_2
Definition: VortexConfig.h:289
+
#define SAT_OPTION_4
Definition: VortexConfig.h:291
+
#define SAT_OPTION_1
Definition: VortexConfig.h:288

Definition at line 40 of file ColorSelect.h.

@@ -1053,10 +1053,10 @@

VAL_OPTION_2,
}
-
#define VAL_OPTION_1
Definition: VortexConfig.h:298
-
#define VAL_OPTION_2
Definition: VortexConfig.h:299
-
#define VAL_OPTION_4
Definition: VortexConfig.h:301
-
#define VAL_OPTION_3
Definition: VortexConfig.h:300
+
#define VAL_OPTION_1
Definition: VortexConfig.h:297
+
#define VAL_OPTION_2
Definition: VortexConfig.h:298
+
#define VAL_OPTION_4
Definition: VortexConfig.h:300
+
#define VAL_OPTION_3
Definition: VortexConfig.h:299

Definition at line 48 of file ColorSelect.h.

diff --git a/docs/core/classColorset.html b/docs/core/classColorset.html index d8fc949a95..481ada90bc 100644 --- a/docs/core/classColorset.html +++ b/docs/core/classColorset.html @@ -1506,7 +1506,7 @@

References addColorWithValueStyle(), clear(), Random::next8(), numColors(), and VAL_STYLE_COUNT.

-

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

+

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

diff --git a/docs/core/classEditorConnection.html b/docs/core/classEditorConnection.html index 29ec032e8b..c5a58f08a2 100644 --- a/docs/core/classEditorConnection.html +++ b/docs/core/classEditorConnection.html @@ -438,13 +438,13 @@

293  m_state = STATE_CLEAR_DEMO;
294  }
295 }
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:469
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:481
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:468
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:480
bool receiveMessage(const char *message)
-

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

+

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

Referenced by run().

@@ -525,11 +525,11 @@

187  SerialComs::write(EDITOR_VERB_GOODBYE);
188  Menu::leaveMenu(true);
189 }
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:492
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:491
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
static void write(const char *msg,...)
Definition: Serial.cpp:70
-

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

+

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

Referenced by onLongClick().

@@ -819,10 +819,10 @@

248  Modes::saveStorage();
249  return true;
250 }
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
-

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

+

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

Referenced by run().

@@ -955,13 +955,13 @@

167  }
168  return MENU_CONTINUE;
169 }
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:466
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:457
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:465
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:456
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:472
@@ -974,7 +974,7 @@

static bool checkSerial()
Definition: Serial.cpp:36
static bool isConnected()
Definition: Serial.cpp:30
-

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

+

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

@@ -1007,9 +1007,9 @@

218  Modes::saveToBuffer(modesBuffer);
219  SerialComs::write(modesBuffer);
220 }
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
-

References Modes::saveToBuffer(), and SerialComs::write().

+

References Modes::saveToBuffer(), and SerialComs::write().

Referenced by run().

diff --git a/docs/core/classFactoryReset.html b/docs/core/classFactoryReset.html index 580c9ce5d2..f2b106c2ee 100644 --- a/docs/core/classFactoryReset.html +++ b/docs/core/classFactoryReset.html @@ -284,9 +284,9 @@

uint8_t m_curSelection
Definition: Menu.h:55
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, and MAP_LED.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, and MAP_LED.

@@ -331,7 +331,7 @@

78  if (m_advanced) {
79  uint8_t curModeIndex = Modes::curModeIndex();
80  // reset the target mode slot on the target led
-
81  const default_mode_entry &def = default_modes[curModeIndex];
+
81  const default_mode_entry &def = default_modes[curModeIndex];
82  Colorset set(def.numColors, def.cols);
83  Mode *cur = Modes::curMode();
84  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -347,7 +347,7 @@

94  leaveMenu(true);
95 }
Button * g_pButton
Definition: Buttons.cpp:16
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
#define FACTORY_RESET_THRESHOLD_TICKS
Definition: Timings.h:18
#define DEFAULT_BRIGHTNESS
Definition: VortexConfig.h:149
@@ -357,9 +357,9 @@

virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
virtual void init()
Definition: Mode.cpp:120
-
static void resetFlags()
Definition: Modes.cpp:590
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static void resetFlags()
Definition: Modes.cpp:659
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
Definition: DefaultModes.h:9
@@ -367,7 +367,7 @@

PatternID patternID
Definition: DefaultModes.h:10
uint8_t numColors
Definition: DefaultModes.h:11
-

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

+

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

diff --git a/docs/core/classGlobalBrightness.html b/docs/core/classGlobalBrightness.html index 8129d89535..f5bea595a6 100644 --- a/docs/core/classGlobalBrightness.html +++ b/docs/core/classGlobalBrightness.html @@ -479,10 +479,10 @@

BRIGHTNESS_OPTION_3,
}
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279

Definition at line 23 of file GlobalBrightness.h.

diff --git a/docs/core/classLeds.html b/docs/core/classLeds.html index 5699c25bf0..a84252ccab 100644 --- a/docs/core/classLeds.html +++ b/docs/core/classLeds.html @@ -1077,7 +1077,7 @@

References HSV_OFF, and setAll().

-

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ModeSharing::onShortClick(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), Menu::showExit(), FactoryReset::showReset(), ModeSharing::showSendModeIR(), ModeSharing::showSendModeVL(), VLSender::startPWM(), and VLSender::stopPWM().

+

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ModeSharing::onShortClick(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), Menu::showExit(), FactoryReset::showReset(), ModeSharing::showSendModeIR(), ModeSharing::showSendModeVL(), VLSender::startPWM(), and VLSender::stopPWM().

@@ -1463,7 +1463,7 @@

References m_brightness.

-

Referenced by GlobalBrightness::init(), Modes::saveToBuffer(), and VLSender::startPWM().

+

Referenced by GlobalBrightness::init(), Modes::serializeSaveHeader(), and VLSender::startPWM().

@@ -1788,7 +1788,7 @@

References m_brightness.

-

Referenced by Modes::loadFromBuffer(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), and VLSender::startPWM().

+

Referenced by FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), VLSender::startPWM(), and Modes::unserializeSaveHeader().

diff --git a/docs/core/classMenu.html b/docs/core/classMenu.html index 36091a0f98..b787c8ea28 100644 --- a/docs/core/classMenu.html +++ b/docs/core/classMenu.html @@ -333,12 +333,12 @@

@ PATTERN_STROBE
Definition: Patterns.h:25
Mode m_previewMode
Definition: Menu.h:48
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static uint8_t numModes()
Definition: Modes.h:92
-

References Modes::addMode(), Modes::curMode(), Mode::init(), m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, and RGB_OFF.

+

References Modes::addMode(), Modes::curMode(), Mode::init(), m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, and RGB_OFF.

Referenced by ColorSelect::init(), EditorConnection::init(), FactoryReset::init(), GlobalBrightness::init(), ModeSharing::init(), PatternSelect::init(), Randomizer::init(), and Menus::openMenu().

@@ -377,9 +377,9 @@

171  Modes::saveStorage();
172  }
173 }
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
-

References m_shouldClose, and Modes::saveStorage().

+

References m_shouldClose, and Modes::saveStorage().

Referenced by EditorConnection::leaveMenu(), onLongClick(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveModeIR().

@@ -455,7 +455,7 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-

References Modes::curMode(), Mode::isMultiLed(), LED_COUNT, LED_FIRST, LED_LAST, LED_MULTI, m_targetLeds, MAP_LED, MAP_LED_ALL, MAP_PAIR_EVENS, MAP_PAIR_ODDS, and mapGetFirstLed().

+

References Modes::curMode(), Mode::isMultiLed(), LED_COUNT, LED_FIRST, LED_LAST, LED_MULTI, m_targetLeds, MAP_LED, MAP_LED_ALL, MAP_PAIR_EVENS, MAP_PAIR_ODDS, and mapGetFirstLed().

Referenced by run().

diff --git a/docs/core/classMode.html b/docs/core/classMode.html index a7d7077920..9fe9842e47 100644 --- a/docs/core/classMode.html +++ b/docs/core/classMode.html @@ -917,7 +917,7 @@

References getPattern(), Pattern::getPatternID(), and PATTERN_NONE.

-

Referenced by isEmpty(), PatternSelect::onShortClick(), Randomizer::run(), and Modes::setCurMode().

+

Referenced by isEmpty(), PatternSelect::onShortClick(), Randomizer::run(), and Modes::setCurMode().

@@ -1137,7 +1137,7 @@

References Pattern::init(), LED_FIRST, m_multiPat, m_singlePats, and MODE_LEDCOUNT.

-

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and Randomizer::run().

+

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and Randomizer::run().

@@ -1268,7 +1268,7 @@

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, init(), ByteStream::resetUnserializer(), unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), and VLReceiver::receiveMode().

+

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), and VLReceiver::receiveMode().

@@ -1473,7 +1473,7 @@

References ByteStream::compress(), DEBUG_LOGF, serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

-

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

+

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

@@ -1561,7 +1561,7 @@

References getFlags(), getSingleLedMap(), LED_FIRST, m_multiPat, m_singlePats, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, MODE_LEDCOUNT, Pattern::serialize(), and ByteStream::serialize().

-

Referenced by saveToBuffer(), and Modes::serialize().

+

Referenced by Modes::saveStorage(), saveToBuffer(), and Modes::serialize().

@@ -2030,7 +2030,7 @@

References Pattern::bind(), clearPattern(), PatternBuilder::dupe(), Pattern::init(), LED_ALL, LED_COUNT, LED_FIRST, m_multiPat, m_singlePats, MAP_FOREACH_LED, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, PatternBuilder::unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

+

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

diff --git a/docs/core/classModeSharing.html b/docs/core/classModeSharing.html index bc3b5009e8..e36c78c0cc 100644 --- a/docs/core/classModeSharing.html +++ b/docs/core/classModeSharing.html @@ -379,9 +379,9 @@

static bool send()
Definition: IRSender.cpp:79
void beginReceivingIR()
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, IRSender::isSending(), IRSender::loadMode(), m_sharingMode, IRSender::send(), and SHARE_SEND_IR.

+

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, IRSender::isSending(), IRSender::loadMode(), m_sharingMode, IRSender::send(), and SHARE_SEND_IR.

Referenced by onShortClick().

@@ -431,7 +431,7 @@

static bool send()
Definition: VLSender.cpp:76
static bool isSending()
Definition: VLSender.h:25
-

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, VLSender::isSending(), VLSender::loadMode(), m_sharingMode, VLSender::send(), and SHARE_SEND_VL.

+

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, VLSender::isSending(), VLSender::loadMode(), m_sharingMode, VLSender::send(), and SHARE_SEND_VL.

@@ -596,9 +596,9 @@

91 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
Mode m_previewMode
Definition: Menu.h:48
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
-

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

@@ -710,7 +710,7 @@

bool m_advanced
Definition: Menu.h:59
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

+

References IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

Referenced by run().

diff --git a/docs/core/classModes-members.html b/docs/core/classModes-members.html index fbc252a4d7..f89de9e643 100644 --- a/docs/core/classModes-members.html +++ b/docs/core/classModes-members.html @@ -128,17 +128,19 @@ saveStorage()Modesstatic saveToBuffer(ByteStream &saveBuffer)Modesstatic serialize(ByteStream &buffer)Modesstatic - setAdvancedMenus(bool active, bool save=true)Modesinlinestatic - setCurMode(uint8_t index)Modesstatic - setDefaults()Modesstatic - setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic - setKeychainMode(bool active, bool save=true)Modesinlinestatic - setLocked(bool locked, bool save=true)Modesinlinestatic - setOneClickMode(bool enable, bool save=true)Modesinlinestatic - setStartupMode(uint8_t index)Modesstatic - shiftCurMode(int32_t offset=1)Modesstatic - startupMode()Modesstatic - unserialize(ByteStream &buffer)Modesstatic + serializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic + setAdvancedMenus(bool active, bool save=true)Modesinlinestatic + setCurMode(uint8_t index)Modesstatic + setDefaults()Modesstatic + setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic + setKeychainMode(bool active, bool save=true)Modesinlinestatic + setLocked(bool locked, bool save=true)Modesinlinestatic + setOneClickMode(bool enable, bool save=true)Modesinlinestatic + setStartupMode(uint8_t index)Modesstatic + shiftCurMode(int32_t offset=1)Modesstatic + startupMode()Modesstatic + unserialize(ByteStream &buffer)Modesstatic + unserializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic updateCurMode(const Mode *mode)Modesstatic diff --git a/docs/core/classModes.html b/docs/core/classModes.html index 3cbaf18f4b..4f5897bed2 100644 --- a/docs/core/classModes.html +++ b/docs/core/classModes.html @@ -198,6 +198,10 @@ + + + + @@ -274,36 +278,36 @@

-

Definition at line 390 of file Modes.cpp.

-
391 {
-
392 #if MAX_MODES != 0
-
393  // max modes
-
394  if (m_numModes >= MAX_MODES) {
-
395  return false;
-
396  }
-
397 #endif
-
398  if (!m_storedModes) {
-
399  m_storedModes = new ModeLink(mode);
-
400  if (!m_storedModes) {
- -
402  return false;
-
403  }
-
404  } else {
-
405  if (!m_storedModes->append(mode)) {
- -
407  return false;
-
408  }
-
409  }
-
410  m_numModes++;
-
411  return true;
-
412 }
+

Definition at line 459 of file Modes.cpp.

+
460 {
+
461 #if MAX_MODES != 0
+
462  // max modes
+
463  if (m_numModes >= MAX_MODES) {
+
464  return false;
+
465  }
+
466 #endif
+
467  if (!m_storedModes) {
+
468  m_storedModes = new ModeLink(mode);
+
469  if (!m_storedModes) {
+ +
471  return false;
+
472  }
+
473  } else {
+
474  if (!m_storedModes->append(mode)) {
+ +
476  return false;
+
477  }
+
478  }
+
479  m_numModes++;
+
480  return true;
+
481 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
-
#define MAX_MODES
Definition: VortexConfig.h:168
- -
static ModeLink * m_storedModes
Definition: Modes.h:220
-
static uint8_t m_numModes
Definition: Modes.h:214
+
#define MAX_MODES
Definition: VortexConfig.h:167
+ +
static ModeLink * m_storedModes
Definition: Modes.h:223
+
static uint8_t m_numModes
Definition: Modes.h:217
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -347,29 +351,29 @@

-

Definition at line 371 of file Modes.cpp.

-
372 {
-
373  // max modes
-
374 #if MAX_MODES != 0
-
375  if (m_numModes >= MAX_MODES) {
-
376  return false;
-
377  }
-
378 #endif
-
379  if (id >= PATTERN_COUNT) {
-
380  return false;
-
381  }
-
382  Mode tmpMode(id, args, set);
-
383  // must init the mode so that it can be serialized
-
384  tmpMode.init();
-
385  // not a very good way to do this but it ensures the mode is
-
386  // added in the same way
-
387  return addMode(&tmpMode);
-
388 }
+

Definition at line 440 of file Modes.cpp.

+
441 {
+
442  // max modes
+
443 #if MAX_MODES != 0
+
444  if (m_numModes >= MAX_MODES) {
+
445  return false;
+
446  }
+
447 #endif
+
448  if (id >= PATTERN_COUNT) {
+
449  return false;
+
450  }
+
451  Mode tmpMode(id, args, set);
+
452  // must init the mode so that it can be serialized
+
453  tmpMode.init();
+
454  // not a very good way to do this but it ensures the mode is
+
455  // added in the same way
+
456  return addMode(&tmpMode);
+
457 }
@ PATTERN_COUNT
Definition: Patterns.h:101
Definition: Mode.h:38
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

@@ -449,14 +453,14 @@

-

Definition at line 364 of file Modes.cpp.

-
366 {
-
367  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
368  return addMode(id, nullptr, &set);
-
369 }
+

Definition at line 433 of file Modes.cpp.

+
435 {
+
436  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
437  return addMode(id, nullptr, &set);
+
438 }
-

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

+

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

@@ -484,23 +488,23 @@

-

Definition at line 307 of file Modes.cpp.

-
308 {
-
309 #if MAX_MODES != 0
-
310  if (m_numModes >= MAX_MODES) {
-
311  return false;
-
312  }
-
313 #endif
-
314  if (!m_storedModes->append(serializedMode)) {
- -
316  return false;
-
317  }
-
318  // increment mode counter
-
319  m_numModes++;
-
320  return true;
-
321 }
+

Definition at line 376 of file Modes.cpp.

+
377 {
+
378 #if MAX_MODES != 0
+
379  if (m_numModes >= MAX_MODES) {
+
380  return false;
+
381  }
+
382 #endif
+
383  if (!m_storedModes->append(serializedMode)) {
+ +
385  return false;
+
386  }
+
387  // increment mode counter
+
388  m_numModes++;
+
389  return true;
+
390 }
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -528,31 +532,31 @@

-

Definition at line 287 of file Modes.cpp.

-
288 {
-
289 #if MAX_MODES != 0
-
290  if (m_numModes >= MAX_MODES) {
-
291  return false;
-
292  }
-
293 #endif
-
294  // we must unserialize then re-serialize here because the
-
295  // input argument may contain other patterns in the buffer
-
296  // so we cannot just append the input arg to m_storedModes
-
297  Mode tmpMode;
-
298  if (!tmpMode.unserialize(serializedMode)) {
-
299  return false;
-
300  }
-
301  // initialize the mode because a pattern could theoretically serialize
-
302  // differently after it has initialized
-
303  tmpMode.init();
-
304  return addMode(&tmpMode);
-
305 }
+

Definition at line 356 of file Modes.cpp.

+
357 {
+
358 #if MAX_MODES != 0
+
359  if (m_numModes >= MAX_MODES) {
+
360  return false;
+
361  }
+
362 #endif
+
363  // we must unserialize then re-serialize here because the
+
364  // input argument may contain other patterns in the buffer
+
365  // so we cannot just append the input arg to m_storedModes
+
366  Mode tmpMode;
+
367  if (!tmpMode.unserialize(serializedMode)) {
+
368  return false;
+
369  }
+
370  // initialize the mode because a pattern could theoretically serialize
+
371  // differently after it has initialized
+
372  tmpMode.init();
+
373  return addMode(&tmpMode);
+
374 }
virtual void init()
Definition: Mode.cpp:120
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

-

Referenced by unserialize().

+

Referenced by loadStorage(), and unserialize().

@@ -584,9 +588,9 @@

133  return getFlag(MODES_FLAG_ADV_MENUS);
134  }
#define MODES_FLAG_ADV_MENUS
Definition: Modes.h:22
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
-

References getFlag(), and MODES_FLAG_ADV_MENUS.

+

References getFlag(), and MODES_FLAG_ADV_MENUS.

Referenced by Menus::runMenuSelection().

@@ -619,9 +623,9 @@

54 {
55  clearModes();
56 }
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
-

References clearModes().

+

References clearModes().

Referenced by VortexEngine::cleanup().

@@ -650,25 +654,25 @@

-

Definition at line 544 of file Modes.cpp.

-
545 {
-
546  if (!m_numModes || !m_storedModes) {
-
547  return;
-
548  }
-
549  // delete the first node and it will delete the entire chain
-
550  delete m_storedModes;
-
551  m_pCurModeLink = nullptr;
-
552  m_storedModes = nullptr;
-
553  m_numModes = 0;
-
554  // might as well clear the leds
-
555  Leds::clearAll();
-
556 }
+

Definition at line 613 of file Modes.cpp.

+
614 {
+
615  if (!m_numModes || !m_storedModes) {
+
616  return;
+
617  }
+
618  // delete the first node and it will delete the entire chain
+
619  delete m_storedModes;
+
620  m_pCurModeLink = nullptr;
+
621  m_storedModes = nullptr;
+
622  m_numModes = 0;
+
623  // might as well clear the leds
+
624  Leds::clearAll();
+
625 }
static void clearAll()
Definition: Leds.h:30
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
-

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

+

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

-

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

+

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

@@ -695,28 +699,28 @@

-

Definition at line 474 of file Modes.cpp.

-
475 {
-
476  // empty mode list
-
477  if (!m_numModes) {
-
478  return nullptr;
-
479  }
-
480  if (!m_pCurModeLink) {
-
481  if (!initCurMode()) {
-
482  ERROR_LOG("Failed to initialize current mode");
-
483  return nullptr;
-
484  }
-
485  }
-
486  // get current mode, instantiate it if necessary
-
487  return m_pCurModeLink->instantiate();
-
488 }
+

Definition at line 543 of file Modes.cpp.

+
544 {
+
545  // empty mode list
+
546  if (!m_numModes) {
+
547  return nullptr;
+
548  }
+
549  if (!m_pCurModeLink) {
+
550  if (!initCurMode()) {
+
551  ERROR_LOG("Failed to initialize current mode");
+
552  return nullptr;
+
553  }
+
554  }
+
555  // get current mode, instantiate it if necessary
+
556  return m_pCurModeLink->instantiate();
+
557 }
#define ERROR_LOG(msg)
Definition: Log.h:29
- -
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
+ +
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
-

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

+

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

-

Referenced by ModeSharing::beginSendingIR(), ModeSharing::beginSendingVL(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), Menu::nextBulbSelection(), nextModeSkipEmpty(), ColorSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), and updateCurMode().

+

Referenced by ModeSharing::beginSendingIR(), ModeSharing::beginSendingVL(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), Menu::nextBulbSelection(), nextModeSkipEmpty(), ColorSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), and updateCurMode().

@@ -745,9 +749,9 @@

Definition at line 93 of file Modes.h.

93 { return m_curMode; }
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static uint8_t m_curMode
Definition: Modes.h:214
-

References m_curMode.

+

References m_curMode.

Referenced by VortexEngine::enterSleep(), and FactoryReset::onLongClick().

@@ -776,29 +780,29 @@

-

Definition at line 523 of file Modes.cpp.

-
524 {
-
525  if (!m_numModes || !m_pCurModeLink) {
-
526  return;
-
527  }
-
528  // unlink the current mode so it can be deleted and
-
529  // update the current mode link accordingly
-
530  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
531  delete m_pCurModeLink;
-
532  m_pCurModeLink = newCur;
-
533  if (m_curMode) {
-
534  m_curMode--;
-
535  } else {
- -
537  }
-
538  m_numModes--;
-
539  if (!m_numModes) {
-
540  m_storedModes = nullptr;
-
541  }
-
542 }
- +

Definition at line 592 of file Modes.cpp.

+
593 {
+
594  if (!m_numModes || !m_pCurModeLink) {
+
595  return;
+
596  }
+
597  // unlink the current mode so it can be deleted and
+
598  // update the current mode link accordingly
+
599  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
600  delete m_pCurModeLink;
+
601  m_pCurModeLink = newCur;
+
602  if (m_curMode) {
+
603  m_curMode--;
+
604  } else {
+ +
606  }
+
607  m_numModes--;
+
608  if (!m_numModes) {
+
609  m_storedModes = nullptr;
+
610  }
+
611 }
+
-

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

+

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

@@ -826,13 +830,13 @@

-

Definition at line 585 of file Modes.cpp.

-
586 {
-
587  return ((m_globalFlags & flag) != 0);
-
588 }
-
static uint8_t m_globalFlags
Definition: Modes.h:223
+

Definition at line 654 of file Modes.cpp.

+
655 {
+
656  return ((m_globalFlags & flag) != 0);
+
657 }
+
static uint8_t m_globalFlags
Definition: Modes.h:226
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by advancedMenusEnabled(), keychainModeEnabled(), locked(), and oneClickModeEnabled().

@@ -862,23 +866,23 @@

-

Definition at line 659 of file Modes.cpp.

-
660 {
-
661  if (index >= m_numModes) {
-
662  return nullptr;
-
663  }
-
664  ModeLink *ptr = m_storedModes;
-
665  while (index > 0 && ptr) {
-
666  ptr = ptr->next();
-
667  index--;
-
668  }
-
669  return ptr;
-
670 }
- +

Definition at line 728 of file Modes.cpp.

+
729 {
+
730  if (index >= m_numModes) {
+
731  return nullptr;
+
732  }
+
733  ModeLink *ptr = m_storedModes;
+
734  while (index > 0 && ptr) {
+
735  ptr = ptr->next();
+
736  index--;
+
737  }
+
738  return ptr;
+
739 }
+
-

References m_numModes, m_storedModes, and Modes::ModeLink::next().

+

References m_numModes, m_storedModes, and Modes::ModeLink::next().

-

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

+

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

@@ -927,11 +931,11 @@

49 #endif
50  return true;
51 }
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool setDefaults()
Definition: Modes.cpp:252
-
static bool loadStorage()
Definition: Modes.cpp:149
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool setDefaults()
Definition: Modes.cpp:321
+
static bool loadStorage()
Definition: Modes.cpp:168
-

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

+

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

Referenced by VortexEngine::init().

@@ -961,31 +965,31 @@

-

Definition at line 672 of file Modes.cpp.

-
673 {
-
674  if (!m_numModes) {
-
675  return nullptr;
-
676  }
-
677  // cleanup the current mode link
-
678  if (m_pCurModeLink) {
- -
680  }
-
681  // update the current mode link based on the curmode index
- -
683  if (!m_pCurModeLink) {
-
684  return nullptr;
-
685  }
-
686  if (force) {
- -
688  }
-
689  return m_pCurModeLink->instantiate();
-
690 }
- -
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
+

Definition at line 741 of file Modes.cpp.

+
742 {
+
743  if (!m_numModes) {
+
744  return nullptr;
+
745  }
+
746  // cleanup the current mode link
+
747  if (m_pCurModeLink) {
+ +
749  }
+
750  // update the current mode link based on the curmode index
+ +
752  if (!m_pCurModeLink) {
+
753  return nullptr;
+
754  }
+
755  if (force) {
+ +
757  }
+
758  return m_pCurModeLink->instantiate();
+
759 }
+ +
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
-

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

+

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

-

Referenced by curMode(), play(), and updateCurMode().

+

Referenced by curMode(), play(), and updateCurMode().

@@ -1018,7 +1022,7 @@

141  }
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
-

References getFlag(), and MODES_FLAG_KEYCHAIN.

+

References getFlag(), and MODES_FLAG_KEYCHAIN.

@@ -1047,9 +1051,9 @@

Definition at line 96 of file Modes.h.

96 { return m_lastSwitchTime; }
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
-

References m_lastSwitchTime.

+

References m_lastSwitchTime.

Referenced by VortexEngine::runMainLogic().

@@ -1079,59 +1083,38 @@

-

Definition at line 106 of file Modes.cpp.

-
107 {
-
108  if (!modesBuffer.decompress()) {
-
109  // failed to decompress?
-
110  return false;
-
111  }
-
112  // reset the unserializer index before unserializing anything
-
113  modesBuffer.resetUnserializer();
-
114  uint8_t major = 0;
-
115  uint8_t minor = 0;
-
116  // unserialize the vortex version
-
117  modesBuffer.unserialize(&major);
-
118  modesBuffer.unserialize(&minor);
-
119  // check the version for incompatibility
-
120  if (!VortexEngine::checkVersion(major, minor)) {
-
121  // incompatible version
-
122  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
123  return false;
-
124  }
-
125  // NOTE: instead of global brightness the duo uses this to store the
-
126  // startup mode ID. The duo doesn't offer a global brightness option
-
127  // unserialize the global brightness
-
128  modesBuffer.unserialize(&m_globalFlags);
-
129  // unserialize the global brightness
-
130  uint8_t brightness = 0;
-
131  modesBuffer.unserialize(&brightness);
-
132  if (brightness) {
-
133  Leds::setBrightness(brightness);
-
134  }
-
135  // now just unserialize the list of modes
-
136  if (!unserialize(modesBuffer)) {
-
137  return false;
-
138  }
-
139  // startupMode is 1-based offset that encodes both the index to start at and
-
140  // whether the system is enabled, hence why 0 cannot be used as an offset
-
141  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
142  if (oneClickModeEnabled() && startupMode > 0) {
-
143  // set the current mode to the startup mode
- -
145  }
-
146  return true;
-
147 }
-
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
-
static void setBrightness(uint8_t brightness)
Definition: Leds.h:105
+

Definition at line 144 of file Modes.cpp.

+
145 {
+
146  if (!modesBuffer.decompress()) {
+
147  // failed to decompress?
+
148  return false;
+
149  }
+
150  // read out the header first
+
151  if (!unserializeSaveHeader(modesBuffer)) {
+
152  return false;
+
153  }
+
154  // now just unserialize the list of modes
+
155  if (!unserialize(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // startupMode is 1-based offset that encodes both the index to start at and
+
159  // whether the system is enabled, hence why 0 cannot be used as an offset
+
160  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
161  if (oneClickModeEnabled() && startupMode > 0) {
+
162  // set the current mode to the startup mode
+ +
164  }
+
165  return true;
+
166 }
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static uint8_t startupMode()
Definition: Modes.cpp:566
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static bool checkVersion(uint8_t major, uint8_t minor)
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static uint8_t startupMode()
Definition: Modes.cpp:635
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
-

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, m_globalFlags, oneClickModeEnabled(), ByteStream::resetUnserializer(), Leds::setBrightness(), setCurMode(), startupMode(), unserialize(), and ByteStream::unserialize().

+

References ByteStream::decompress(), m_globalFlags, oneClickModeEnabled(), setCurMode(), startupMode(), unserialize(), and unserializeSaveHeader().

-

Referenced by loadStorage(), and EditorConnection::receiveModes().

+

Referenced by EditorConnection::receiveModes().

@@ -1158,27 +1141,50 @@

-

Definition at line 149 of file Modes.cpp.

-
150 {
-
151  // this is good on memory, but it erases what they have stored
-
152  // before we know whether there is something actually saved
-
153  clearModes();
-
154  ByteStream modesBuffer;
-
155  // only read storage if the modebuffer isn't filled
-
156  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
157  DEBUG_LOG("Empty buffer read from storage");
-
158  // this kinda sucks whatever they had loaded is gone
-
159  return false;
-
160  }
-
161  return loadFromBuffer(modesBuffer);
-
162 }
+

Definition at line 168 of file Modes.cpp.

+
169 {
+
170  ByteStream headerBuffer;
+
171  // only read storage if the modebuffer isn't filled
+
172  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
173  DEBUG_LOG("Empty buffer read from storage");
+
174  // this kinda sucks whatever they had loaded is gone
+
175  return false;
+
176  }
+
177  // this erases what is stored before we know whether there is data
+
178  // but it's the easiest way to just re-load new data from storage
+
179  clearModes();
+
180  // read the header and load the data
+
181  if (!unserializeSaveHeader(headerBuffer)) {
+
182  return false;
+
183  }
+
184  // unserialize the number of modes next
+
185  uint8_t numModes = 0;
+
186  headerBuffer.unserialize(&numModes);
+
187  if (!numModes) {
+
188  DEBUG_LOG("Did not find any modes");
+
189  // this kinda sucks whatever they had loaded is gone
+
190  return false;
+
191  }
+
192  // iterate each mode and read it out of it's storage slot then add it
+
193  for (uint8_t i = 0; i < numModes; ++i) {
+
194  ByteStream modeBuffer(MAX_MODE_SIZE);
+
195  // read each mode from a storage slot and load it
+
196  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
197  return false;
+
198  }
+
199  }
+
200  return true;
+
201 }
#define DEBUG_LOG(msg)
Definition: Log.h:40
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
bool unserialize(uint8_t *byte)
Definition: ByteStream.cpp:417
uint32_t size() const
Definition: ByteStream.h:123
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:93
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static uint8_t numModes()
Definition: Modes.h:92
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:104
-

References clearModes(), DEBUG_LOG, loadFromBuffer(), Storage::read(), and ByteStream::size().

+

References addSerializedMode(), clearModes(), DEBUG_LOG, MAX_MODE_SIZE, numModes(), Storage::read(), ByteStream::size(), ByteStream::unserialize(), and unserializeSaveHeader().

Referenced by init().

@@ -1213,7 +1219,7 @@

127  }

#define MODES_FLAG_LOCKED
Definition: Modes.h:18
-

References getFlag(), and MODES_FLAG_LOCKED.

+

References getFlag(), and MODES_FLAG_LOCKED.

Referenced by setLocked(), and VortexEngine::tick().

@@ -1242,16 +1248,16 @@

-

Definition at line 491 of file Modes.cpp.

-
492 {
-
493  if (!m_numModes) {
-
494  return nullptr;
-
495  }
-
496  // iterate the cur mode forward
-
497  return setCurMode(m_curMode + 1);
-
498 }
+

Definition at line 560 of file Modes.cpp.

+
561 {
+
562  if (!m_numModes) {
+
563  return nullptr;
+
564  }
+
565  // iterate the cur mode forward
+
566  return setCurMode(m_curMode + 1);
+
567 }
-

References m_curMode, m_numModes, and setCurMode().

+

References m_curMode, m_numModes, and setCurMode().

@@ -1278,18 +1284,18 @@

-

Definition at line 513 of file Modes.cpp.

-
514 {
-
515  do {
-
516  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
517  break;
-
518  }
-
519  } while (m_curMode != 0);
-
520  return curMode();
-
521 }
-
static Mode * curMode()
Definition: Modes.cpp:474
+

Definition at line 582 of file Modes.cpp.

+
583 {
+
584  do {
+
585  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
586  break;
+
587  }
+
588  } while (m_curMode != 0);
+
589  return curMode();
+
590 }
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References curMode(), m_curMode, and setCurMode().

+

References curMode(), m_curMode, and setCurMode().

Referenced by play(), and VortexEngine::runMainLogic().

@@ -1321,9 +1327,9 @@

Definition at line 92 of file Modes.h.

92 { return m_numModes; }
-

References m_numModes.

+

References m_numModes.

-

Referenced by Menu::init(), previousMode(), and unserialize().

+

Referenced by Menu::init(), loadStorage(), previousMode(), and unserialize().

@@ -1356,9 +1362,9 @@

120  }
#define MODES_FLAG_ONE_CLICK
Definition: Modes.h:20
-

References getFlag(), and MODES_FLAG_ONE_CLICK.

+

References getFlag(), and MODES_FLAG_ONE_CLICK.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -1406,10 +1412,10 @@

76 }
Button * g_pButton
Definition: Buttons.cpp:16
bool onShortClick() const
Definition: Button.h:34
- -
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+ +
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
-

References Leds::clearAll(), DEBUG_LOG, g_pButton, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), and Modes::ModeLink::play().

+

References Leds::clearAll(), DEBUG_LOG, g_pButton, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), and Modes::ModeLink::play().

Referenced by VortexEngine::runMainLogic().

@@ -1438,20 +1444,19 @@

-

Definition at line 501 of file Modes.cpp.

-
502 {
-
503  if (!m_numModes) {
-
504  return nullptr;
-
505  }
-
506  // iterate the cur mode backwards
-
507  if (!m_curMode) {
-
508  return setCurMode(numModes() - 1);
-
509  }
-
510  return setCurMode(m_curMode - 1);
-
511 }
-
static uint8_t numModes()
Definition: Modes.h:92
+

Definition at line 570 of file Modes.cpp.

+
571 {
+
572  if (!m_numModes) {
+
573  return nullptr;
+
574  }
+
575  // iterate the cur mode backwards
+
576  if (!m_curMode) {
+
577  return setCurMode(numModes() - 1);
+
578  }
+
579  return setCurMode(m_curMode - 1);
+
580 }
-

References m_curMode, m_numModes, numModes(), and setCurMode().

+

References m_curMode, m_numModes, numModes(), and setCurMode().

@@ -1478,12 +1483,12 @@

-

Definition at line 590 of file Modes.cpp.

-
591 {
-
592  m_globalFlags = 0;
-
593 }
+

Definition at line 659 of file Modes.cpp.

+
660 {
+
661  m_globalFlags = 0;
+
662 }
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by FactoryReset::onLongClick().

@@ -1512,21 +1517,21 @@

-

Definition at line 692 of file Modes.cpp.

-
693 {
-
694  if (!m_pCurModeLink) {
-
695  // if there's no loaded mode currently then there's nothing
-
696  // to save so there's no error
-
697  return false;
-
698  }
-
699  // force the current mode to save back to serial to catch changes
-
700  return m_pCurModeLink->save();
-
701 }
- +

Definition at line 761 of file Modes.cpp.

+
762 {
+
763  if (!m_pCurModeLink) {
+
764  // if there's no loaded mode currently then there's nothing
+
765  // to save so there's no error
+
766  return false;
+
767  }
+
768  // force the current mode to save back to serial to catch changes
+
769  return m_pCurModeLink->save();
+
770 }
+
-

References m_pCurModeLink, and Modes::ModeLink::save().

+

References m_pCurModeLink, and Modes::ModeLink::save().

-

Referenced by serialize(), and updateCurMode().

+

Referenced by saveStorage(), serialize(), and updateCurMode().

@@ -1553,31 +1558,63 @@

-

Definition at line 166 of file Modes.cpp.

-
167 {
-
168  DEBUG_LOG("Saving modes...");
-
169  // A ByteStream to hold all the serialized data
-
170  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
171  // save data to the buffer
-
172  if (!saveToBuffer(modesBuffer)) {
-
173  return false;
-
174  }
-
175  // write the serial buffer to flash storage, this
-
176  // will compress the buffer and include crc/flags
-
177  if (!Storage::write(modesBuffer)) {
-
178  DEBUG_LOG("Failed to write storage");
-
179  return false;
-
180  }
-
181  DEBUG_LOG("Success saving modes to storage");
-
182  return true;
-
183 }
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:51
+

Definition at line 205 of file Modes.cpp.

+
206 {
+
207  DEBUG_LOG("Saving modes...");
+
208  ByteStream headerBuffer(MAX_MODE_SIZE);
+
209  if (!serializeSaveHeader(headerBuffer)) {
+
210  return false;
+
211  }
+
212  // serialize the number of modes
+
213  if (!headerBuffer.serialize(m_numModes)) {
+
214  return false;
+
215  }
+
216  if (!Storage::write(0, headerBuffer)) {
+
217  return false;
+
218  }
+
219  // make sure the current mode is saved in case it has changed somehow
+
220  saveCurMode();
+
221  // uninstantiate cur mode so we have stack space to serialize
+
222  if (m_pCurModeLink) {
+ +
224  }
+
225  uint16_t i = 0;
+
226  ModeLink *ptr = m_storedModes;
+
227  while (ptr && i < MAX_MODES) {
+
228  ByteStream modeBuffer(MAX_MODE_SIZE);
+
229  // instantiate the mode temporarily
+
230  Mode *mode = ptr->instantiate();
+
231  if (!mode) {
+ +
233  return false;
+
234  }
+
235  // serialize it into the target modes buffer
+
236  mode->serialize(modeBuffer);
+
237  // just uninstansiate the mode after serializing
+
238  ptr->uninstantiate();
+
239  // next mode
+
240  ptr = ptr->next();
+
241  // now write this mode into a storage slot (skip first slot, that's header)
+
242  if (!Storage::write(++i, modeBuffer)) {
+
243  return false;
+
244  }
+
245  }
+
246  // reinstanstiate the current mode
+ +
248  return false;
+
249  }
+
250  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
251  return true;
+
252 }
+
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
+
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:53
-

References DEBUG_LOG, saveToBuffer(), STORAGE_SIZE, and Storage::write().

+

References DEBUG_LOG, DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, MAX_MODE_SIZE, MAX_MODES, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), serializeSaveHeader(), Modes::ModeLink::uninstantiate(), and Storage::write().

-

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

+

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

@@ -1605,39 +1642,27 @@

-

Definition at line 79 of file Modes.cpp.

-
80 {
-
81  // serialize the engine version into the modes buffer
-
82  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
83  return false;
-
84  }
-
85  // NOTE: instead of global brightness the duo uses this to store the
-
86  // startup mode ID. The duo doesn't offer a global brightness option
-
87  if (!modesBuffer.serialize(m_globalFlags)) {
-
88  return false;
-
89  }
-
90  // serialize the global brightness
-
91  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
92  return false;
-
93  }
-
94  // serialize all modes data into the modesBuffer
-
95  if (!serialize(modesBuffer)) {
-
96  return false;
-
97  }
-
98  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
99  if (!modesBuffer.compress()) {
-
100  return false;
-
101  }
-
102  return true;
-
103 }
-
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
-
static uint8_t getBrightness()
Definition: Leds.h:104
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static bool serializeVersion(ByteStream &stream)
+

Definition at line 126 of file Modes.cpp.

+
127 {
+
128  // first write out the header
+
129  if (!serializeSaveHeader(modesBuffer)) {
+
130  return false;
+
131  }
+
132  // serialize all modes data into the modesBuffer
+
133  if (!serialize(modesBuffer)) {
+
134  return false;
+
135  }
+
136  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
137  if (!modesBuffer.compress()) {
+
138  return false;
+
139  }
+
140  return true;
+
141 }
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
-

References ByteStream::compress(), DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, serialize(), ByteStream::serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

+

References ByteStream::compress(), DEBUG_LOGF, serialize(), serializeSaveHeader(), and ByteStream::size().

-

Referenced by saveStorage(), and EditorConnection::sendModes().

+

Referenced by EditorConnection::sendModes().

@@ -1665,46 +1690,96 @@

-

Definition at line 186 of file Modes.cpp.

-
187 {
-
188  // serialize the number of modes
-
189  if (!modesBuffer.serialize(m_numModes)) {
-
190  return false;
-
191  }
-
192  // make sure the current mode is saved in case it has changed somehow
-
193  saveCurMode();
-
194  // uninstantiate cur mode so we have stack space to serialize
-
195  if (m_pCurModeLink) {
- -
197  }
-
198  ModeLink *ptr = m_storedModes;
-
199  while (ptr) {
-
200  // instantiate the mode temporarily
-
201  Mode *mode = ptr->instantiate();
-
202  if (!mode) {
- -
204  return false;
-
205  }
-
206  // serialize it into the target modes buffer
-
207  mode->serialize(modesBuffer);
-
208  // just uninstansiate the mode after serializing
-
209  ptr->uninstantiate();
-
210  // next mode
-
211  ptr = ptr->next();
-
212  }
-
213  // reinstanstiate the current mode
- -
215  return false;
-
216  }
-
217  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
218  return true;
-
219 }
-
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
-
static bool saveCurMode()
Definition: Modes.cpp:692
+

Definition at line 255 of file Modes.cpp.

+
256 {
+
257  // serialize the number of modes
+
258  if (!modesBuffer.serialize(m_numModes)) {
+
259  return false;
+
260  }
+
261  // make sure the current mode is saved in case it has changed somehow
+
262  saveCurMode();
+
263  // uninstantiate cur mode so we have stack space to serialize
+
264  if (m_pCurModeLink) {
+ +
266  }
+
267  ModeLink *ptr = m_storedModes;
+
268  while (ptr) {
+
269  // instantiate the mode temporarily
+
270  Mode *mode = ptr->instantiate();
+
271  if (!mode) {
+ +
273  return false;
+
274  }
+
275  // serialize it into the target modes buffer
+
276  mode->serialize(modesBuffer);
+
277  // just uninstansiate the mode after serializing
+
278  ptr->uninstantiate();
+
279  // next mode
+
280  ptr = ptr->next();
+
281  }
+
282  // reinstanstiate the current mode
+ +
284  return false;
+
285  }
+
286  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
287  return true;
+
288 }
+
+

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+ +

Referenced by saveToBuffer().

+ +
+ + +

◆ serializeSaveHeader()

+ +
+
+

Static Private Member Functions

static bool serializeSaveHeader (ByteStream &saveBuffer)
 
static bool unserializeSaveHeader (ByteStream &saveBuffer)
 
static ModeLinkgetModeLink (uint32_t index)
 
static ModeinitCurMode (bool force=false)
+ + + + +
+ + + + + + + + +
bool Modes::serializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 78 of file Modes.cpp.

+
79 {
+
80  // serialize the engine version into the modes buffer
+
81  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
82  return false;
+
83  }
+
84  // NOTE: instead of global brightness the duo uses this to store the
+
85  // startup mode ID. The duo doesn't offer a global brightness option
+
86  if (!saveBuffer.serialize(m_globalFlags)) {
+
87  return false;
+
88  }
+
89  // serialize the global brightness
+
90  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
91  return false;
+
92  }
+
93  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
94  return true;
+
95 }
+
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
+
static uint8_t getBrightness()
Definition: Leds.h:104
+
static bool serializeVersion(ByteStream &stream)
-

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+

References DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, ByteStream::serialize(), and VortexEngine::serializeVersion().

-

Referenced by saveToBuffer().

+

Referenced by saveStorage(), and saveToBuffer().

@@ -1746,9 +1821,9 @@

129  {
130  return setFlag(MODES_FLAG_ADV_MENUS, active, save);
131  }
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
-

References MODES_FLAG_ADV_MENUS, and setFlag().

+

References MODES_FLAG_ADV_MENUS, and setFlag().

Referenced by Menus::runMenuSelection().

@@ -1778,51 +1853,51 @@

-

Definition at line 434 of file Modes.cpp.

-
435 {
-
436  if (!m_numModes) {
-
437  return nullptr;
-
438  }
-
439  // clear the LEDs when switching modes
-
440  Leds::clearAll();
-
441  // if we have a current mode open, close it
-
442  if (m_pCurModeLink) {
- -
444  }
-
445  int8_t newModeIdx = index % m_numModes;
-
446  // lookup the new mode link
-
447  ModeLink *newCurLink = getModeLink(newModeIdx);
-
448  if (!newCurLink) {
-
449  // what
-
450  return nullptr;
-
451  }
-
452  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
453  Mode *newCur = newCurLink->instantiate();
-
454  if (!newCur) {
- -
456  return nullptr;
-
457  }
-
458  // update to the new mode
-
459  m_curMode = newModeIdx;
-
460  m_pCurModeLink = newCurLink;
-
461  // record the current time as the last switch time
- -
463  // update the global startup mode to be this mode, if we turn off
-
464  // and turn back on into one click mode it will select this one
-
465  Modes::setStartupMode(newModeIdx);
-
466  // log the change
-
467  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
468  m_curMode, m_numModes - 1, newCur->getPatternID());
-
469  // return the new current mode
-
470  return newCur;
-
471 }
+

Definition at line 503 of file Modes.cpp.

+
504 {
+
505  if (!m_numModes) {
+
506  return nullptr;
+
507  }
+
508  // clear the LEDs when switching modes
+
509  Leds::clearAll();
+
510  // if we have a current mode open, close it
+
511  if (m_pCurModeLink) {
+ +
513  }
+
514  int8_t newModeIdx = index % m_numModes;
+
515  // lookup the new mode link
+
516  ModeLink *newCurLink = getModeLink(newModeIdx);
+
517  if (!newCurLink) {
+
518  // what
+
519  return nullptr;
+
520  }
+
521  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
522  Mode *newCur = newCurLink->instantiate();
+
523  if (!newCur) {
+ +
525  return nullptr;
+
526  }
+
527  // update to the new mode
+
528  m_curMode = newModeIdx;
+
529  m_pCurModeLink = newCurLink;
+
530  // record the current time as the last switch time
+ +
532  // update the global startup mode to be this mode, if we turn off
+
533  // and turn back on into one click mode it will select this one
+
534  Modes::setStartupMode(newModeIdx);
+
535  // log the change
+
536  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
537  m_curMode, m_numModes - 1, newCur->getPatternID());
+
538  // return the new current mode
+
539  return newCur;
+
540 }
PatternID getPatternID(LedPos pos=LED_ANY) const
Definition: Mode.cpp:481
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

+

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

-

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

+

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

@@ -1849,42 +1924,42 @@

-

Definition at line 252 of file Modes.cpp.

-
253 {
-
254  clearModes();
-
255 #if DEMO_ALL_PATTERNS == 1
-
256  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
257  PatternID default_start = PATTERN_FIRST;
-
258  PatternID default_end = PATTERN_LAST;
-
259  // add 65 randomized modes
-
260  for (int i = 0; i < 65; ++i) {
-
261  Mode tmpMode;
-
262  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
263  // create a random pattern ID from all patterns
- -
265  Colorset randSet;
-
266  randSet.randomize(8);
-
267  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
268  }
-
269  // add another mode with the given pattern and colorset
-
270  if (!addMode(&tmpMode)) {
-
271  ERROR_LOG("Failed to add mode");
-
272  // return false?
-
273  }
-
274  }
-
275  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
276 #else
-
277  // add each default mode with each of the given colors
-
278  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
279  const default_mode_entry &def = default_modes[i];
-
280  Colorset set(def.numColors, def.cols);
-
281  addMode(def.patternID, nullptr, &set);
-
282  }
-
283 #endif
-
284  return true;
-
285 }
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+

Definition at line 321 of file Modes.cpp.

+
322 {
+
323  clearModes();
+
324 #if DEMO_ALL_PATTERNS == 1
+
325  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
326  PatternID default_start = PATTERN_FIRST;
+
327  PatternID default_end = PATTERN_LAST;
+
328  // add 65 randomized modes
+
329  for (int i = 0; i < 65; ++i) {
+
330  Mode tmpMode;
+
331  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
332  // create a random pattern ID from all patterns
+ +
334  Colorset randSet;
+
335  randSet.randomize(8);
+
336  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
337  }
+
338  // add another mode with the given pattern and colorset
+
339  if (!addMode(&tmpMode)) {
+
340  ERROR_LOG("Failed to add mode");
+
341  // return false?
+
342  }
+
343  }
+
344  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
345 #else
+
346  // add each default mode with each of the given colors
+
347  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
348  const default_mode_entry &def = default_modes[i];
+
349  Colorset set(def.numColors, def.cols);
+
350  addMode(def.patternID, nullptr, &set);
+
351  }
+
352 #endif
+
353  return true;
+
354 }
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:28
@ LED_FIRST
Definition: LedTypes.h:13
@@ -1899,7 +1974,7 @@

PatternID patternID
Definition: DefaultModes.h:10

uint8_t numColors
Definition: DefaultModes.h:11
-

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

+

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

Referenced by init(), and FactoryReset::onLongClick().

@@ -1945,20 +2020,20 @@

-

Definition at line 572 of file Modes.cpp.

-
573 {
-
574  // then actually if it's enabled ensure the upper nibble is set
-
575  if (enable) {
-
576  // set the cur mode index as the upper nibble
-
577  m_globalFlags |= flag;
-
578  } else {
-
579  m_globalFlags &= ~flag;
-
580  }
-
581  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
582  return !save || saveStorage();
-
583 }
+

Definition at line 641 of file Modes.cpp.

+
642 {
+
643  // then actually if it's enabled ensure the upper nibble is set
+
644  if (enable) {
+
645  // set the cur mode index as the upper nibble
+
646  m_globalFlags |= flag;
+
647  } else {
+
648  m_globalFlags &= ~flag;
+
649  }
+
650  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
651  return !save || saveStorage();
+
652 }
-

References DEBUG_LOGF, m_globalFlags, and saveStorage().

+

References DEBUG_LOGF, m_globalFlags, and saveStorage().

Referenced by setAdvancedMenus(), setKeychainMode(), setLocked(), and setOneClickMode().

@@ -2003,7 +2078,7 @@

137  return setFlag(MODES_FLAG_KEYCHAIN, active, save);

138  }
-

References MODES_FLAG_KEYCHAIN, and setFlag().

+

References MODES_FLAG_KEYCHAIN, and setFlag().

@@ -2047,7 +2122,7 @@

124  }
static bool locked()
Definition: Modes.h:125
-

References locked(), MODES_FLAG_LOCKED, and setFlag().

+

References locked(), MODES_FLAG_LOCKED, and setFlag().

Referenced by VortexEngine::tick().

@@ -2092,7 +2167,7 @@

116  return setFlag(MODES_FLAG_ONE_CLICK, enable, save);
117  }
-

References MODES_FLAG_ONE_CLICK, and setFlag().

+

References MODES_FLAG_ONE_CLICK, and setFlag().

@@ -2120,17 +2195,17 @@

-

Definition at line 558 of file Modes.cpp.

-
559 {
-
560  // zero out the upper nibble to disable
-
561  m_globalFlags &= 0x0F;
-
562  // or in the index value shifted into the upper nibble
-
563  m_globalFlags |= (index << 4) & 0xF0;
-
564 }
+

Definition at line 627 of file Modes.cpp.

+
628 {
+
629  // zero out the upper nibble to disable
+
630  m_globalFlags &= 0x0F;
+
631  // or in the index value shifted into the upper nibble
+
632  m_globalFlags |= (index << 4) & 0xF0;
+
633 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by VortexEngine::enterSleep(), and setCurMode().

+

Referenced by VortexEngine::enterSleep(), and setCurMode().

@@ -2158,47 +2233,47 @@

-

Definition at line 325 of file Modes.cpp.

-
326 {
-
327  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
328  if (newPos >= m_numModes) {
-
329  return false;
-
330  }
-
331  if (newPos == m_curMode) {
-
332  return true;
-
333  }
-
334  // get the target mode at the position of the shift
-
335  ModeLink *target = getModeLink(newPos);
-
336  if (!target) {
-
337  // invalid new position?
-
338  return false;
-
339  }
-
340  // special case for moving first in list forward
-
341  if (!m_curMode && offset > 0) {
-
342  // update main list ptr
- -
344  }
-
345  // unlink the current link
- -
347  // update the current position to reflect our new pos
-
348  m_curMode = newPos;
-
349  // then re-link the mode at the new spot
-
350  if (offset < 0) {
-
351  // link the link before our target link
-
352  target->linkBefore(m_pCurModeLink);
-
353  // special case for moving into first in list
-
354  if (!m_curMode) {
- -
356  }
-
357  } else {
-
358  // link the link after our target link
-
359  target->linkAfter(m_pCurModeLink);
-
360  }
-
361  return true;
-
362 }
- +

Definition at line 394 of file Modes.cpp.

+
395 {
+
396  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
397  if (newPos >= m_numModes) {
+
398  return false;
+
399  }
+
400  if (newPos == m_curMode) {
+
401  return true;
+
402  }
+
403  // get the target mode at the position of the shift
+
404  ModeLink *target = getModeLink(newPos);
+
405  if (!target) {
+
406  // invalid new position?
+
407  return false;
+
408  }
+
409  // special case for moving first in list forward
+
410  if (!m_curMode && offset > 0) {
+
411  // update main list ptr
+ +
413  }
+
414  // unlink the current link
+ +
416  // update the current position to reflect our new pos
+
417  m_curMode = newPos;
+
418  // then re-link the mode at the new spot
+
419  if (offset < 0) {
+
420  // link the link before our target link
+
421  target->linkBefore(m_pCurModeLink);
+
422  // special case for moving into first in list
+
423  if (!m_curMode) {
+ +
425  }
+
426  } else {
+
427  // link the link after our target link
+
428  target->linkAfter(m_pCurModeLink);
+
429  }
+
430  return true;
+
431 }
+
-

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

+

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

@@ -2225,15 +2300,15 @@

-

Definition at line 566 of file Modes.cpp.

-
567 {
-
568  // zero out the upper nibble to disable
-
569  return (m_globalFlags & 0xF0) >> 4;
-
570 }
+

Definition at line 635 of file Modes.cpp.

+
636 {
+
637  // zero out the upper nibble to disable
+
638  return (m_globalFlags & 0xF0) >> 4;
+
639 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -2261,40 +2336,100 @@

-

Definition at line 222 of file Modes.cpp.

-
223 {
-
224  DEBUG_LOG("Loading modes...");
-
225  // this is good on memory, but it erases what they have stored before we
-
226  // know whether there is something actually saved in the serial buffer
-
227  clearModes();
-
228  // unserialize the number of modes next
-
229  uint8_t numModes = 0;
-
230  modesBuffer.unserialize(&numModes);
-
231  if (!numModes) {
-
232  DEBUG_LOG("Did not find any modes");
-
233  // this kinda sucks whatever they had loaded is gone
-
234  return false;
-
235  }
-
236  // foreach expected mode
-
237  for (uint8_t i = 0; i < numModes; ++i) {
-
238  // just copy the serialized mode into the internal storage because
-
239  // we store the modes in a serialized manner so that they are smaller
-
240  // then we unpack them when we instantiate the mode
-
241  if (!addSerializedMode(modesBuffer)) {
-
242  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
243  // clear work so far?
-
244  clearModes();
-
245  return false;
-
246  }
-
247  }
-
248  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
249  return (m_numModes == numModes);
-
250 }
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
+

Definition at line 291 of file Modes.cpp.

+
292 {
+
293  DEBUG_LOG("Loading modes...");
+
294  // this is good on memory, but it erases what they have stored before we
+
295  // know whether there is something actually saved in the serial buffer
+
296  clearModes();
+
297  // unserialize the number of modes next
+
298  uint8_t numModes = 0;
+
299  modesBuffer.unserialize(&numModes);
+
300  if (!numModes) {
+
301  DEBUG_LOG("Did not find any modes");
+
302  // this kinda sucks whatever they had loaded is gone
+
303  return false;
+
304  }
+
305  // foreach expected mode
+
306  for (uint8_t i = 0; i < numModes; ++i) {
+
307  // just copy the serialized mode into the internal storage because
+
308  // we store the modes in a serialized manner so that they are smaller
+
309  // then we unpack them when we instantiate the mode
+
310  if (!addSerializedMode(modesBuffer)) {
+
311  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
312  // clear work so far?
+
313  clearModes();
+
314  return false;
+
315  }
+
316  }
+
317  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
318  return (m_numModes == numModes);
+
319 }
+
+

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+ +

Referenced by loadFromBuffer().

+ +
+ + +

◆ unserializeSaveHeader()

+ +
+
+ + + + + +
+ + + + + + + + +
bool Modes::unserializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 97 of file Modes.cpp.

+
98 {
+
99  // reset the unserializer index before unserializing anything
+
100  saveHeader.resetUnserializer();
+
101  uint8_t major = 0;
+
102  uint8_t minor = 0;
+
103  // unserialize the vortex version
+
104  saveHeader.unserialize(&major);
+
105  saveHeader.unserialize(&minor);
+
106  // check the version for incompatibility
+
107  if (!VortexEngine::checkVersion(major, minor)) {
+
108  // incompatible version
+
109  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
+
110  return false;
+
111  }
+
112  // NOTE: instead of global brightness the duo uses this to store the
+
113  // startup mode ID. The duo doesn't offer a global brightness option
+
114  // unserialize the global brightness
+
115  saveHeader.unserialize(&m_globalFlags);
+
116  // unserialize the global brightness
+
117  uint8_t brightness = 0;
+
118  saveHeader.unserialize(&brightness);
+
119  if (brightness) {
+
120  Leds::setBrightness(brightness);
+
121  }
+
122  return true;
+
123 }
+
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
+
static void setBrightness(uint8_t brightness)
Definition: Leds.h:105
+
static bool checkVersion(uint8_t major, uint8_t minor)
-

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+

References VortexEngine::checkVersion(), ERROR_LOGF, m_globalFlags, ByteStream::resetUnserializer(), Leds::setBrightness(), and ByteStream::unserialize().

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer(), and loadStorage().

@@ -2322,26 +2457,26 @@

-

Definition at line 414 of file Modes.cpp.

-
415 {
-
416  if (!mode) {
-
417  return false;
-
418  }
-
419  Mode *pCur = curMode();
-
420  if (!pCur) {
-
421  return false;
-
422  }
-
423  // utilize copy operator
-
424  *pCur = *mode;
-
425  // immediately save this mode to the internal mode storage
-
426  if (!saveCurMode()) {
-
427  return false;
-
428  }
-
429  // initialize the new mode
-
430  return initCurMode();
-
431 }
+

Definition at line 483 of file Modes.cpp.

+
484 {
+
485  if (!mode) {
+
486  return false;
+
487  }
+
488  Mode *pCur = curMode();
+
489  if (!pCur) {
+
490  return false;
+
491  }
+
492  // utilize copy operator
+
493  *pCur = *mode;
+
494  // immediately save this mode to the internal mode storage
+
495  if (!saveCurMode()) {
+
496  return false;
+
497  }
+
498  // initialize the new mode
+
499  return initCurMode();
+
500 }
-

References curMode(), initCurMode(), and saveCurMode().

+

References curMode(), initCurMode(), and saveCurMode().

Referenced by ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveModeIR().

@@ -2368,9 +2503,9 @@

-

Definition at line 211 of file Modes.h.

+

Definition at line 214 of file Modes.h.

-

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

+

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

@@ -2394,9 +2529,9 @@

-

Definition at line 223 of file Modes.h.

+

Definition at line 226 of file Modes.h.

-

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), saveToBuffer(), setFlag(), setStartupMode(), and startupMode().

+

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), serializeSaveHeader(), setFlag(), setStartupMode(), startupMode(), and unserializeSaveHeader().

@@ -2420,9 +2555,9 @@

-

Definition at line 226 of file Modes.h.

+

Definition at line 229 of file Modes.h.

-

Referenced by lastSwitchTime(), and setCurMode().

+

Referenced by lastSwitchTime(), and setCurMode().

@@ -2446,9 +2581,9 @@

-

Definition at line 214 of file Modes.h.

+

Definition at line 217 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

+

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), saveStorage(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

@@ -2472,9 +2607,9 @@

-

Definition at line 217 of file Modes.h.

+

Definition at line 220 of file Modes.h.

-

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), serialize(), setCurMode(), and shiftCurMode().

+

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), saveStorage(), serialize(), setCurMode(), and shiftCurMode().

@@ -2498,9 +2633,9 @@

-

Definition at line 220 of file Modes.h.

+

Definition at line 223 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), serialize(), and shiftCurMode().

+

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), saveStorage(), serialize(), and shiftCurMode().

diff --git a/docs/core/classModes.js b/docs/core/classModes.js index ae97a62325..0622c676b3 100644 --- a/docs/core/classModes.js +++ b/docs/core/classModes.js @@ -33,6 +33,7 @@ var classModes = [ "saveStorage", "classModes.html#a1756081ee85dbcf672ddad5a3dcb4690", null ], [ "saveToBuffer", "classModes.html#a9b64018ed3d72c3667f0eaef5fd6495f", null ], [ "serialize", "classModes.html#afb881f5315e4197bb01625b1268eca9d", null ], + [ "serializeSaveHeader", "classModes.html#a4432825def9ab0a3edb0c480e21c14e1", null ], [ "setAdvancedMenus", "classModes.html#ad4938ad48f465a7a59d9bcdaa2f8eaca", null ], [ "setCurMode", "classModes.html#a65f088d9076706c4976f7282be323e50", null ], [ "setDefaults", "classModes.html#a790f299aa425bdc73af7f584ee30472b", null ], @@ -44,6 +45,7 @@ var classModes = [ "shiftCurMode", "classModes.html#a7cb704d905f26b1d1e9e748c87b547a1", null ], [ "startupMode", "classModes.html#a354ffb53eeff1a351ef81ce55eae472a", null ], [ "unserialize", "classModes.html#ae5c68f28c424a2a08ba659e9373898e3", null ], + [ "unserializeSaveHeader", "classModes.html#a0e4a896bf673ecc51bf52f3efabf8aca", null ], [ "updateCurMode", "classModes.html#a263cf02fb83d954b91c85d2d1e5411ee", null ], [ "m_curMode", "classModes.html#aee36ec773858cf347b90bd1538b0a2b8", null ], [ "m_globalFlags", "classModes.html#a9929c8efa425648fa8a2e85028b1b303", null ], diff --git a/docs/core/classModes_1_1ModeLink.html b/docs/core/classModes_1_1ModeLink.html index dafb437ff5..b0224242bb 100644 --- a/docs/core/classModes_1_1ModeLink.html +++ b/docs/core/classModes_1_1ModeLink.html @@ -154,7 +154,7 @@

Detailed Description

-

Definition at line 156 of file Modes.h.

+

Definition at line 159 of file Modes.h.

Constructor & Destructor Documentation

◆ ModeLink() [1/2]

@@ -182,28 +182,28 @@

-

Definition at line 703 of file Modes.cpp.

-
703  :
-
704  m_pInstantiatedMode(nullptr),
-
705  m_storedMode(),
-
706  m_next(nullptr),
-
707  m_prev(nullptr)
-
708 {
-
709  if (src) {
-
710  init(src);
-
711  }
-
712  if (src && inst) {
-
713  instantiate();
-
714  }
-
715 }
- - - - - - +

Definition at line 772 of file Modes.cpp.

+
772  :
+
773  m_pInstantiatedMode(nullptr),
+
774  m_storedMode(),
+
775  m_next(nullptr),
+
776  m_prev(nullptr)
+
777 {
+
778  if (src) {
+
779  init(src);
+
780  }
+
781  if (src && inst) {
+
782  instantiate();
+
783  }
+
784 }
+ + + + + +
-

References init(), and instantiate().

+

References init(), and instantiate().

@@ -233,20 +233,20 @@

-

Definition at line 717 of file Modes.cpp.

-
717  :
-
718  m_pInstantiatedMode(nullptr),
-
719  m_storedMode(src),
-
720  m_next(nullptr),
-
721  m_prev(nullptr)
-
722 {
-
723  if (src.size() && inst) {
-
724  instantiate();
-
725  }
-
726 }
+

Definition at line 786 of file Modes.cpp.

+
786  :
+
787  m_pInstantiatedMode(nullptr),
+
788  m_storedMode(src),
+
789  m_next(nullptr),
+
790  m_prev(nullptr)
+
791 {
+
792  if (src.size() && inst) {
+
793  instantiate();
+
794  }
+
795 }
uint32_t size() const
Definition: ByteStream.h:123
-

References instantiate(), and ByteStream::size().

+

References instantiate(), and ByteStream::size().

@@ -265,15 +265,15 @@

-

Definition at line 728 of file Modes.cpp.

-
729 {
-
730  if (m_next) {
-
731  delete m_next;
-
732  }
-
733  if (m_pInstantiatedMode) {
-
734  delete m_pInstantiatedMode;
-
735  }
-
736 }
+

Definition at line 797 of file Modes.cpp.

+
798 {
+
799  if (m_next) {
+
800  delete m_next;
+
801  }
+
802  if (m_pInstantiatedMode) {
+
803  delete m_pInstantiatedMode;
+
804  }
+
805 }
@@ -294,27 +294,27 @@

-

Definition at line 769 of file Modes.cpp.

-
770 {
-
771  if (!next.size()) {
-
772  return false;
-
773  }
-
774  // if not end of chain, recurse on next link
-
775  if (m_next) {
-
776  return m_next->append(next);
-
777  }
-
778  m_next = new ModeLink(next);
-
779  if (!m_next) {
- -
781  return false;
-
782  }
-
783  m_next->m_prev = this;
-
784  return true;
-
785 }
+

Definition at line 838 of file Modes.cpp.

+
839 {
+
840  if (!next.size()) {
+
841  return false;
+
842  }
+
843  // if not end of chain, recurse on next link
+
844  if (m_next) {
+
845  return m_next->append(next);
+
846  }
+
847  m_next = new ModeLink(next);
+
848  if (!m_next) {
+ +
850  return false;
+
851  }
+
852  m_next->m_prev = this;
+
853  return true;
+
854 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
- - - + + +

References ERROR_OUT_OF_MEMORY, and ByteStream::size().

@@ -336,27 +336,27 @@

-

Definition at line 751 of file Modes.cpp.

-
752 {
-
753  if (!next) {
-
754  return false;
-
755  }
-
756  // if not end of chain, recurse on next link
-
757  if (m_next) {
-
758  return m_next->append(next);
-
759  }
-
760  m_next = new ModeLink(next);
-
761  if (!m_next) {
- -
763  return false;
-
764  }
-
765  m_next->m_prev = this;
-
766  return true;
-
767 }
+

Definition at line 820 of file Modes.cpp.

+
821 {
+
822  if (!next) {
+
823  return false;
+
824  }
+
825  // if not end of chain, recurse on next link
+
826  if (m_next) {
+
827  return m_next->append(next);
+
828  }
+
829  m_next = new ModeLink(next);
+
830  if (!m_next) {
+ +
832  return false;
+
833  }
+
834  m_next->m_prev = this;
+
835  return true;
+
836 }

References ERROR_OUT_OF_MEMORY.

-

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

+

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

@@ -383,10 +383,10 @@

-

Definition at line 187 of file Modes.h.

-
187 { return m_storedMode; }
+

Definition at line 190 of file Modes.h.

+
190 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -406,25 +406,25 @@

-

Definition at line 738 of file Modes.cpp.

-
739 {
-
740  if (!mode) {
-
741  return false;
-
742  }
- -
744  // serialize the mode so it can be instantiated anytime
-
745  if (!mode->saveToBuffer(m_storedMode)) {
-
746  return false;
-
747  }
-
748  return true;
-
749 }
+

Definition at line 807 of file Modes.cpp.

+
808 {
+
809  if (!mode) {
+
810  return false;
+
811  }
+ +
813  // serialize the mode so it can be instantiated anytime
+
814  if (!mode->saveToBuffer(m_storedMode)) {
+
815  return false;
+
816  }
+
817  return true;
+
818 }
void clear()
Definition: ByteStream.cpp:107
virtual bool saveToBuffer(ByteStream &saveBuffer, uint8_t numLeds=0) const
Definition: Mode.cpp:169
- +

References Mode::saveToBuffer().

-

Referenced by ModeLink().

+

Referenced by ModeLink().

@@ -443,30 +443,30 @@

-

Definition at line 838 of file Modes.cpp.

-
839 {
-
840  if (m_pInstantiatedMode) {
-
841  return m_pInstantiatedMode;
-
842  }
-
843  Mode *newMode = new Mode();
-
844  if (!newMode) {
- -
846  return nullptr;
-
847  }
- -
849  if (!newMode->loadFromBuffer(m_storedMode)) {
-
850  return nullptr;
-
851  }
-
852  m_pInstantiatedMode = newMode;
-
853  return m_pInstantiatedMode;
-
854 }
+

Definition at line 907 of file Modes.cpp.

+
908 {
+
909  if (m_pInstantiatedMode) {
+
910  return m_pInstantiatedMode;
+
911  }
+
912  Mode *newMode = new Mode();
+
913  if (!newMode) {
+ +
915  return nullptr;
+
916  }
+ +
918  if (!newMode->loadFromBuffer(m_storedMode)) {
+
919  return nullptr;
+
920  }
+
921  m_pInstantiatedMode = newMode;
+
922  return m_pInstantiatedMode;
+
923 }
void resetUnserializer()
Definition: ByteStream.cpp:391
Definition: Mode.h:38
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179

References ERROR_OUT_OF_MEMORY, and Mode::loadFromBuffer().

-

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -486,22 +486,22 @@

-

Definition at line 812 of file Modes.cpp.

-
813 {
-
814  if (!link) {
-
815  return;
-
816  }
-
817  if (m_next) {
-
818  m_next->m_prev = link;
-
819  link->m_next = m_next;
-
820  }
-
821  m_next = link;
-
822  link->m_prev = this;
-
823 }
+

Definition at line 881 of file Modes.cpp.

+
882 {
+
883  if (!link) {
+
884  return;
+
885  }
+
886  if (m_next) {
+
887  m_next->m_prev = link;
+
888  link->m_next = m_next;
+
889  }
+
890  m_next = link;
+
891  link->m_prev = this;
+
892 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -521,22 +521,22 @@

-

Definition at line 825 of file Modes.cpp.

-
826 {
-
827  if (!link) {
-
828  return;
-
829  }
-
830  if (m_prev) {
-
831  m_prev->m_next = link;
-
832  link->m_prev = m_prev;
-
833  }
-
834  m_prev = link;
-
835  link->m_next = this;
-
836 }
+

Definition at line 894 of file Modes.cpp.

+
895 {
+
896  if (!link) {
+
897  return;
+
898  }
+
899  if (m_prev) {
+
900  m_prev->m_next = link;
+
901  link->m_prev = m_prev;
+
902  }
+
903  m_prev = link;
+
904  link->m_next = this;
+
905 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -563,10 +563,10 @@

-

Definition at line 188 of file Modes.h.

-
188 { return m_pInstantiatedMode; }
+

Definition at line 191 of file Modes.h.

+
191 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -593,12 +593,12 @@

-

Definition at line 189 of file Modes.h.

-
189 { return m_next; }
+

Definition at line 192 of file Modes.h.

+
192 { return m_next; }
-

References m_next.

+

References m_next.

-

Referenced by Modes::getModeLink(), Modes::serialize(), and Modes::shiftCurMode().

+

Referenced by Modes::getModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::shiftCurMode().

@@ -625,10 +625,10 @@

-

Definition at line 193 of file Modes.h.

-
193 { return m_storedMode; }
+

Definition at line 196 of file Modes.h.

+
196 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -655,10 +655,10 @@

-

Definition at line 192 of file Modes.h.

-
192 { return m_storedMode; }
+

Definition at line 195 of file Modes.h.

+
195 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -685,10 +685,10 @@

-

Definition at line 194 of file Modes.h.

-
194 { return m_pInstantiatedMode; }
+

Definition at line 197 of file Modes.h.

+
197 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -707,13 +707,13 @@

-

Definition at line 787 of file Modes.cpp.

-
788 {
-
789  if (!m_pInstantiatedMode) {
-
790  return;
-
791  }
- -
793 }
+

Definition at line 856 of file Modes.cpp.

+
857 {
+
858  if (!m_pInstantiatedMode) {
+
859  return;
+
860  }
+ +
862 }
virtual void play()
Definition: Mode.cpp:139

Referenced by Modes::play().

@@ -743,10 +743,10 @@

-

Definition at line 190 of file Modes.h.

-
190 { return m_prev; }
+

Definition at line 193 of file Modes.h.

+
193 { return m_prev; }
-

References m_prev.

+

References m_prev.

@@ -765,16 +765,16 @@

-

Definition at line 864 of file Modes.cpp.

-
865 {
-
866  if (!m_pInstantiatedMode) {
-
867  return false;
-
868  }
- - -
871 }
+

Definition at line 933 of file Modes.cpp.

+
934 {
+
935  if (!m_pInstantiatedMode) {
+
936  return false;
+
937  }
+ + +
940 }
-

Referenced by Modes::saveCurMode().

+

Referenced by Modes::saveCurMode().

@@ -793,15 +793,15 @@

-

Definition at line 856 of file Modes.cpp.

-
857 {
-
858  if (m_pInstantiatedMode) {
-
859  delete m_pInstantiatedMode;
-
860  m_pInstantiatedMode = nullptr;
-
861  }
-
862 }
+

Definition at line 925 of file Modes.cpp.

+
926 {
+
927  if (m_pInstantiatedMode) {
+
928  delete m_pInstantiatedMode;
+
929  m_pInstantiatedMode = nullptr;
+
930  }
+
931 }
-

Referenced by Modes::initCurMode(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::initCurMode(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -820,26 +820,26 @@

-

Definition at line 795 of file Modes.cpp.

-
796 {
-
797  // unlink this node from the chain
-
798  if (m_prev) {
-
799  m_prev->m_next = m_next;
-
800  }
-
801  if (m_next) {
-
802  m_next->m_prev = m_prev;
-
803  }
-
804  // grab the new link that will take this place
-
805  ModeLink *newLink = m_prev ? m_prev : m_next;
-
806  // clear the links of this node
-
807  m_prev = nullptr;
-
808  m_next = nullptr;
-
809  return newLink;
-
810 }
+

Definition at line 864 of file Modes.cpp.

+
865 {
+
866  // unlink this node from the chain
+
867  if (m_prev) {
+
868  m_prev->m_next = m_next;
+
869  }
+
870  if (m_next) {
+
871  m_next->m_prev = m_prev;
+
872  }
+
873  // grab the new link that will take this place
+
874  ModeLink *newLink = m_prev ? m_prev : m_next;
+
875  // clear the links of this node
+
876  m_prev = nullptr;
+
877  m_next = nullptr;
+
878  return newLink;
+
879 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

+

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

@@ -864,9 +864,9 @@

-

Definition at line 198 of file Modes.h.

+

Definition at line 201 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

@@ -890,9 +890,9 @@

-

Definition at line 196 of file Modes.h.

+

Definition at line 199 of file Modes.h.

-

Referenced by mode(), and operator Mode *().

+

Referenced by mode(), and operator Mode *().

@@ -916,9 +916,9 @@

-

Definition at line 199 of file Modes.h.

+

Definition at line 202 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

@@ -942,9 +942,9 @@

-

Definition at line 197 of file Modes.h.

+

Definition at line 200 of file Modes.h.

-

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

+

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

diff --git a/docs/core/classPatternBuilder.html b/docs/core/classPatternBuilder.html index 3e779f349e..10b0986ced 100644 --- a/docs/core/classPatternBuilder.html +++ b/docs/core/classPatternBuilder.html @@ -426,12 +426,12 @@

153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/core/classPatternSelect.html b/docs/core/classPatternSelect.html index f420996ea9..b604cf402a 100644 --- a/docs/core/classPatternSelect.html +++ b/docs/core/classPatternSelect.html @@ -170,7 +170,7 @@

Detailed Description

-

Definition at line 10 of file PatternSelect.h.

+

Definition at line 9 of file PatternSelect.h.

Constructor & Destructor Documentation

◆ PatternSelect()

@@ -208,9 +208,9 @@

22 }
@ LED_FIRST
Definition: LedTypes.h:13
Menu(const RGBColor &col, bool advanced)
Definition: Menu.cpp:12
- - -
uint8_t m_argIndex
Definition: PatternSelect.h:31
+ + +
uint8_t m_argIndex
Definition: PatternSelect.h:30
@@ -308,7 +308,7 @@

LedPos mapGetFirstLed(LedMap map)
Definition: LedTypes.h:109
LedMap m_targetLeds
Definition: Menu.h:53
-

References m_srcLed, Menu::m_targetLeds, and mapGetFirstLed().

+

References m_srcLed, Menu::m_targetLeds, and mapGetFirstLed().

@@ -357,10 +357,10 @@

bool m_advanced
Definition: Menu.h:59
RGBColor m_menuColor
Definition: Menu.h:50
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
uint8_t getNumArgs() const
Definition: Pattern.h:87
-

References Pattern::getNumArgs(), Mode::getPattern(), Leds::holdAll(), Menu::leaveMenu(), Menu::m_advanced, m_argIndex, Menu::m_menuColor, Menu::m_previewMode, m_srcLed, and Modes::updateCurMode().

+

References Pattern::getNumArgs(), Mode::getPattern(), Leds::holdAll(), Menu::leaveMenu(), Menu::m_advanced, m_argIndex, Menu::m_menuColor, Menu::m_previewMode, m_srcLed, and Modes::updateCurMode().

@@ -470,7 +470,7 @@

bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
uint8_t & argRef(uint8_t index)
Definition: Pattern.cpp:106
-

References Pattern::argRef(), DEBUG_LOGF, g_pButton, Mode::getPattern(), Mode::getPatternID(), Leds::holdAll(), Mode::init(), isMultiLedPatternID(), LED_MULTI, Menu::m_advanced, m_argIndex, Menu::m_previewMode, m_srcLed, m_started, Menu::m_targetLeds, MAP_FOREACH_LED, MAP_LED, MAP_LED_ALL, Button::onConsecutivePresses(), PATTERN_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_LAST, RGB_RED, RGB_YELLOW1, Mode::setPattern(), and Mode::setPatternMap().

+

References Pattern::argRef(), DEBUG_LOGF, g_pButton, Mode::getPattern(), Mode::getPatternID(), Leds::holdAll(), Mode::init(), isMultiLedPatternID(), LED_MULTI, Menu::m_advanced, m_argIndex, Menu::m_previewMode, m_srcLed, m_started, Menu::m_targetLeds, MAP_FOREACH_LED, MAP_LED, MAP_LED_ALL, Button::onConsecutivePresses(), PATTERN_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_LAST, RGB_RED, RGB_YELLOW1, Mode::setPattern(), and Mode::setPatternMap().

@@ -544,7 +544,7 @@

-

Definition at line 31 of file PatternSelect.h.

+

Definition at line 30 of file PatternSelect.h.

Referenced by onLongClick(), and onShortClick().

@@ -570,7 +570,7 @@

-

Definition at line 28 of file PatternSelect.h.

+

Definition at line 27 of file PatternSelect.h.

Referenced by onLedSelected(), onLongClick(), and onShortClick().

@@ -596,7 +596,7 @@

-

Definition at line 35 of file PatternSelect.h.

+

Definition at line 34 of file PatternSelect.h.

Referenced by onShortClick().

diff --git a/docs/core/classRandomizer.html b/docs/core/classRandomizer.html index 72dd30825b..840e662716 100644 --- a/docs/core/classRandomizer.html +++ b/docs/core/classRandomizer.html @@ -542,14 +542,14 @@

Definition: Mode.h:38
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
bool hasMultiLed() const
Definition: Mode.cpp:682
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
void serialize(ByteStream &buffer) const
Definition: Pattern.cpp:57
void seed(uint32_t newseed)
Definition: Random.cpp:18
Random m_multiRandCtx
Definition: Randomizer.h:30
Random m_singlesRandCtx[LED_COUNT]
Definition: Randomizer.h:29
-

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

+

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

@@ -593,9 +593,9 @@

133 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
Mode m_previewMode
Definition: Menu.h:48
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
-

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

diff --git a/docs/core/classStorage-members.html b/docs/core/classStorage-members.html index b7bfe7785f..d358cf27f2 100644 --- a/docs/core/classStorage-members.html +++ b/docs/core/classStorage-members.html @@ -94,9 +94,9 @@ init()Storagestatic lastSaveSize()Storagestatic m_lastSaveSizeStorageprivatestatic - read(ByteStream &buffer)Storagestatic + read(uint16_t slot, ByteStream &buffer)Storagestatic Storage()Storageprivate - write(ByteStream &buffer)Storagestatic + write(uint16_t slot, ByteStream &buffer)Storagestatic diff --git a/docs/core/classStorage.html b/docs/core/classStorage.html index 67e4957427..94f4acd80c 100644 --- a/docs/core/classStorage.html +++ b/docs/core/classStorage.html @@ -101,10 +101,10 @@   static void cleanup ()   -static bool write (ByteStream &buffer) -  -static bool read (ByteStream &buffer) -  +static bool write (uint16_t slot, ByteStream &buffer) +  +static bool read (uint16_t slot, ByteStream &buffer) +  static uint32_t lastSaveSize ()   @@ -145,9 +145,9 @@

-

Definition at line 32 of file Storage.cpp.

-
33 {
-
34 }
+

Definition at line 34 of file Storage.cpp.

+
35 {
+
36 }
@@ -175,9 +175,9 @@

-

Definition at line 46 of file Storage.cpp.

-
47 {
-
48 }
+

Definition at line 48 of file Storage.cpp.

+
49 {
+
50 }

Referenced by VortexEngine::cleanup().

@@ -206,18 +206,18 @@

-

Definition at line 36 of file Storage.cpp.

-
37 {
-
38 #ifdef VORTEX_LIB
-
39  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
40  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
41  }
-
42 #endif
-
43  return true;
-
44 }
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
+

Definition at line 38 of file Storage.cpp.

+
39 {
+
40 #ifdef VORTEX_LIB
+
41  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
42  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
43  }
+
44 #endif
+
45  return true;
+
46 }
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
-

References DEFAULT_STORAGE_FILENAME.

+

References DEFAULT_STORAGE_FILENAME.

Referenced by VortexEngine::init().

@@ -246,18 +246,18 @@

-

Definition at line 148 of file Storage.cpp.

-
149 {
-
150  return m_lastSaveSize;
-
151 }
+

Definition at line 163 of file Storage.cpp.

+
164 {
+
165  return m_lastSaveSize;
+
166 }
static uint32_t m_lastSaveSize
Definition: Storage.h:40

References m_lastSaveSize.

- -

◆ read()

+ +

◆ read()

@@ -268,9 +268,19 @@

bool Storage::read

+ + + + + + - + + + + +
(uint16_t slot,
ByteStreambuffer)buffer 
)
@@ -280,64 +290,70 @@

-

Definition at line 93 of file Storage.cpp.

-
94 {
-
95 #ifdef VORTEX_LIB
-
96  if (!Vortex::storageEnabled()) {
-
97  // return false here, but true in write because we don't want to return
-
98  // an empty buffer after returning true
-
99  return false;
-
100  }
-
101 #endif
-
102  uint32_t size = STORAGE_SIZE;
-
103  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
104  return false;
-
105  }
-
106  if (!buffer.init(size)) {
-
107  return false;
-
108  }
-
109 #ifdef VORTEX_EMBEDDED
-
110  // implement device storage here
-
111 #elif defined(_WIN32)
-
112  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
113  if (hFile == INVALID_HANDLE_VALUE) {
-
114  // error
+

Definition at line 104 of file Storage.cpp.

+
105 {
+
106 #ifdef VORTEX_LIB
+
107  if (!Vortex::storageEnabled()) {
+
108  // return false here, but true in write because we don't want to return
+
109  // an empty buffer after returning true
+
110  return false;
+
111  }
+
112 #endif
+
113  uint32_t size = MAX_MODE_SIZE;
+
114  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
115  return false;
116  }
-
117  DWORD bytesRead = 0;
-
118  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
119  // error
-
120  return false;
-
121  }
-
122  CloseHandle(hFile);
-
123 #else
-
124  FILE *f = fopen(STORAGE_FILENAME, "r");
-
125  if (!f) {
+
117  if (!buffer.init(size)) {
+
118  return false;
+
119  }
+
120 #ifdef VORTEX_EMBEDDED
+
121  // implement device storage here
+
122 #elif defined(_WIN32)
+
123  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
124  if (hFile == INVALID_HANDLE_VALUE) {
+
125  // error
126  return false;
127  }
-
128  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
129  return false;
-
130  }
-
131  fclose(f);
-
132 #endif
-
133  // ensure the internal buffer is sane after reading it out, this
-
134  // prevents segfaults if the internal size reports larger than capacity
-
135  buffer.sanity();
-
136  // check crc immediately since we read into raw data copying the
-
137  // array could be dangerous
-
138  if (!buffer.checkCRC()) {
-
139  buffer.clear();
-
140  ERROR_LOG("Could not verify buffer");
-
141  return false;
-
142  }
-
143  m_lastSaveSize = size;
-
144  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
145  return true;
-
146 }
+
128  DWORD bytesRead = 0;
+
129  DWORD offset = slot * MAX_MODE_SIZE;
+
130  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
131  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
132  // error
+
133  return false;
+
134  }
+
135  CloseHandle(hFile);
+
136 #else
+
137  FILE *f = fopen(STORAGE_FILENAME, "r");
+
138  if (!f) {
+
139  return false;
+
140  }
+
141  long offset = slot * MAX_MODE_SIZE;
+
142  fseek(f, offset, SEEK_SET);
+
143  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
144  return false;
+
145  }
+
146  fclose(f);
+
147 #endif
+
148  // ensure the internal buffer is sane after reading it out, this
+
149  // prevents segfaults if the internal size reports larger than capacity
+
150  buffer.sanity();
+
151  // check crc immediately since we read into raw data copying the
+
152  // array could be dangerous
+
153  if (!buffer.checkCRC()) {
+
154  buffer.clear();
+
155  ERROR_LOG("Could not verify buffer");
+
156  return false;
+
157  }
+
158  m_lastSaveSize = size;
+
159  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
160  return true;
+
161 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:502
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
void * rawData() const
Definition: ByteStream.h:121
void clear()
Definition: ByteStream.cpp:107
@@ -346,14 +362,14 @@

void sanity()
Definition: ByteStream.cpp:319

-

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::loadStorage().

+

Referenced by Modes::loadStorage().

- -

◆ write()

+ +

◆ write()

@@ -364,9 +380,19 @@

bool Storage::write ( + uint16_t  + slot, + + + + ByteStream &  - buffer) + buffer  + + + ) + @@ -376,51 +402,61 @@

-

Definition at line 51 of file Storage.cpp.

-
52 {
-
53 #ifdef VORTEX_LIB
-
54  if (!Vortex::storageEnabled()) {
-
55  // success so the system thinks it all worked
-
56  return true;
-
57  }
-
58 #endif
-
59  // check size
-
60  if (buffer.rawSize() > STORAGE_SIZE) {
-
61  ERROR_LOG("Buffer too big for storage space");
-
62  return false;
-
63  }
-
64 #ifdef VORTEX_EMBEDDED
-
65  // implement device storage here
-
66 #elif defined(_WIN32)
-
67  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
68  if (hFile == INVALID_HANDLE_VALUE) {
-
69  // error
-
70  return false;
-
71  }
-
72  DWORD written = 0;
-
73  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
74  // error
-
75  return false;
-
76  }
-
77  CloseHandle(hFile);
-
78 #else
-
79  FILE *f = fopen(STORAGE_FILENAME, "w");
-
80  if (!f) {
-
81  return false;
-
82  }
-
83  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
+

Definition at line 53 of file Storage.cpp.

+
54 {
+
55 #ifdef VORTEX_LIB
+
56  if (!Vortex::storageEnabled()) {
+
57  // success so the system thinks it all worked
+
58  return true;
+
59  }
+
60 #endif
+
61  // check size
+
62  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
63  ERROR_LOG("Buffer too big for storage space");
+
64  return false;
+
65  }
+
66  if (slot >= NUM_MODE_SLOTS) {
+
67  return false;
+
68  }
+
69  // just in case
+
70  buffer.recalcCRC();
+
71 #ifdef VORTEX_EMBEDDED
+
72  // implement device storage here
+
73 #elif defined(_WIN32)
+
74  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
75  if (hFile == INVALID_HANDLE_VALUE) {
+
76  // error
+
77  return false;
+
78  }
+
79  DWORD written = 0;
+
80  DWORD offset = slot * MAX_MODE_SIZE;
+
81  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
82  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
83  // error
84  return false;
85  }
-
86  fclose(f);
-
87 #endif // VORTEX_EMBEDDED
-
88  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
89  return true;
-
90 }
+
86  CloseHandle(hFile);
+
87 #else
+
88  FILE *f = fopen(STORAGE_FILENAME, "w");
+
89  if (!f) {
+
90  return false;
+
91  }
+
92  long offset = slot * MAX_MODE_SIZE;
+
93  fseek(f, offset, SEEK_SET);
+
94  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
95  return false;
+
96  }
+
97  fclose(f);
+
98 #endif // VORTEX_EMBEDDED
+
99  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
100  return true;
+
101 }
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
uint32_t rawSize() const
Definition: ByteStream.h:122
-

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, ByteStream::rawData(), ByteStream::rawSize(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::recalcCRC(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::saveStorage().

+

Referenced by Modes::saveStorage().

@@ -447,7 +483,7 @@

Definition at line 40 of file Storage.h.

-

Referenced by lastSaveSize(), read(), and write().

+

Referenced by lastSaveSize(), read(), and write().

diff --git a/docs/core/classStorage.js b/docs/core/classStorage.js index 8d55c03aba..12c499441b 100644 --- a/docs/core/classStorage.js +++ b/docs/core/classStorage.js @@ -4,7 +4,7 @@ var classStorage = [ "cleanup", "classStorage.html#a2a1ce108c9a17f6175bfb9a9aba51703", null ], [ "init", "classStorage.html#a065812a8dbd82d731291b5aa7ce3edf9", null ], [ "lastSaveSize", "classStorage.html#a79176e030af1f92f563c2b19316fe3dd", null ], - [ "read", "classStorage.html#a5f7d41fcbfbc0840addbaa0345e1594d", null ], - [ "write", "classStorage.html#a28703a07e21e576760f1b84202c55a01", null ], + [ "read", "classStorage.html#a463f451de890486dd483575e47defbc7", null ], + [ "write", "classStorage.html#a97a1b036dedd7b94a91899638c2248c1", null ], [ "m_lastSaveSize", "classStorage.html#ae85ca521ae89c408fb045d2890951458", null ] ]; \ No newline at end of file diff --git a/docs/core/classTime.html b/docs/core/classTime.html index 663be9267c..828e887a76 100644 --- a/docs/core/classTime.html +++ b/docs/core/classTime.html @@ -311,7 +311,7 @@

References m_curTick, and SIMULATION_TICK.

-

Referenced by Timer::alarm(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkRange(), SerialComs::checkSerial(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveModeIR(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), ColorSelect::showFullSet(), ColorSelect::showSelection(), Timer::start(), and Button::update().

+

Referenced by Timer::alarm(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkRange(), SerialComs::checkSerial(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveModeIR(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), ColorSelect::showFullSet(), ColorSelect::showSelection(), Timer::start(), and Button::update().

@@ -424,11 +424,11 @@

64  return true;
65 }
uint64_t start
Definition: TimeControl.cpp:15
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static uint32_t m_firstTime
Definition: TimeControl.h:121
static uint32_t m_prevTime
Definition: TimeControl.h:118
-

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

+

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

Referenced by VortexEngine::init().

@@ -525,7 +525,7 @@

149 #endif
150 }
-

References DEFAULT_TICKRATE.

+

References DEFAULT_TICKRATE.

@@ -590,7 +590,7 @@

106  uint32_t sleepTime = 0;
107  if (required > elapsed_us) {
108  // in vortex lib on linux we can just sleep instead of spinning
-
109  // but on arduino we must spin and on windows it actually ends
+
109  // but on embedded we must spin and on windows it actually ends
110  // up being more accurate to poll QPF + QPC via microseconds()
111  sleepTime = required - elapsed_us;
112  }
diff --git a/docs/core/classVortexEngine.html b/docs/core/classVortexEngine.html index 73fae06c26..0c26a4e412 100644 --- a/docs/core/classVortexEngine.html +++ b/docs/core/classVortexEngine.html @@ -206,7 +206,7 @@

References VORTEX_VERSION_MAJOR.

-

Referenced by Mode::loadFromBuffer(), and Modes::loadFromBuffer().

+

Referenced by Mode::loadFromBuffer(), and Modes::unserializeSaveHeader().

@@ -236,7 +236,7 @@

Definition at line 91 of file VortexEngine.cpp.

92 {
93  // cleanup in reverse order
-
94  // NOTE: the arduino doesn't actually cleanup,
+
94  // NOTE: the embedded doesn't actually cleanup,
95  // but the test frameworks do
96 #ifdef VORTEX_LIB
@@ -259,12 +259,12 @@

static void cleanup()
Definition: Menus.cpp:77

static void cleanup()
Definition: Modes.cpp:53
static void cleanup()
Definition: Serial.cpp:26
-
static void cleanup()
Definition: Storage.cpp:46
+
static void cleanup()
Definition: Storage.cpp:48
static void cleanup()
Definition: TimeControl.cpp:67
static void cleanup()
Definition: VLReceiver.cpp:62
static void cleanup()
Definition: VLSender.cpp:38
-

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), VLReceiver::cleanup(), and VLSender::cleanup().

+

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), VLReceiver::cleanup(), and VLSender::cleanup().

Referenced by wakeup().

@@ -302,9 +302,9 @@

207  return nullptr;
208 #endif
209 }
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode().

+

References Modes::curMode().

@@ -350,12 +350,12 @@

#define DEBUG_LOG(msg)
Definition: Log.h:40
static void clearAll()
Definition: Leds.h:30
static void update()
Definition: Leds.cpp:249
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static volatile bool m_sleeping
Definition: VortexEngine.h:52
-

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

+

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

@@ -451,12 +451,12 @@

static bool init()
Definition: Menus.cpp:70
static bool init()
Definition: Modes.cpp:30
static bool init()
Definition: Serial.cpp:19
-
static bool init()
Definition: Storage.cpp:36
+
static bool init()
Definition: Storage.cpp:38
static bool init()
Definition: TimeControl.cpp:46
static bool init()
Definition: VLReceiver.cpp:52
static bool init()
Definition: VLSender.cpp:33
-

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), VLReceiver::init(), and VLSender::init().

+

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), VLReceiver::init(), and VLSender::init().

Referenced by wakeup().

@@ -529,13 +529,13 @@

static void holdAll(RGBColor col)
Definition: Leds.cpp:242
static bool openMenuSelection()
Definition: Menus.cpp:203
static bool run()
Definition: Menus.cpp:88
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
static void play()
Definition: Modes.cpp:58
static uint32_t lastSwitchTime()
Definition: Modes.h:96
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool m_autoCycle
Definition: VortexEngine.h:55
-

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

+

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

Referenced by tick().

@@ -576,7 +576,7 @@

References ByteStream::serialize(), VORTEX_VERSION_MAJOR, and VORTEX_VERSION_MINOR.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Mode::saveToBuffer(), and Modes::serializeSaveHeader().

diff --git a/docs/core/dir_000007_000010.html b/docs/core/dir_000007_000010.html index e91c5e7d10..ed937b8895 100644 --- a/docs/core/dir_000007_000010.html +++ b/docs/core/dir_000007_000010.html @@ -83,7 +83,7 @@ +

Menus → Patterns Relation

File in VortexEngine/src/MenusIncludes file in VortexEngine/src/Patterns
MenuList / ColorSelect.cppPattern.h
MenuList / EditorConnection.cppPatternArgs.h
MenuList / FactoryReset.cppPattern.h
MenuList / PatternSelect.cppPattern.h
MenuList / PatternSelect.cppPatternArgs.h
MenuList / PatternSelect.cppPatternBuilder.h
MenuList / Randomizer.cppPattern.h
MenuList / Randomizer.cppPatternBuilder.h
+

MenuList → Patterns Relation

File in VortexEngine/src/Menus/MenuListIncludes file in VortexEngine/src/Patterns
ColorSelect.cppPattern.h
EditorConnection.cppPatternArgs.h
FactoryReset.cppPattern.h
PatternSelect.cppPattern.h
PatternSelect.cppPatternArgs.h
PatternSelect.cppPatternBuilder.h
Randomizer.cppPattern.h
Randomizer.cppPatternBuilder.h
@@ -138,7 +138,7 @@

Definition at line 11 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -156,7 +156,7 @@

Definition at line 10 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

diff --git a/docs/duo/BlendPattern_8cpp_source.html b/docs/duo/BlendPattern_8cpp_source.html index ab2ab837f8..e75d337a54 100644 --- a/docs/duo/BlendPattern_8cpp_source.html +++ b/docs/duo/BlendPattern_8cpp_source.html @@ -135,7 +135,7 @@
46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -145,7 +145,7 @@
56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/duo/Buttons_8h_source.html b/docs/duo/Buttons_8h_source.html index b3b7ad8f1f..3e0534e943 100644 --- a/docs/duo/Buttons_8h_source.html +++ b/docs/duo/Buttons_8h_source.html @@ -92,7 +92,7 @@
3 
4 #include "Button.h"
5 
-
6 // the number of buttons, this isn't an arduino config because
+
6 // the number of buttons, this isn't in VortexConfig.h because
7 // changing it won't really work without updating other things
8 // like which pins the buttons are attached to. So this is more
9 // of a hardcoded constant than a configuration setting
diff --git a/docs/duo/ColorConstants_8h__dep__incl.md5 b/docs/duo/ColorConstants_8h__dep__incl.md5 index 6c30c7db34..9b804c540c 100644 --- a/docs/duo/ColorConstants_8h__dep__incl.md5 +++ b/docs/duo/ColorConstants_8h__dep__incl.md5 @@ -1 +1 @@ -50186e115fc6c6c8b7bd0f49b4fee885 \ No newline at end of file +d036cdd16df9f1c6f6e0f8b65adcc38c \ No newline at end of file diff --git a/docs/duo/ColorConstants_8h__dep__incl.svg b/docs/duo/ColorConstants_8h__dep__incl.svg index 269c09e218..9879575987 100644 --- a/docs/duo/ColorConstants_8h__dep__incl.svg +++ b/docs/duo/ColorConstants_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Colors -/ColorConstants.h + +VortexEngine/src/Colors +/ColorConstants.h @@ -68,1605 +68,1599 @@ var sectionId = 'dynsection-0'; Node2 - -VortexEngine/src/Colors -/ColorTypes.h + +VortexEngine/src/Colors +/ColorTypes.h Node1->Node2 - - + + - - -Node98 - - -VortexEngine/src/VortexConfig.h + + +Node97 + + +VortexEngine/src/VortexConfig.h - - -Node1->Node98 - - + + +Node1->Node97 + + Node3 - -VortexEngine/src/Colors -/Colorset.h + +VortexEngine/src/Colors +/Colorset.h Node2->Node3 - - + + Node77 - -VortexEngine/src/Colors -/ColorTypes.cpp + +VortexEngine/src/Colors +/ColorTypes.cpp Node2->Node77 - - + + Node78 - -VortexEngine/src/Leds -/Leds.h + +VortexEngine/src/Leds +/Leds.h Node2->Node78 - - + + Node82 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node2->Node82 - - + + + + + +Node87 + + +VortexEngine/src/Leds +/LedStash.h + + + + + +Node2->Node87 + + - + -Node88 - - -VortexEngine/src/Leds -/LedStash.h +Node89 + + +VortexEngine/src/Menus +/Menu.h - - -Node2->Node88 - - + + +Node2->Node89 + + - + -Node90 - - -VortexEngine/src/Menus -/Menu.h +Node95 + + +VortexEngine/src/Menus +/Menus.h - - -Node2->Node90 - - + + +Node2->Node95 + + Node96 - - -VortexEngine/src/Menus -/Menus.h + + +VortexEngine/src/Modes +/DefaultModes.cpp - + Node2->Node96 - - - - - -Node97 - - -VortexEngine/src/Modes -/DefaultModes.cpp - - - - - -Node2->Node97 - - + + Node4 - -VortexEngine/src/Colors -/Colorset.cpp + +VortexEngine/src/Colors +/Colorset.cpp Node3->Node4 - - + + Node5 - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp Node3->Node5 - - + + Node6 - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + +VortexEngine/src/Menus +/MenuList/ColorSelect.h Node3->Node6 - - + + Node8 - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp Node3->Node8 - - + + Node9 - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp Node3->Node9 - - + + Node10 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h Node3->Node10 - - + + Node12 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp Node3->Node12 - - + + Node13 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp Node3->Node13 - - + + Node14 - -VortexEngine/src/Modes -/Modes.cpp + +VortexEngine/src/Modes +/Modes.cpp Node3->Node14 - - + + Node15 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp Node3->Node15 - - + + Node16 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h Node3->Node16 - - + + Node23 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp Node3->Node23 - - + + Node24 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h Node3->Node24 - - + + Node71 - -VortexEngine/src/Patterns -/Single/BasicPattern.cpp + +VortexEngine/src/Patterns +/Single/BasicPattern.cpp Node3->Node71 - - + + Node73 - -VortexEngine/src/Patterns -/Single/BlendPattern.cpp + +VortexEngine/src/Patterns +/Single/BlendPattern.cpp Node3->Node73 - - + + Node6->Node5 - - + + Node7 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp Node6->Node7 - - + + Node10->Node7 - - + + Node11 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp Node10->Node11 - - + + Node24->Node5 - - + + Node24->Node9 - - + + Node24->Node11 - - + + Node24->Node12 - - + + Node24->Node13 - - + + Node24->Node14 - - + + Node24->Node23 - - + + Node25 - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node24->Node25 - - + + Node78->Node5 - - + + Node78->Node7 - - + + Node78->Node8 - - + + Node78->Node9 - - + + Node78->Node11 - - + + Node78->Node12 - - + + Node78->Node13 - - + + Node78->Node14 - - + + Node78->Node25 - - + + Node78->Node71 - - + + Node78->Node73 - - + + Node79 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp Node78->Node79 - - + + Node80 - -VortexEngine/src/Menus -/Menu.cpp + +VortexEngine/src/Menus +/Menu.cpp Node78->Node80 - - + + Node81 - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp Node78->Node81 - - + + Node78->Node82 - - + + Node28 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.cpp + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.cpp Node78->Node28 - - + + Node30 - -VortexEngine/src/Patterns -/Multi/BouncePattern.cpp + +VortexEngine/src/Patterns +/Multi/BouncePattern.cpp Node78->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/CrossDopsPattern.cpp + +VortexEngine/src/Patterns +/Multi/CrossDopsPattern.cpp Node78->Node32 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/DoubleStrobePattern.cpp + +VortexEngine/src/Patterns +/Multi/DoubleStrobePattern.cpp Node78->Node34 - - - - - -Node84 - - -VortexEngine/src/Storage -/Storage.cpp - - - - - -Node78->Node84 - - + + Node82->Node5 - - + + Node82->Node7 - - + + Node82->Node8 - - + + Node82->Node9 - - + + Node82->Node11 - - + + Node82->Node12 - - + + Node82->Node14 - - + + Node82->Node25 - - + + Node82->Node79 - - + + Node82->Node80 - - + + Node82->Node81 - - + + - - -Node88->Node79 - - + + +Node87->Node79 + + + + + +Node89->Node6 + + - + -Node90->Node6 - - +Node89->Node10 + + - - -Node90->Node10 - - + + +Node89->Node80 + + - - -Node90->Node80 - - + + +Node95->Node5 + + - - -Node96->Node5 - - + + +Node95->Node7 + + - - -Node96->Node7 - - + + +Node95->Node9 + + - + -Node96->Node9 - - +Node95->Node11 + + - + -Node96->Node11 - - +Node95->Node12 + + - - -Node96->Node12 - - + + +Node95->Node80 + + - - -Node96->Node80 - - + + +Node97->Node2 + + - - -Node98->Node2 - - + + +Node97->Node3 + + - - -Node98->Node3 - - + + +Node97->Node23 + + - - -Node98->Node23 - - + + +Node97->Node25 + + - - -Node98->Node25 - - + + +Node97->Node79 + + - - -Node98->Node79 - - + + +Node97->Node82 + + - - -Node98->Node82 - - + + +Node98 + + +VortexEngine/src/Buttons +/Button.h + - - -Node98->Node84 - - - + + +Node97->Node98 + + + + -Node99 - - -VortexEngine/src/Buttons -/Button.h +Node102 + + +VortexEngine/src/Leds +/LedTypes.h - - -Node98->Node99 - - + + +Node97->Node102 + + Node103 - - -VortexEngine/src/Leds -/LedTypes.h + + +VortexEngine/src/Modes +/DefaultModes.h - - -Node98->Node103 - - + + +Node97->Node103 + + Node104 - - -VortexEngine/src/Modes -/DefaultModes.h + + +VortexEngine/src/Modes +/Mode.h - + -Node98->Node104 - - +Node97->Node104 + + - + -Node105 - - -VortexEngine/src/Modes -/Mode.h +Node107 + + +VortexEngine/src/Time +/TimeControl.h - - -Node98->Node105 - - + + +Node97->Node107 + + - + -Node108 - - -VortexEngine/src/Time -/TimeControl.h +Node111 + + +VortexEngine/src/Time +/Timings.h - + -Node98->Node108 - - +Node97->Node111 + + - + -Node112 - - -VortexEngine/src/Time -/Timings.h +Node113 + + +VortexEngine/src/Log +/ErrorBlinker.h - - -Node98->Node112 - - + + +Node97->Node113 + + - + -Node114 - - -VortexEngine/src/Log -/ErrorBlinker.h +Node115 + + +VortexEngine/src/Log +/Log.h - - -Node98->Node114 - - + + +Node97->Node115 + + - + -Node116 - - -VortexEngine/src/Log -/Log.h +Node121 + + +VortexEngine/src/Storage +/Storage.cpp - - -Node98->Node116 - - + + +Node97->Node121 + + Node124 - -VortexEngine/src/Memory -/Memory.h + +VortexEngine/src/Memory +/Memory.h - - -Node98->Node124 - - + + +Node97->Node124 + + Node125 - -VortexEngine/src/Serial -/Compression.cpp + +VortexEngine/src/Serial +/Compression.cpp - - -Node98->Node125 - - + + +Node97->Node125 + + Node126 - -VortexEngine/src/Serial -/Compression.h + +VortexEngine/src/Serial +/Compression.h - - -Node98->Node126 - - + + +Node97->Node126 + + Node127 - -VortexEngine/src/VortexEngine.h + +VortexEngine/src/VortexEngine.h - - -Node98->Node127 - - + + +Node97->Node127 + + Node128 - -VortexEngine/src/Wireless -/VLConfig.h + +VortexEngine/src/Wireless +/VLConfig.h - - -Node98->Node128 - - + + +Node97->Node128 + + - - -Node99->Node5 - - + + +Node98->Node5 + + - - -Node99->Node7 - - + + +Node98->Node7 + + - - -Node99->Node9 - - + + +Node98->Node9 + + + + + +Node98->Node11 + + - + -Node99->Node11 - - +Node98->Node12 + + - - -Node99->Node12 - - + + +Node98->Node25 + + - - -Node99->Node25 - - + + +Node98->Node80 + + - - -Node99->Node80 - - + + +Node98->Node81 + + - - -Node99->Node81 - - + + +Node102->Node16 + + - + -Node103->Node16 - - +Node102->Node24 + + - - -Node103->Node24 - - + + +Node102->Node78 + + - + -Node103->Node78 - - +Node102->Node87 + + - + -Node103->Node88 - - +Node102->Node89 + + - + -Node103->Node90 - - +Node102->Node95 + + - + -Node103->Node96 - - +Node102->Node103 + + - - -Node103->Node104 - - + + +Node102->Node104 + + - - -Node103->Node105 - - + + +Node102->Node107 + + - - -Node103->Node108 - - + + +Node103->Node14 + + - - -Node104->Node14 - - + + +Node103->Node25 + + - + -Node104->Node25 - - +Node103->Node96 + + - + -Node104->Node97 - - +Node103->Node104 + + - - -Node104->Node105 - - + + +Node104->Node5 + + - + -Node105->Node5 - - +Node104->Node8 + + - - -Node105->Node8 - - + + +Node104->Node10 + + - + -Node105->Node10 - - +Node104->Node12 + + - - -Node105->Node12 - - + + +Node104->Node13 + + - + -Node105->Node13 - - +Node104->Node14 + + - - -Node105->Node14 - - + + +Node104->Node25 + + + + + +Node104->Node80 + + - + -Node105->Node25 - - +Node104->Node81 + + - + -Node105->Node80 - - +Node104->Node89 + + - - -Node105->Node81 - - + + +Node104->Node95 + + - - -Node105->Node90 - - + + +Node107->Node5 + + - - -Node105->Node96 - - + + +Node107->Node7 + + - + -Node108->Node5 - - +Node107->Node8 + + - - -Node108->Node7 - - - - - -Node108->Node8 - - + + +Node107->Node9 + + - - -Node108->Node9 - - + + +Node107->Node11 + + - - -Node108->Node11 - - + + +Node107->Node13 + + - + -Node108->Node13 - - +Node107->Node14 + + - - -Node108->Node14 - - + + +Node107->Node23 + + - - -Node108->Node23 - - + + +Node107->Node25 + + - - -Node108->Node25 - - + + +Node107->Node71 + + - + -Node108->Node71 - - +Node107->Node73 + + - - -Node108->Node73 - - + + +Node107->Node79 + + - + -Node108->Node79 - - +Node107->Node80 + + - - -Node108->Node80 - - + + +Node107->Node81 + + - - -Node108->Node81 - - + + +Node107->Node28 + + - + -Node108->Node28 - - +Node107->Node30 + + - - -Node108->Node30 - - + + +Node107->Node111 + + - - -Node108->Node112 - - + + +Node111->Node5 + + - - -Node112->Node5 - - + + +Node111->Node7 + + - - -Node112->Node7 - - + + +Node111->Node9 + + - - -Node112->Node9 - - + + +Node111->Node11 + + - + -Node112->Node11 - - +Node111->Node12 + + - - -Node112->Node12 - - + + +Node111->Node14 + + - - -Node112->Node14 - - + + +Node111->Node25 + + - - -Node112->Node25 - - + + +Node111->Node80 + + - - -Node112->Node80 - - + + +Node111->Node81 + + - - -Node112->Node81 - - + + +Node113->Node115 + + - + -Node114->Node116 - - +Node115->Node4 + + - - -Node116->Node4 - - + + +Node115->Node5 + + - - -Node116->Node5 - - + + +Node115->Node7 + + - - -Node116->Node7 - - + + +Node115->Node8 + + - - -Node116->Node8 - - + + +Node115->Node9 + + - - -Node116->Node9 - - + + +Node115->Node11 + + - + -Node116->Node11 - - +Node115->Node12 + + - - -Node116->Node12 - - + + +Node115->Node13 + + - + -Node116->Node13 - - +Node115->Node14 + + - - -Node116->Node14 - - + + +Node115->Node23 + + - - -Node116->Node23 - - + + +Node115->Node25 + + - - -Node116->Node25 - - + + +Node115->Node80 + + - - -Node116->Node80 - - + + +Node115->Node81 + + - - -Node116->Node81 - - + + +Node115->Node28 + + - + -Node116->Node28 - - +Node115->Node30 + + - - -Node116->Node30 - - - - - -Node116->Node84 - - + + +Node115->Node121 + + - + Node124->Node4 - - + + - + Node124->Node12 - - + + - + Node124->Node13 - - + + - + Node124->Node23 - - + + - - -Node124->Node84 - - + + +Node124->Node121 + + - + Node124->Node125 - - + + - + Node126->Node125 - - + + - + Node127->Node5 - - + + - + Node127->Node7 - - + + - + Node127->Node9 - - + + - + Node127->Node13 - - + + - + Node127->Node14 - - + + - + Node127->Node25 - - + + diff --git a/docs/duo/ColorConstants_8h__dep__incl_org.svg b/docs/duo/ColorConstants_8h__dep__incl_org.svg index cd69f9aa10..d9f44c63c6 100644 --- a/docs/duo/ColorConstants_8h__dep__incl_org.svg +++ b/docs/duo/ColorConstants_8h__dep__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Colors/ColorConstants.h Node1 - -VortexEngine/src/Colors -/ColorConstants.h + +VortexEngine/src/Colors +/ColorConstants.h @@ -22,1605 +22,1599 @@ Node2 - -VortexEngine/src/Colors -/ColorTypes.h + +VortexEngine/src/Colors +/ColorTypes.h Node1->Node2 - - + + - - -Node98 - - -VortexEngine/src/VortexConfig.h + + +Node97 + + +VortexEngine/src/VortexConfig.h - - -Node1->Node98 - - + + +Node1->Node97 + + Node3 - -VortexEngine/src/Colors -/Colorset.h + +VortexEngine/src/Colors +/Colorset.h Node2->Node3 - - + + Node77 - -VortexEngine/src/Colors -/ColorTypes.cpp + +VortexEngine/src/Colors +/ColorTypes.cpp Node2->Node77 - - + + Node78 - -VortexEngine/src/Leds -/Leds.h + +VortexEngine/src/Leds +/Leds.h Node2->Node78 - - + + Node82 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node2->Node82 - - + + + + + +Node87 + + +VortexEngine/src/Leds +/LedStash.h + + + + + +Node2->Node87 + + - + -Node88 - - -VortexEngine/src/Leds -/LedStash.h +Node89 + + +VortexEngine/src/Menus +/Menu.h - - -Node2->Node88 - - + + +Node2->Node89 + + - + -Node90 - - -VortexEngine/src/Menus -/Menu.h +Node95 + + +VortexEngine/src/Menus +/Menus.h - - -Node2->Node90 - - + + +Node2->Node95 + + Node96 - - -VortexEngine/src/Menus -/Menus.h + + +VortexEngine/src/Modes +/DefaultModes.cpp - + Node2->Node96 - - - - - -Node97 - - -VortexEngine/src/Modes -/DefaultModes.cpp - - - - - -Node2->Node97 - - + + Node4 - -VortexEngine/src/Colors -/Colorset.cpp + +VortexEngine/src/Colors +/Colorset.cpp Node3->Node4 - - + + Node5 - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp Node3->Node5 - - + + Node6 - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + +VortexEngine/src/Menus +/MenuList/ColorSelect.h Node3->Node6 - - + + Node8 - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp Node3->Node8 - - + + Node9 - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp Node3->Node9 - - + + Node10 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h Node3->Node10 - - + + Node12 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp Node3->Node12 - - + + Node13 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp Node3->Node13 - - + + Node14 - -VortexEngine/src/Modes -/Modes.cpp + +VortexEngine/src/Modes +/Modes.cpp Node3->Node14 - - + + Node15 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp Node3->Node15 - - + + Node16 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h Node3->Node16 - - + + Node23 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp Node3->Node23 - - + + Node24 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h Node3->Node24 - - + + Node71 - -VortexEngine/src/Patterns -/Single/BasicPattern.cpp + +VortexEngine/src/Patterns +/Single/BasicPattern.cpp Node3->Node71 - - + + Node73 - -VortexEngine/src/Patterns -/Single/BlendPattern.cpp + +VortexEngine/src/Patterns +/Single/BlendPattern.cpp Node3->Node73 - - + + Node6->Node5 - - + + Node7 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp Node6->Node7 - - + + Node10->Node7 - - + + Node11 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp Node10->Node11 - - + + Node24->Node5 - - + + Node24->Node9 - - + + Node24->Node11 - - + + Node24->Node12 - - + + Node24->Node13 - - + + Node24->Node14 - - + + Node24->Node23 - - + + Node25 - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node24->Node25 - - + + Node78->Node5 - - + + Node78->Node7 - - + + Node78->Node8 - - + + Node78->Node9 - - + + Node78->Node11 - - + + Node78->Node12 - - + + Node78->Node13 - - + + Node78->Node14 - - + + Node78->Node25 - - + + Node78->Node71 - - + + Node78->Node73 - - + + Node79 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp Node78->Node79 - - + + Node80 - -VortexEngine/src/Menus -/Menu.cpp + +VortexEngine/src/Menus +/Menu.cpp Node78->Node80 - - + + Node81 - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp Node78->Node81 - - + + Node78->Node82 - - + + Node28 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.cpp + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.cpp Node78->Node28 - - + + Node30 - -VortexEngine/src/Patterns -/Multi/BouncePattern.cpp + +VortexEngine/src/Patterns +/Multi/BouncePattern.cpp Node78->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/CrossDopsPattern.cpp + +VortexEngine/src/Patterns +/Multi/CrossDopsPattern.cpp Node78->Node32 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/DoubleStrobePattern.cpp + +VortexEngine/src/Patterns +/Multi/DoubleStrobePattern.cpp Node78->Node34 - - - - - -Node84 - - -VortexEngine/src/Storage -/Storage.cpp - - - - - -Node78->Node84 - - + + Node82->Node5 - - + + Node82->Node7 - - + + Node82->Node8 - - + + Node82->Node9 - - + + Node82->Node11 - - + + Node82->Node12 - - + + Node82->Node14 - - + + Node82->Node25 - - + + Node82->Node79 - - + + Node82->Node80 - - + + Node82->Node81 - - + + - - -Node88->Node79 - - + + +Node87->Node79 + + + + + +Node89->Node6 + + - + -Node90->Node6 - - +Node89->Node10 + + - - -Node90->Node10 - - + + +Node89->Node80 + + - - -Node90->Node80 - - + + +Node95->Node5 + + - - -Node96->Node5 - - + + +Node95->Node7 + + - - -Node96->Node7 - - + + +Node95->Node9 + + - + -Node96->Node9 - - +Node95->Node11 + + - + -Node96->Node11 - - +Node95->Node12 + + - - -Node96->Node12 - - + + +Node95->Node80 + + - - -Node96->Node80 - - + + +Node97->Node2 + + - - -Node98->Node2 - - + + +Node97->Node3 + + - - -Node98->Node3 - - + + +Node97->Node23 + + - - -Node98->Node23 - - + + +Node97->Node25 + + - - -Node98->Node25 - - + + +Node97->Node79 + + - - -Node98->Node79 - - + + +Node97->Node82 + + - - -Node98->Node82 - - + + +Node98 + + +VortexEngine/src/Buttons +/Button.h + - - -Node98->Node84 - - - + + +Node97->Node98 + + + + -Node99 - - -VortexEngine/src/Buttons -/Button.h +Node102 + + +VortexEngine/src/Leds +/LedTypes.h - - -Node98->Node99 - - + + +Node97->Node102 + + Node103 - - -VortexEngine/src/Leds -/LedTypes.h + + +VortexEngine/src/Modes +/DefaultModes.h - - -Node98->Node103 - - + + +Node97->Node103 + + Node104 - - -VortexEngine/src/Modes -/DefaultModes.h + + +VortexEngine/src/Modes +/Mode.h - + -Node98->Node104 - - +Node97->Node104 + + - + -Node105 - - -VortexEngine/src/Modes -/Mode.h +Node107 + + +VortexEngine/src/Time +/TimeControl.h - - -Node98->Node105 - - + + +Node97->Node107 + + - + -Node108 - - -VortexEngine/src/Time -/TimeControl.h +Node111 + + +VortexEngine/src/Time +/Timings.h - + -Node98->Node108 - - +Node97->Node111 + + - + -Node112 - - -VortexEngine/src/Time -/Timings.h +Node113 + + +VortexEngine/src/Log +/ErrorBlinker.h - - -Node98->Node112 - - + + +Node97->Node113 + + - + -Node114 - - -VortexEngine/src/Log -/ErrorBlinker.h +Node115 + + +VortexEngine/src/Log +/Log.h - - -Node98->Node114 - - + + +Node97->Node115 + + - + -Node116 - - -VortexEngine/src/Log -/Log.h +Node121 + + +VortexEngine/src/Storage +/Storage.cpp - - -Node98->Node116 - - + + +Node97->Node121 + + Node124 - -VortexEngine/src/Memory -/Memory.h + +VortexEngine/src/Memory +/Memory.h - - -Node98->Node124 - - + + +Node97->Node124 + + Node125 - -VortexEngine/src/Serial -/Compression.cpp + +VortexEngine/src/Serial +/Compression.cpp - - -Node98->Node125 - - + + +Node97->Node125 + + Node126 - -VortexEngine/src/Serial -/Compression.h + +VortexEngine/src/Serial +/Compression.h - - -Node98->Node126 - - + + +Node97->Node126 + + Node127 - -VortexEngine/src/VortexEngine.h + +VortexEngine/src/VortexEngine.h - - -Node98->Node127 - - + + +Node97->Node127 + + Node128 - -VortexEngine/src/Wireless -/VLConfig.h + +VortexEngine/src/Wireless +/VLConfig.h - - -Node98->Node128 - - + + +Node97->Node128 + + - - -Node99->Node5 - - + + +Node98->Node5 + + - - -Node99->Node7 - - + + +Node98->Node7 + + - - -Node99->Node9 - - + + +Node98->Node9 + + + + + +Node98->Node11 + + - + -Node99->Node11 - - +Node98->Node12 + + - - -Node99->Node12 - - + + +Node98->Node25 + + - - -Node99->Node25 - - + + +Node98->Node80 + + - - -Node99->Node80 - - + + +Node98->Node81 + + - - -Node99->Node81 - - + + +Node102->Node16 + + - + -Node103->Node16 - - +Node102->Node24 + + - - -Node103->Node24 - - + + +Node102->Node78 + + - + -Node103->Node78 - - +Node102->Node87 + + - + -Node103->Node88 - - +Node102->Node89 + + - + -Node103->Node90 - - +Node102->Node95 + + - + -Node103->Node96 - - +Node102->Node103 + + - - -Node103->Node104 - - + + +Node102->Node104 + + - - -Node103->Node105 - - + + +Node102->Node107 + + - - -Node103->Node108 - - + + +Node103->Node14 + + - - -Node104->Node14 - - + + +Node103->Node25 + + - + -Node104->Node25 - - +Node103->Node96 + + - + -Node104->Node97 - - +Node103->Node104 + + - - -Node104->Node105 - - + + +Node104->Node5 + + - + -Node105->Node5 - - +Node104->Node8 + + - - -Node105->Node8 - - + + +Node104->Node10 + + - + -Node105->Node10 - - +Node104->Node12 + + - - -Node105->Node12 - - + + +Node104->Node13 + + - + -Node105->Node13 - - +Node104->Node14 + + - - -Node105->Node14 - - + + +Node104->Node25 + + + + + +Node104->Node80 + + - + -Node105->Node25 - - +Node104->Node81 + + - + -Node105->Node80 - - +Node104->Node89 + + - - -Node105->Node81 - - + + +Node104->Node95 + + - - -Node105->Node90 - - + + +Node107->Node5 + + - - -Node105->Node96 - - + + +Node107->Node7 + + - + -Node108->Node5 - - +Node107->Node8 + + - - -Node108->Node7 - - - - - -Node108->Node8 - - + + +Node107->Node9 + + - - -Node108->Node9 - - + + +Node107->Node11 + + - - -Node108->Node11 - - + + +Node107->Node13 + + - + -Node108->Node13 - - +Node107->Node14 + + - - -Node108->Node14 - - + + +Node107->Node23 + + - - -Node108->Node23 - - + + +Node107->Node25 + + - - -Node108->Node25 - - + + +Node107->Node71 + + - + -Node108->Node71 - - +Node107->Node73 + + - - -Node108->Node73 - - + + +Node107->Node79 + + - + -Node108->Node79 - - +Node107->Node80 + + - - -Node108->Node80 - - + + +Node107->Node81 + + - - -Node108->Node81 - - + + +Node107->Node28 + + - + -Node108->Node28 - - +Node107->Node30 + + - - -Node108->Node30 - - + + +Node107->Node111 + + - - -Node108->Node112 - - + + +Node111->Node5 + + - - -Node112->Node5 - - + + +Node111->Node7 + + - - -Node112->Node7 - - + + +Node111->Node9 + + - - -Node112->Node9 - - + + +Node111->Node11 + + - + -Node112->Node11 - - +Node111->Node12 + + - - -Node112->Node12 - - + + +Node111->Node14 + + - - -Node112->Node14 - - + + +Node111->Node25 + + - - -Node112->Node25 - - + + +Node111->Node80 + + - - -Node112->Node80 - - + + +Node111->Node81 + + - - -Node112->Node81 - - + + +Node113->Node115 + + - + -Node114->Node116 - - +Node115->Node4 + + - - -Node116->Node4 - - + + +Node115->Node5 + + - - -Node116->Node5 - - + + +Node115->Node7 + + - - -Node116->Node7 - - + + +Node115->Node8 + + - - -Node116->Node8 - - + + +Node115->Node9 + + - - -Node116->Node9 - - + + +Node115->Node11 + + - + -Node116->Node11 - - +Node115->Node12 + + - - -Node116->Node12 - - + + +Node115->Node13 + + - + -Node116->Node13 - - +Node115->Node14 + + - - -Node116->Node14 - - + + +Node115->Node23 + + - - -Node116->Node23 - - + + +Node115->Node25 + + - - -Node116->Node25 - - + + +Node115->Node80 + + - - -Node116->Node80 - - + + +Node115->Node81 + + - - -Node116->Node81 - - + + +Node115->Node28 + + - + -Node116->Node28 - - +Node115->Node30 + + - - -Node116->Node30 - - - - - -Node116->Node84 - - + + +Node115->Node121 + + - + Node124->Node4 - - + + - + Node124->Node12 - - + + - + Node124->Node13 - - + + - + Node124->Node23 - - + + - - -Node124->Node84 - - + + +Node124->Node121 + + - + Node124->Node125 - - + + - + Node126->Node125 - - + + - + Node127->Node5 - - + + - + Node127->Node7 - - + + - + Node127->Node9 - - + + - + Node127->Node13 - - + + - + Node127->Node14 - - + + - + Node127->Node25 - - + + diff --git a/docs/duo/ColorSelect_8h_source.html b/docs/duo/ColorSelect_8h_source.html index 3d6a61bdea..fb41f6fb48 100644 --- a/docs/duo/ColorSelect_8h_source.html +++ b/docs/duo/ColorSelect_8h_source.html @@ -157,14 +157,14 @@
68 };
69 
70 #endif
-
#define VAL_OPTION_1
Definition: VortexConfig.h:319
-
#define VAL_OPTION_2
Definition: VortexConfig.h:320
-
#define SAT_OPTION_3
Definition: VortexConfig.h:312
-
#define VAL_OPTION_4
Definition: VortexConfig.h:322
-
#define SAT_OPTION_2
Definition: VortexConfig.h:311
-
#define SAT_OPTION_4
Definition: VortexConfig.h:313
-
#define VAL_OPTION_3
Definition: VortexConfig.h:321
-
#define SAT_OPTION_1
Definition: VortexConfig.h:310
+
#define VAL_OPTION_1
Definition: VortexConfig.h:318
+
#define VAL_OPTION_2
Definition: VortexConfig.h:319
+
#define SAT_OPTION_3
Definition: VortexConfig.h:311
+
#define VAL_OPTION_4
Definition: VortexConfig.h:321
+
#define SAT_OPTION_2
Definition: VortexConfig.h:310
+
#define SAT_OPTION_4
Definition: VortexConfig.h:312
+
#define VAL_OPTION_3
Definition: VortexConfig.h:320
+
#define SAT_OPTION_1
Definition: VortexConfig.h:309
const uint8_t vals[4]
Definition: ColorSelect.h:48
bool init() override
Definition: ColorSelect.cpp:45
diff --git a/docs/duo/ColorTypes_8cpp.html b/docs/duo/ColorTypes_8cpp.html index d35b947943..f7c3356211 100644 --- a/docs/duo/ColorTypes_8cpp.html +++ b/docs/duo/ColorTypes_8cpp.html @@ -363,7 +363,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/duo/ColorTypes_8cpp_source.html b/docs/duo/ColorTypes_8cpp_source.html index de4b2c9d49..a6a21fbb7e 100644 --- a/docs/duo/ColorTypes_8cpp_source.html +++ b/docs/duo/ColorTypes_8cpp_source.html @@ -330,7 +330,7 @@
241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/duo/ColorTypes_8h.html b/docs/duo/ColorTypes_8h.html index 18ec360fc8..e5c04a01ac 100644 --- a/docs/duo/ColorTypes_8h.html +++ b/docs/duo/ColorTypes_8h.html @@ -282,7 +282,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/duo/ColorTypes_8h__dep__incl.md5 b/docs/duo/ColorTypes_8h__dep__incl.md5 index c97005e8a7..eeb5f8faee 100644 --- a/docs/duo/ColorTypes_8h__dep__incl.md5 +++ b/docs/duo/ColorTypes_8h__dep__incl.md5 @@ -1 +1 @@ -c8c9ac03a6f66bbc02e52adfaddac4e2 \ No newline at end of file +4ecd106aacfaf7d991785e55b4b1fd91 \ No newline at end of file diff --git a/docs/duo/ColorTypes_8h__dep__incl.svg b/docs/duo/ColorTypes_8h__dep__incl.svg index 0c87948261..d67f64f1a7 100644 --- a/docs/duo/ColorTypes_8h__dep__incl.svg +++ b/docs/duo/ColorTypes_8h__dep__incl.svg @@ -128,9 +128,9 @@ var sectionId = 'dynsection-1'; - + -Node87 +Node86 VortexEngine/src/Leds @@ -138,15 +138,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node87 +Node1->Node86 - + -Node89 +Node88 VortexEngine/src/Menus @@ -154,15 +154,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node89 +Node1->Node88 - + -Node95 +Node94 VortexEngine/src/Menus @@ -170,15 +170,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node95 +Node1->Node94 - + -Node96 +Node95 VortexEngine/src/Modes @@ -186,9 +186,9 @@ var sectionId = 'dynsection-1'; - + -Node1->Node96 +Node1->Node95 @@ -1046,63 +1046,63 @@ var sectionId = 'dynsection-1'; - + -Node87->Node78 +Node86->Node78 - + -Node89->Node5 +Node88->Node5 - + -Node89->Node9 +Node88->Node9 - + -Node89->Node79 +Node88->Node79 - + -Node95->Node4 +Node94->Node4 - + -Node95->Node6 +Node94->Node6 - + -Node95->Node8 +Node94->Node8 - + -Node95->Node10 +Node94->Node10 - + -Node95->Node11 +Node94->Node11 - + -Node95->Node79 +Node94->Node79 diff --git a/docs/duo/ColorTypes_8h__dep__incl_org.svg b/docs/duo/ColorTypes_8h__dep__incl_org.svg index 20db5f2524..a864c9215e 100644 --- a/docs/duo/ColorTypes_8h__dep__incl_org.svg +++ b/docs/duo/ColorTypes_8h__dep__incl_org.svg @@ -82,9 +82,9 @@ - + -Node87 +Node86 VortexEngine/src/Leds @@ -92,15 +92,15 @@ - + -Node1->Node87 +Node1->Node86 - + -Node89 +Node88 VortexEngine/src/Menus @@ -108,15 +108,15 @@ - + -Node1->Node89 +Node1->Node88 - + -Node95 +Node94 VortexEngine/src/Menus @@ -124,15 +124,15 @@ - + -Node1->Node95 +Node1->Node94 - + -Node96 +Node95 VortexEngine/src/Modes @@ -140,9 +140,9 @@ - + -Node1->Node96 +Node1->Node95 @@ -1000,63 +1000,63 @@ - + -Node87->Node78 +Node86->Node78 - + -Node89->Node5 +Node88->Node5 - + -Node89->Node9 +Node88->Node9 - + -Node89->Node79 +Node88->Node79 - + -Node95->Node4 +Node94->Node4 - + -Node95->Node6 +Node94->Node6 - + -Node95->Node8 +Node94->Node8 - + -Node95->Node10 +Node94->Node10 - + -Node95->Node11 +Node94->Node11 - + -Node95->Node79 +Node94->Node79 diff --git a/docs/duo/DefaultModes_8cpp.html b/docs/duo/DefaultModes_8cpp.html index a2ccd67f0f..77340c2d03 100644 --- a/docs/duo/DefaultModes_8cpp.html +++ b/docs/duo/DefaultModes_8cpp.html @@ -102,18 +102,18 @@ - - + +

Variables

const DefaultModeEntry defaultModes []
 
const DefaultModeEntry defaultModes [MAX_MODES]
 

Variable Documentation

- -

◆ defaultModes

+ +

◆ defaultModes

- +
const DefaultModeEntry defaultModes[]const DefaultModeEntry defaultModes[MAX_MODES]
diff --git a/docs/duo/DefaultModes_8cpp.js b/docs/duo/DefaultModes_8cpp.js index 038d26af5f..5e5c3a5757 100644 --- a/docs/duo/DefaultModes_8cpp.js +++ b/docs/duo/DefaultModes_8cpp.js @@ -1,4 +1,4 @@ var DefaultModes_8cpp = [ - [ "defaultModes", "DefaultModes_8cpp.html#a13a9f1a37ffa41f648818fde6cb92ae5", null ] + [ "defaultModes", "DefaultModes_8cpp.html#a1d8e5b74eb83294274c8c102a7a1809b", null ] ]; \ No newline at end of file diff --git a/docs/duo/DefaultModes_8cpp_source.html b/docs/duo/DefaultModes_8cpp_source.html index 82112cc2fc..4fc8fd1f36 100644 --- a/docs/duo/DefaultModes_8cpp_source.html +++ b/docs/duo/DefaultModes_8cpp_source.html @@ -93,7 +93,7 @@
4 
5 // Here is the array of 'default modes' that are assigned to
6 // the gloveset upon factory reset
- +
8  {
9  {
10  {
@@ -147,73 +147,67 @@
58  {
59  {
60  {
- -
62  RGB_RED5,
- -
64  RGB_RED5,
-
65  RGB_CYAN5,
-
66  RGB_BLUE5,
-
67  RGB_CYAN5,
+
61  PATTERN_STROBE, 6, {
+
62  0xC4003B,
+
63  0x700000,
+
64  0x000000,
+
65  0x0017E9,
+
66  0x22004E,
+
67  0x000000,
68  }
69  },
70  {
- -
72  RGB_RED5,
- -
74  RGB_RED5,
-
75  RGB_CYAN5,
-
76  RGB_BLUE5,
-
77  RGB_CYAN5,
-
78  }
-
79  }
-
80  }
-
81  },
-
82 
-
83  {
-
84  {
-
85  {
-
86  PATTERN_DOUBLEDOPS, 8, {
-
87  0xFFC600,
-
88  0x235500,
-
89  0x00FF66,
-
90  0x004355,
-
91  0x0600FF,
-
92  0x480055,
-
93  0xFF0057,
-
94  0x552C00,
-
95  }
-
96  },
-
97  {
-
98  PATTERN_DOUBLEDOPS, 8, {
-
99  0xFFC600,
-
100  0x235500,
-
101  0x00FF66,
-
102  0x004355,
-
103  0x0600FF,
-
104  0x480055,
-
105  0xFF0057,
-
106  0x552C00,
-
107  }
-
108  }
-
109  }
-
110  }
-
111 };
+
71  PATTERN_STROBIE, 3, {
+
72  0xC4003B,
+
73  0x4D00B2,
+
74  0x0017E9,
+
75  }
+
76  }
+
77  }
+
78  },
+
79 
+
80  {
+
81  {
+
82  {
+
83  PATTERN_DOUBLEDOPS, 8, {
+
84  0xFFC600,
+
85  0x235500,
+
86  0x00FF66,
+
87  0x004355,
+
88  0x0600FF,
+
89  0x480055,
+
90  0xFF0057,
+
91  0x552C00,
+
92  }
+
93  },
+
94  {
+
95  PATTERN_DOUBLEDOPS, 8, {
+
96  0xFFC600,
+
97  0x235500,
+
98  0x00FF66,
+
99  0x004355,
+
100  0x0600FF,
+
101  0x480055,
+
102  0xFF0057,
+
103  0x552C00,
+
104  }
+
105  }
+
106  }
+
107  }
+
108 };
#define RGB_BLUE
-
#define RGB_CYAN5
-
#define RGB_BLUE5
-
#define RGB_RED5
#define RGB_RED
#define RGB_GREEN
-
#define RGB_YELLOW5
-
const DefaultModeEntry defaultModes[]
Definition: DefaultModes.cpp:7
+
const DefaultModeEntry defaultModes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ PATTERN_STROBEGAP
Definition: Patterns.h:31
@ PATTERN_STROBE
Definition: Patterns.h:25
@ PATTERN_HYPERGAP
Definition: Patterns.h:32
-
@ PATTERN_COMPLEMENTARY_BLENDSTROBEGAP
Definition: Patterns.h:55
+
@ PATTERN_STROBIE
Definition: Patterns.h:28
@ PATTERN_COMPLEMENTARY_BLEND
Definition: Patterns.h:53
@ PATTERN_DOUBLEDOPS
Definition: Patterns.h:39
@ PATTERN_BLEND
Definition: Patterns.h:50
+
#define MAX_MODES
Definition: VortexConfig.h:188
diff --git a/docs/duo/DefaultModes_8h_source.html b/docs/duo/DefaultModes_8h_source.html index d38cbfbce6..4e74bb0eb6 100644 --- a/docs/duo/DefaultModes_8h_source.html +++ b/docs/duo/DefaultModes_8h_source.html @@ -115,7 +115,7 @@
@ LED_COUNT
Definition: LedTypes.h:20
PatternID
Definition: Patterns.h:12
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:164
-
#define MAX_MODES
Definition: VortexConfig.h:189
+
#define MAX_MODES
Definition: VortexConfig.h:188
PatternID patternID
Definition: DefaultModes.h:11
uint8_t numColors
Definition: DefaultModes.h:12
diff --git a/docs/duo/EditorConnection_8cpp_source.html b/docs/duo/EditorConnection_8cpp_source.html index e41ae68e34..01a91f63d2 100644 --- a/docs/duo/EditorConnection_8cpp_source.html +++ b/docs/duo/EditorConnection_8cpp_source.html @@ -387,18 +387,18 @@
@ LED_ALL
Definition: LedTypes.h:28
#define DEBUG_LOG(msg)
Definition: Log.h:40
@ PATTERN_STROBE
Definition: Patterns.h:25
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:499
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:487
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:490
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:513
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:492
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:507
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:497
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:502
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:509
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:504
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:494
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:498
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:486
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:489
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:512
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:491
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:506
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:496
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:501
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:508
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:503
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:493
const uint8_t * data() const
Definition: ByteStream.h:120
void * rawData() const
Definition: ByteStream.h:121
diff --git a/docs/duo/FactoryReset_8cpp_source.html b/docs/duo/FactoryReset_8cpp_source.html index 538c5b9958..3800e4a4cb 100644 --- a/docs/duo/FactoryReset_8cpp_source.html +++ b/docs/duo/FactoryReset_8cpp_source.html @@ -166,7 +166,7 @@
77  // restore defaults and then leave menu and save
78  if (m_advanced) {
79  // reset the target mode slot on the target led
- +
81  Mode *cur = Modes::curMode();
83  const DefaultLedEntry &led = defMode.leds[pos];
@@ -220,7 +220,7 @@
#define RGB_WHITE0
#define RGB_RED4
#define RGB_WHITE
-
const DefaultModeEntry defaultModes[]
Definition: DefaultModes.cpp:7
+
const DefaultModeEntry defaultModes[MAX_MODES]
Definition: DefaultModes.cpp:7
#define MAP_FOREACH_LED(map)
Definition: LedTypes.h:113
@ LED_1
Definition: LedTypes.h:17
diff --git a/docs/duo/GlobalBrightness_8h_source.html b/docs/duo/GlobalBrightness_8h_source.html index 1068fb1d20..e6ce6fc899 100644 --- a/docs/duo/GlobalBrightness_8h_source.html +++ b/docs/duo/GlobalBrightness_8h_source.html @@ -145,10 +145,10 @@
56 };
57 
58 #endif
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:304
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:303
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:302
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:301
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:303
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:302
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:301
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:300
uint32_t m_lastStateChange
diff --git a/docs/duo/IRReceiver_8cpp_source.html b/docs/duo/IRReceiver_8cpp_source.html index f0b9be18ea..b297f1525e 100644 --- a/docs/duo/IRReceiver_8cpp_source.html +++ b/docs/duo/IRReceiver_8cpp_source.html @@ -310,7 +310,7 @@
uint32_t rawSize() const
Definition: ByteStream.h:122
Definition: Mode.h:39
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:189
-
static uint32_t microseconds()
+
static uint32_t microseconds()
diff --git a/docs/duo/LedTypes_8h__dep__incl.md5 b/docs/duo/LedTypes_8h__dep__incl.md5 index 817aa2ca60..f0068a032d 100644 --- a/docs/duo/LedTypes_8h__dep__incl.md5 +++ b/docs/duo/LedTypes_8h__dep__incl.md5 @@ -1 +1 @@ -b95d30e987deb1775f03014a91d95e59 \ No newline at end of file +efbd5d2bcc52d47bc3e232a7b735c3e6 \ No newline at end of file diff --git a/docs/duo/LedTypes_8h__dep__incl.svg b/docs/duo/LedTypes_8h__dep__incl.svg index 63de887939..fe497ffc41 100644 --- a/docs/duo/LedTypes_8h__dep__incl.svg +++ b/docs/duo/LedTypes_8h__dep__incl.svg @@ -80,9 +80,9 @@ var sectionId = 'dynsection-1'; - + -Node44 +Node43 VortexEngine/src/Leds @@ -90,15 +90,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node44 +Node1->Node43 - + -Node49 +Node48 VortexEngine/src/Menus @@ -106,15 +106,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node49 +Node1->Node48 - + -Node57 +Node56 VortexEngine/src/Menus @@ -122,15 +122,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node57 +Node1->Node56 - + -Node58 +Node57 VortexEngine/src/Modes @@ -138,15 +138,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node58 +Node1->Node57 - + -Node60 +Node59 VortexEngine/src/Modes @@ -154,15 +154,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node60 +Node1->Node59 - + -Node63 +Node62 VortexEngine/src/Patterns @@ -170,15 +170,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node63 +Node1->Node62 - + -Node75 +Node74 VortexEngine/src/Patterns @@ -186,15 +186,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node75 +Node1->Node74 - + -Node76 +Node75 VortexEngine/src/Patterns @@ -202,15 +202,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node76 +Node1->Node75 - + -Node77 +Node76 VortexEngine/src/Patterns @@ -218,15 +218,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node77 +Node1->Node76 - + -Node80 +Node79 VortexEngine/src/Patterns @@ -234,15 +234,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node80 +Node1->Node79 - + -Node98 +Node97 VortexEngine/src/Time @@ -250,15 +250,15 @@ var sectionId = 'dynsection-1'; - + -Node1->Node98 +Node1->Node97 - + -Node105 +Node104 VortexEngine/src/Time @@ -266,9 +266,9 @@ var sectionId = 'dynsection-1'; - + -Node1->Node105 +Node1->Node104 @@ -914,387 +914,387 @@ var sectionId = 'dynsection-1'; - + -Node44->Node3 +Node43->Node3 - + -Node49->Node4 +Node48->Node4 - + -Node57->Node4 +Node56->Node4 - + -Node57->Node5 +Node56->Node5 - + -Node57->Node8 +Node56->Node8 - + -Node57->Node10 +Node56->Node10 - + -Node57->Node11 +Node56->Node11 - + -Node57->Node12 +Node56->Node12 - + -Node58->Node7 +Node57->Node7 - + -Node58->Node14 +Node57->Node14 - + -Node58->Node60 +Node57->Node59 - + -Node60->Node4 +Node59->Node4 - + -Node60->Node5 +Node59->Node5 - + -Node60->Node6 +Node59->Node6 - + -Node60->Node7 +Node59->Node7 - + -Node60->Node9 +Node59->Node9 - + -Node60->Node11 +Node59->Node11 - + -Node60->Node13 +Node59->Node13 - + -Node60->Node14 +Node59->Node14 - + -Node60->Node49 +Node59->Node48 - + -Node60->Node57 +Node59->Node56 - + -Node63->Node17 +Node62->Node17 - + -Node75->Node26 +Node74->Node26 - + -Node76->Node29 +Node75->Node29 - + -Node76->Node77 +Node75->Node76 - + -Node77->Node30 +Node76->Node30 - + -Node80->Node5 +Node79->Node5 - + -Node80->Node7 +Node79->Node7 - + -Node80->Node8 +Node79->Node8 - + -Node80->Node10 +Node79->Node10 - + -Node80->Node11 +Node79->Node11 - + -Node80->Node13 +Node79->Node13 - + -Node80->Node14 +Node79->Node14 - + -Node98->Node3 +Node97->Node3 - + -Node98->Node4 +Node97->Node4 - + -Node98->Node5 +Node97->Node5 - + -Node98->Node6 +Node97->Node6 - + -Node98->Node7 +Node97->Node7 - + -Node98->Node8 +Node97->Node8 - + -Node98->Node9 +Node97->Node9 - + -Node98->Node10 +Node97->Node10 - + -Node98->Node12 +Node97->Node12 - + -Node98->Node13 +Node97->Node13 - + -Node98->Node14 +Node97->Node14 - + -Node98->Node17 +Node97->Node17 - + -Node98->Node18 +Node97->Node18 - + -Node98->Node23 +Node97->Node23 - + -Node98->Node24 +Node97->Node24 - + -Node98->Node25 +Node97->Node25 - + -Node98->Node26 +Node97->Node26 - + -Node98->Node27 +Node97->Node27 - + -Node98->Node28 +Node97->Node28 - + -Node98->Node32 +Node97->Node32 - + -Node98->Node34 +Node97->Node34 - + -Node98->Node35 +Node97->Node35 - + -Node98->Node36 +Node97->Node36 - + -Node98->Node37 +Node97->Node37 - + -Node98->Node38 +Node97->Node38 - + -Node98->Node39 +Node97->Node39 - + -Node105->Node8 +Node104->Node8 - + -Node105->Node63 +Node104->Node62 - + -Node105->Node75 +Node104->Node74 - + -Node105->Node76 +Node104->Node75 - + -Node105->Node77 +Node104->Node76 diff --git a/docs/duo/LedTypes_8h__dep__incl_org.svg b/docs/duo/LedTypes_8h__dep__incl_org.svg index 0eb5860cfe..e41fe1635f 100644 --- a/docs/duo/LedTypes_8h__dep__incl_org.svg +++ b/docs/duo/LedTypes_8h__dep__incl_org.svg @@ -34,9 +34,9 @@ - + -Node44 +Node43 VortexEngine/src/Leds @@ -44,15 +44,15 @@ - + -Node1->Node44 +Node1->Node43 - + -Node49 +Node48 VortexEngine/src/Menus @@ -60,15 +60,15 @@ - + -Node1->Node49 +Node1->Node48 - + -Node57 +Node56 VortexEngine/src/Menus @@ -76,15 +76,15 @@ - + -Node1->Node57 +Node1->Node56 - + -Node58 +Node57 VortexEngine/src/Modes @@ -92,15 +92,15 @@ - + -Node1->Node58 +Node1->Node57 - + -Node60 +Node59 VortexEngine/src/Modes @@ -108,15 +108,15 @@ - + -Node1->Node60 +Node1->Node59 - + -Node63 +Node62 VortexEngine/src/Patterns @@ -124,15 +124,15 @@ - + -Node1->Node63 +Node1->Node62 - + -Node75 +Node74 VortexEngine/src/Patterns @@ -140,15 +140,15 @@ - + -Node1->Node75 +Node1->Node74 - + -Node76 +Node75 VortexEngine/src/Patterns @@ -156,15 +156,15 @@ - + -Node1->Node76 +Node1->Node75 - + -Node77 +Node76 VortexEngine/src/Patterns @@ -172,15 +172,15 @@ - + -Node1->Node77 +Node1->Node76 - + -Node80 +Node79 VortexEngine/src/Patterns @@ -188,15 +188,15 @@ - + -Node1->Node80 +Node1->Node79 - + -Node98 +Node97 VortexEngine/src/Time @@ -204,15 +204,15 @@ - + -Node1->Node98 +Node1->Node97 - + -Node105 +Node104 VortexEngine/src/Time @@ -220,9 +220,9 @@ - + -Node1->Node105 +Node1->Node104 @@ -868,387 +868,387 @@ - + -Node44->Node3 +Node43->Node3 - + -Node49->Node4 +Node48->Node4 - + -Node57->Node4 +Node56->Node4 - + -Node57->Node5 +Node56->Node5 - + -Node57->Node8 +Node56->Node8 - + -Node57->Node10 +Node56->Node10 - + -Node57->Node11 +Node56->Node11 - + -Node57->Node12 +Node56->Node12 - + -Node58->Node7 +Node57->Node7 - + -Node58->Node14 +Node57->Node14 - + -Node58->Node60 +Node57->Node59 - + -Node60->Node4 +Node59->Node4 - + -Node60->Node5 +Node59->Node5 - + -Node60->Node6 +Node59->Node6 - + -Node60->Node7 +Node59->Node7 - + -Node60->Node9 +Node59->Node9 - + -Node60->Node11 +Node59->Node11 - + -Node60->Node13 +Node59->Node13 - + -Node60->Node14 +Node59->Node14 - + -Node60->Node49 +Node59->Node48 - + -Node60->Node57 +Node59->Node56 - + -Node63->Node17 +Node62->Node17 - + -Node75->Node26 +Node74->Node26 - + -Node76->Node29 +Node75->Node29 - + -Node76->Node77 +Node75->Node76 - + -Node77->Node30 +Node76->Node30 - + -Node80->Node5 +Node79->Node5 - + -Node80->Node7 +Node79->Node7 - + -Node80->Node8 +Node79->Node8 - + -Node80->Node10 +Node79->Node10 - + -Node80->Node11 +Node79->Node11 - + -Node80->Node13 +Node79->Node13 - + -Node80->Node14 +Node79->Node14 - + -Node98->Node3 +Node97->Node3 - + -Node98->Node4 +Node97->Node4 - + -Node98->Node5 +Node97->Node5 - + -Node98->Node6 +Node97->Node6 - + -Node98->Node7 +Node97->Node7 - + -Node98->Node8 +Node97->Node8 - + -Node98->Node9 +Node97->Node9 - + -Node98->Node10 +Node97->Node10 - + -Node98->Node12 +Node97->Node12 - + -Node98->Node13 +Node97->Node13 - + -Node98->Node14 +Node97->Node14 - + -Node98->Node17 +Node97->Node17 - + -Node98->Node18 +Node97->Node18 - + -Node98->Node23 +Node97->Node23 - + -Node98->Node24 +Node97->Node24 - + -Node98->Node25 +Node97->Node25 - + -Node98->Node26 +Node97->Node26 - + -Node98->Node27 +Node97->Node27 - + -Node98->Node28 +Node97->Node28 - + -Node98->Node32 +Node97->Node32 - + -Node98->Node34 +Node97->Node34 - + -Node98->Node35 +Node97->Node35 - + -Node98->Node36 +Node97->Node36 - + -Node98->Node37 +Node97->Node37 - + -Node98->Node38 +Node97->Node38 - + -Node98->Node39 +Node97->Node39 - + -Node105->Node8 +Node104->Node8 - + -Node105->Node63 +Node104->Node62 - + -Node105->Node75 +Node104->Node74 - + -Node105->Node76 +Node104->Node75 - + -Node105->Node77 +Node104->Node76 diff --git a/docs/duo/Leds_8cpp_source.html b/docs/duo/Leds_8cpp_source.html index 510144dfc8..2bae17d1a9 100644 --- a/docs/duo/Leds_8cpp_source.html +++ b/docs/duo/Leds_8cpp_source.html @@ -607,7 +607,7 @@
uint8_t red
Definition: ColorTypes.h:88
uint8_t green
Definition: ColorTypes.h:89
static uint32_t getCurtime()
Definition: TimeControl.h:40
-
static void delayMilliseconds(uint32_t ms)
+
static void delayMilliseconds(uint32_t ms)
diff --git a/docs/duo/Leds_8h__dep__incl.md5 b/docs/duo/Leds_8h__dep__incl.md5 index 7b6535a36a..7d37472707 100644 --- a/docs/duo/Leds_8h__dep__incl.md5 +++ b/docs/duo/Leds_8h__dep__incl.md5 @@ -1 +1 @@ -c1225afa6b07d43c6e4c11e85920411d \ No newline at end of file +15a990368ef5a3108fe9e967d67c10d7 \ No newline at end of file diff --git a/docs/duo/Leds_8h__dep__incl.svg b/docs/duo/Leds_8h__dep__incl.svg index 62ef5177a3..7bd3001170 100644 --- a/docs/duo/Leds_8h__dep__incl.svg +++ b/docs/duo/Leds_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-1'; Node1 - -VortexEngine/src/Leds -/Leds.h + +VortexEngine/src/Leds +/Leds.h @@ -77,8 +77,8 @@ var sectionId = 'dynsection-1'; Node1->Node2 - - + + @@ -93,8 +93,8 @@ var sectionId = 'dynsection-1'; Node1->Node3 - - + + @@ -109,8 +109,8 @@ var sectionId = 'dynsection-1'; Node1->Node4 - - + + @@ -125,8 +125,8 @@ var sectionId = 'dynsection-1'; Node1->Node5 - - + + @@ -141,8 +141,8 @@ var sectionId = 'dynsection-1'; Node1->Node6 - - + + @@ -157,8 +157,8 @@ var sectionId = 'dynsection-1'; Node1->Node7 - - + + @@ -173,8 +173,8 @@ var sectionId = 'dynsection-1'; Node1->Node8 - - + + @@ -189,8 +189,8 @@ var sectionId = 'dynsection-1'; Node1->Node9 - - + + @@ -205,8 +205,8 @@ var sectionId = 'dynsection-1'; Node1->Node10 - - + + @@ -221,8 +221,8 @@ var sectionId = 'dynsection-1'; Node1->Node11 - - + + @@ -237,8 +237,8 @@ var sectionId = 'dynsection-1'; Node1->Node12 - - + + @@ -253,8 +253,8 @@ var sectionId = 'dynsection-1'; Node1->Node13 - - + + @@ -269,8 +269,8 @@ var sectionId = 'dynsection-1'; Node1->Node14 - - + + @@ -282,10 +282,10 @@ var sectionId = 'dynsection-1'; - + Node1->Node15 - - + + @@ -300,8 +300,8 @@ var sectionId = 'dynsection-1'; Node1->Node16 - - + + @@ -316,8 +316,8 @@ var sectionId = 'dynsection-1'; Node1->Node17 - - + + @@ -332,8 +332,8 @@ var sectionId = 'dynsection-1'; Node1->Node18 - - + + @@ -348,8 +348,8 @@ var sectionId = 'dynsection-1'; Node1->Node19 - - + + @@ -364,8 +364,8 @@ var sectionId = 'dynsection-1'; Node1->Node20 - - + + @@ -380,8 +380,8 @@ var sectionId = 'dynsection-1'; Node1->Node21 - - + + @@ -396,8 +396,8 @@ var sectionId = 'dynsection-1'; Node1->Node22 - - + + @@ -412,8 +412,8 @@ var sectionId = 'dynsection-1'; Node1->Node23 - - + + @@ -428,8 +428,8 @@ var sectionId = 'dynsection-1'; Node1->Node24 - - + + @@ -444,8 +444,8 @@ var sectionId = 'dynsection-1'; Node1->Node25 - - + + @@ -460,8 +460,8 @@ var sectionId = 'dynsection-1'; Node1->Node26 - - + + @@ -476,8 +476,8 @@ var sectionId = 'dynsection-1'; Node1->Node27 - - + + @@ -492,8 +492,8 @@ var sectionId = 'dynsection-1'; Node1->Node28 - - + + @@ -508,8 +508,8 @@ var sectionId = 'dynsection-1'; Node1->Node29 - - + + @@ -524,8 +524,8 @@ var sectionId = 'dynsection-1'; Node1->Node30 - - + + @@ -540,8 +540,8 @@ var sectionId = 'dynsection-1'; Node1->Node31 - - + + @@ -556,8 +556,8 @@ var sectionId = 'dynsection-1'; Node1->Node32 - - + + @@ -572,8 +572,8 @@ var sectionId = 'dynsection-1'; Node1->Node33 - - + + @@ -588,8 +588,8 @@ var sectionId = 'dynsection-1'; Node1->Node34 - - + + @@ -604,8 +604,8 @@ var sectionId = 'dynsection-1'; Node1->Node35 - - + + @@ -620,8 +620,8 @@ var sectionId = 'dynsection-1'; Node1->Node36 - - + + @@ -636,8 +636,8 @@ var sectionId = 'dynsection-1'; Node1->Node37 - - + + @@ -652,72 +652,56 @@ var sectionId = 'dynsection-1'; Node1->Node38 - - + + Node39 - - -VortexEngine/src/Storage -/Storage.cpp + + +VortexEngine/src/Time +/TimeControl.cpp Node1->Node39 - - + + Node40 - - -VortexEngine/src/Time -/TimeControl.cpp + + +VortexEngine/src/Wireless +/VLReceiver.cpp - + Node1->Node40 - - + + Node41 - - -VortexEngine/src/Wireless -/VLReceiver.cpp + + +VortexEngine/src/Wireless +/VLSender.cpp Node1->Node41 - - - - - -Node42 - - -VortexEngine/src/Wireless -/VLSender.cpp - - - - - -Node1->Node42 - - + + diff --git a/docs/duo/Leds_8h__dep__incl_org.svg b/docs/duo/Leds_8h__dep__incl_org.svg index f65fc02b55..b6f941e85a 100644 --- a/docs/duo/Leds_8h__dep__incl_org.svg +++ b/docs/duo/Leds_8h__dep__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Leds/Leds.h Node1 - -VortexEngine/src/Leds -/Leds.h + +VortexEngine/src/Leds +/Leds.h @@ -31,8 +31,8 @@ Node1->Node2 - - + + @@ -47,8 +47,8 @@ Node1->Node3 - - + + @@ -63,8 +63,8 @@ Node1->Node4 - - + + @@ -79,8 +79,8 @@ Node1->Node5 - - + + @@ -95,8 +95,8 @@ Node1->Node6 - - + + @@ -111,8 +111,8 @@ Node1->Node7 - - + + @@ -127,8 +127,8 @@ Node1->Node8 - - + + @@ -143,8 +143,8 @@ Node1->Node9 - - + + @@ -159,8 +159,8 @@ Node1->Node10 - - + + @@ -175,8 +175,8 @@ Node1->Node11 - - + + @@ -191,8 +191,8 @@ Node1->Node12 - - + + @@ -207,8 +207,8 @@ Node1->Node13 - - + + @@ -223,8 +223,8 @@ Node1->Node14 - - + + @@ -236,10 +236,10 @@ - + Node1->Node15 - - + + @@ -254,8 +254,8 @@ Node1->Node16 - - + + @@ -270,8 +270,8 @@ Node1->Node17 - - + + @@ -286,8 +286,8 @@ Node1->Node18 - - + + @@ -302,8 +302,8 @@ Node1->Node19 - - + + @@ -318,8 +318,8 @@ Node1->Node20 - - + + @@ -334,8 +334,8 @@ Node1->Node21 - - + + @@ -350,8 +350,8 @@ Node1->Node22 - - + + @@ -366,8 +366,8 @@ Node1->Node23 - - + + @@ -382,8 +382,8 @@ Node1->Node24 - - + + @@ -398,8 +398,8 @@ Node1->Node25 - - + + @@ -414,8 +414,8 @@ Node1->Node26 - - + + @@ -430,8 +430,8 @@ Node1->Node27 - - + + @@ -446,8 +446,8 @@ Node1->Node28 - - + + @@ -462,8 +462,8 @@ Node1->Node29 - - + + @@ -478,8 +478,8 @@ Node1->Node30 - - + + @@ -494,8 +494,8 @@ Node1->Node31 - - + + @@ -510,8 +510,8 @@ Node1->Node32 - - + + @@ -526,8 +526,8 @@ Node1->Node33 - - + + @@ -542,8 +542,8 @@ Node1->Node34 - - + + @@ -558,8 +558,8 @@ Node1->Node35 - - + + @@ -574,8 +574,8 @@ Node1->Node36 - - + + @@ -590,8 +590,8 @@ Node1->Node37 - - + + @@ -606,72 +606,56 @@ Node1->Node38 - - + + Node39 - - -VortexEngine/src/Storage -/Storage.cpp + + +VortexEngine/src/Time +/TimeControl.cpp Node1->Node39 - - + + Node40 - - -VortexEngine/src/Time -/TimeControl.cpp + + +VortexEngine/src/Wireless +/VLReceiver.cpp - + Node1->Node40 - - + + Node41 - - -VortexEngine/src/Wireless -/VLReceiver.cpp + + +VortexEngine/src/Wireless +/VLSender.cpp Node1->Node41 - - - - - -Node42 - - -VortexEngine/src/Wireless -/VLSender.cpp - - - - - -Node1->Node42 - - + + diff --git a/docs/duo/Log_8h_source.html b/docs/duo/Log_8h_source.html index 3381450f1e..a190c546c2 100644 --- a/docs/duo/Log_8h_source.html +++ b/docs/duo/Log_8h_source.html @@ -120,7 +120,7 @@
31 #endif
32 
33 #if LOGGING_LEVEL > 2
-
34 // arduino compiler won't allow for ellipsis macro that's passed no args...
+
34 // some compilers won't allow for ellipsis macro that's passed no args...
35 #define DEBUG_LOG(msg) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg)
36 #define DEBUG_LOGF(msg, ...) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg, __VA_ARGS__)
37 // debug messages are only in debug builds so they have full file + func + line info
diff --git a/docs/duo/Memory_8cpp_source.html b/docs/duo/Memory_8cpp_source.html index a4ff0bf6a8..f0864fc7ce 100644 --- a/docs/duo/Memory_8cpp_source.html +++ b/docs/duo/Memory_8cpp_source.html @@ -235,7 +235,7 @@
#define vfree(ptr)
Definition: Memory.h:35
#define vmalloc(size)
Definition: Memory.h:32
-
#define MAX_MEMORY
Definition: VortexConfig.h:228
+
#define MAX_MEMORY
Definition: VortexConfig.h:227
diff --git a/docs/duo/Menus_8cpp.html b/docs/duo/Menus_8cpp.html index 32af2cecab..9dfc1098fa 100644 --- a/docs/duo/Menus_8cpp.html +++ b/docs/duo/Menus_8cpp.html @@ -270,12 +270,12 @@

ENTRY(FactoryReset, RGB_MENU_FACTORY_RESET),
}
#define ENTRY(classname, color)
Definition: Menus.cpp:49
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:455
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:461
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:464
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:449
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:458
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:446
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:454
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:460
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:463
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:448
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:457
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:445
diff --git a/docs/duo/Menus_8cpp_source.html b/docs/duo/Menus_8cpp_source.html index b71b7f4b60..179c85e3cb 100644 --- a/docs/duo/Menus_8cpp_source.html +++ b/docs/duo/Menus_8cpp_source.html @@ -406,13 +406,13 @@
#define HYPERSTROBE_OFF_DURATION
Definition: Timings.h:41
#define ADV_MENU_DURATION_TICKS
Definition: Timings.h:27
#define ADVANCED_MENU_CLICKS
Definition: VortexConfig.h:92
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:455
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:461
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:464
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:449
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:458
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:446
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:452
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:454
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:460
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:463
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:448
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:457
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:445
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:451
uint32_t holdDuration() const
Definition: Button.h:54
uint32_t pressTime() const
Definition: Button.h:49
bool onShortClick() const
Definition: Button.h:41
diff --git a/docs/duo/Modes_8cpp_source.html b/docs/duo/Modes_8cpp_source.html index 46621ee259..52dc6e46f9 100644 --- a/docs/duo/Modes_8cpp_source.html +++ b/docs/duo/Modes_8cpp_source.html @@ -157,7 +157,7 @@
68  return;
69  }
70  // shortclick either turns off the lights, cycles to the next mode
-
71  // or possible locks the lights based on the situation
+
71  // or possibly locks the lights based on the situation
72  if (g_pButton->onShortClick()) {
74  // enter sleep doesn't return on arduino, but it does on vortexlib
@@ -374,7 +374,7 @@
285 #else
286  // add each default mode with each of the given colors
287  for (uint8_t i = 0; i < MAX_MODES; ++i) {
-
288  Mode defMode(defaultModes[i]);
+
288  Mode defMode(defaultModes[i]);
289  if (!addMode(&defMode)) {
290  ERROR_LOGF("Failed to add default mode %u", i);
291  return false;
@@ -1082,7 +1082,7 @@
#define RGB_GREEN
#define RGB_WHITE
#define RGB_YELLOW
-
const DefaultModeEntry defaultModes[]
Definition: DefaultModes.cpp:7
+
const DefaultModeEntry defaultModes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:20
@@ -1106,8 +1106,8 @@
@ PATTERN_FIRST
Definition: Patterns.h:18
@ PATTERN_LAST
Definition: Patterns.h:100
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:164
-
#define STORAGE_SIZE
Definition: VortexConfig.h:522
-
#define MAX_MODES
Definition: VortexConfig.h:189
+
#define STORAGE_SIZE
Definition: VortexConfig.h:527
+
#define MAX_MODES
Definition: VortexConfig.h:188
bool onShortClick() const
Definition: Button.h:41
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
@@ -1191,8 +1191,8 @@
uint8_t blue
Definition: ColorTypes.h:90
uint8_t red
Definition: ColorTypes.h:88
uint8_t green
Definition: ColorTypes.h:89
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:60
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:112
+
static bool write(ByteStream &buffer)
Definition: Storage.cpp:61
+
static bool read(ByteStream &buffer)
Definition: Storage.cpp:115
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool serializeVersion(ByteStream &stream)
static void enterSleep(bool save=true)
diff --git a/docs/duo/PatternBuilder_8cpp_source.html b/docs/duo/PatternBuilder_8cpp_source.html index 5f1a7ea798..c583a1e566 100644 --- a/docs/duo/PatternBuilder_8cpp_source.html +++ b/docs/duo/PatternBuilder_8cpp_source.html @@ -242,12 +242,12 @@
153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/duo/Randomizer_8cpp_source.html b/docs/duo/Randomizer_8cpp_source.html index 75df2483d0..5cd1cce343 100644 --- a/docs/duo/Randomizer_8cpp_source.html +++ b/docs/duo/Randomizer_8cpp_source.html @@ -285,100 +285,99 @@
196  crushPattern(ctx, args);
197  break;
198  }
-
199 
-
200  PatternID newPat = PATTERN_STROBE;
-
201  // 1/3 chance to roll a blend pattern instead which will animate between
-
202  // colors instead of blinking each color in the set
-
203  if (!ctx.next8(0, 3)) {
-
204  newPat = PATTERN_BLEND;
-
205  // this is the number of blinks to a complementary color
-
206  args.arg7 = ctx.next8(0, 3);
-
207  }
-
208  return pMode->setPattern(newPat, pos, &args);
-
209 }
-
210 
- -
212 {
-
213  outArgs.init(
-
214  ctx.next8(1, 20), // on duration 1 -> 20
-
215  ctx.next8(8, 60) // off duration 0 -> 60
-
216  );
-
217 }
-
218 
- -
220 {
-
221  outArgs.init(
-
222  ctx.next8(1, 10), // on duration 1 -> 10
-
223  ctx.next8(0, 6), // off duration 0 -> 6
-
224  ctx.next8(40, 100) // gap duration 40 -> 100
-
225  );
-
226 }
-
227 
- -
229 {
-
230  outArgs.init(
-
231  ctx.next8(1, 10), // on duration 1 -> 10
-
232  ctx.next8(0, 10), // off duration 0 -> 10
-
233  ctx.next8(20, 30), // need gap 20 -> 30
-
234  ctx.next8(20, 30) // dash duration 20 -> 30
-
235  );
-
236 }
-
237 
- -
239 {
-
240  outArgs.init(
-
241  ctx.next8(1, 10), // on duration 1 -> 10
-
242  ctx.next8(0, 10), // off duration 0 -> 5
-
243  ctx.next8(20, 40), // need gap 20 -> 40
-
244  0, // dash 0
-
245  ctx.next8(0, 8) // groupsize 0 to 8
-
246  );
-
247 }
-
248 
- -
250 {
-
251  PatternID newPat;
-
252  // the random range begin/end
-
253  do {
-
254  // continuously re-randomize the pattern so we don't get undesirable patterns
- -
256  } while (newPat == PATTERN_SOLID || newPat == PATTERN_RIBBON || newPat == PATTERN_MINIRIBBON);
-
257  return newPat;
-
258 }
-
259 
- -
261 {
- -
263  // grab local reference to the target random context
-
264  Random &ctx = m_singlesRandCtx[pos];
-
265  if (m_flags & RANDOMIZE_PATTERN) {
-
266  // roll a new pattern
-
267  if (m_advanced) {
-
268  if (!rollPattern(ctx, &m_previewMode, pos)) {
-
269  ERROR_LOG("Failed to roll new pattern");
-
270  return false;
-
271  }
-
272  } else {
-
273  if (!m_previewMode.setPattern(rollPatternID(ctx), pos)) {
-
274  ERROR_LOG("Failed to roll new pattern");
-
275  return false;
-
276  }
-
277  }
-
278  }
-
279  if (m_flags & RANDOMIZE_COLORSET) {
-
280  // roll a new colorset
-
281  if (!m_previewMode.setColorset(rollColorset(ctx), pos)) {
-
282  ERROR_LOG("Failed to roll new colorset");
-
283  return false;
-
284  }
-
285  }
-
286  }
-
287  // initialize the mode with the new pattern and colorset
- -
289  DEBUG_LOGF("Randomized Led %u set with randomization technique %u, %u colors, and Pattern number %u",
-
290  pos, randType, randomSet.numColors(), newPat);
-
291  return true;
-
292 }
+
199  PatternID newPat = PATTERN_STROBE;
+
200  // 1/3 chance to roll a blend pattern instead which will animate between
+
201  // colors instead of blinking each color in the set
+
202  if (!ctx.next8(0, 3)) {
+
203  newPat = PATTERN_BLEND;
+
204  // this is the number of blinks to a complementary color
+
205  args.arg7 = ctx.next8(0, 3);
+
206  }
+
207  return pMode->setPattern(newPat, pos, &args);
+
208 }
+
209 
+ +
211 {
+
212  outArgs.init(
+
213  ctx.next8(1, 20), // on duration 1 -> 20
+
214  ctx.next8(8, 60) // off duration 0 -> 60
+
215  );
+
216 }
+
217 
+ +
219 {
+
220  outArgs.init(
+
221  ctx.next8(1, 10), // on duration 1 -> 10
+
222  ctx.next8(0, 6), // off duration 0 -> 6
+
223  ctx.next8(40, 100) // gap duration 40 -> 100
+
224  );
+
225 }
+
226 
+ +
228 {
+
229  outArgs.init(
+
230  ctx.next8(1, 10), // on duration 1 -> 10
+
231  ctx.next8(0, 10), // off duration 0 -> 10
+
232  ctx.next8(20, 30), // need gap 20 -> 30
+
233  ctx.next8(20, 30) // dash duration 20 -> 30
+
234  );
+
235 }
+
236 
+ +
238 {
+
239  outArgs.init(
+
240  ctx.next8(1, 10), // on duration 1 -> 10
+
241  ctx.next8(0, 10), // off duration 0 -> 5
+
242  ctx.next8(20, 40), // need gap 20 -> 40
+
243  0, // dash 0
+
244  ctx.next8(0, 8) // groupsize 0 to 8
+
245  );
+
246 }
+
247 
+ +
249 {
+
250  PatternID newPat;
+
251  // the random range begin/end
+
252  do {
+
253  // continuously re-randomize the pattern so we don't get undesirable patterns
+ +
255  } while (newPat == PATTERN_SOLID || newPat == PATTERN_RIBBON || newPat == PATTERN_MINIRIBBON);
+
256  return newPat;
+
257 }
+
258 
+ +
260 {
+ +
262  // grab local reference to the target random context
+
263  Random &ctx = m_singlesRandCtx[pos];
+
264  if (m_flags & RANDOMIZE_PATTERN) {
+
265  // roll a new pattern
+
266  if (m_advanced) {
+
267  if (!rollPattern(ctx, &m_previewMode, pos)) {
+
268  ERROR_LOG("Failed to roll new pattern");
+
269  return false;
+
270  }
+
271  } else {
+
272  if (!m_previewMode.setPattern(rollPatternID(ctx), pos)) {
+
273  ERROR_LOG("Failed to roll new pattern");
+
274  return false;
+
275  }
+
276  }
+
277  }
+
278  if (m_flags & RANDOMIZE_COLORSET) {
+
279  // roll a new colorset
+
280  if (!m_previewMode.setColorset(rollColorset(ctx), pos)) {
+
281  ERROR_LOG("Failed to roll new colorset");
+
282  return false;
+
283  }
+
284  }
+
285  }
+
286  // initialize the mode with the new pattern and colorset
+ +
288  DEBUG_LOGF("Randomized Led %u set with randomization technique %u, %u colors, and Pattern number %u",
+
289  pos, randType, randomSet.numColors(), newPat);
+
290  return true;
+
291 }
Button * g_pButton
Definition: Buttons.cpp:16
#define RGB_OFF
#define RGB_WHITE1
@@ -402,7 +401,7 @@
@ PATTERN_BLEND
Definition: Patterns.h:50
#define DOPS_ON_DURATION
Definition: Timings.h:48
-
#define AUTO_RANDOM_DELAY_TICKS
Definition: Timings.h:16
+
#define AUTO_RANDOM_DELAY_TICKS
Definition: Timings.h:15
#define DOPS_OFF_DURATION
Definition: Timings.h:49
#define AUTO_CYCLE_RANDOMIZER_CLICKS
Definition: VortexConfig.h:126
bool onRelease() const
Definition: Button.h:36
@@ -449,21 +448,21 @@
Definition: Random.h:6
uint8_t next8(uint8_t minValue=0, uint8_t maxValue=0xFF)
Definition: Random.cpp:41
void seed(uint32_t newseed)
Definition: Random.cpp:18
-
void crushPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:238
-
PatternID rollPatternID(Random &ctx)
Definition: Randomizer.cpp:249
+
void crushPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:237
+
PatternID rollPatternID(Random &ctx)
Definition: Randomizer.cpp:248
void onLongClick() override
Definition: Randomizer.cpp:100
@ RANDOMIZE_PATTERN
Definition: Randomizer.h:41
@ RANDOMIZE_BOTH
Definition: Randomizer.h:44
@ RANDOMIZE_COLORSET
Definition: Randomizer.h:40
-
void gapPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:219
+
void gapPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:218
void onShortClick() override
Definition: Randomizer.cpp:86
Randomizer(const RGBColor &col, bool advanced)
Definition: Randomizer.cpp:17
-
void dashPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:228
+
void dashPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:227
Random m_singlesRandCtx[LED_COUNT]
Definition: Randomizer.h:29
bool rollPattern(Random &ctx, Mode *pMode, LedPos pos)
Definition: Randomizer.cpp:178
-
bool reRoll()
Definition: Randomizer.cpp:260
+
bool reRoll()
Definition: Randomizer.cpp:259
bool m_autoCycle
Definition: Randomizer.h:56
uint8_t m_flags
Definition: Randomizer.h:48
Colorset rollColorset(Random &ctx)
Definition: Randomizer.cpp:129
@@ -472,7 +471,7 @@
uint8_t m_displayHue
Definition: Randomizer.h:51
MenuAction run() override
Definition: Randomizer.cpp:52
bool m_needToSelect
Definition: Randomizer.h:54
-
void traditionalPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:211
+
void traditionalPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:210
bool init() override
Definition: Randomizer.cpp:31
static uint32_t getCurtime()
Definition: TimeControl.h:40
diff --git a/docs/duo/Randomizer_8h_source.html b/docs/duo/Randomizer_8h_source.html index 33454b113d..db14dc8d0d 100644 --- a/docs/duo/Randomizer_8h_source.html +++ b/docs/duo/Randomizer_8h_source.html @@ -171,22 +171,22 @@
Definition: Random.h:6
-
void crushPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:238
-
PatternID rollPatternID(Random &ctx)
Definition: Randomizer.cpp:249
+
void crushPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:237
+
PatternID rollPatternID(Random &ctx)
Definition: Randomizer.cpp:248
void onLongClick() override
Definition: Randomizer.cpp:100
@ RANDOMIZE_PATTERN
Definition: Randomizer.h:41
@ RANDOMIZE_NONE
Definition: Randomizer.h:37
@ RANDOMIZE_BOTH
Definition: Randomizer.h:44
@ RANDOMIZE_COLORSET
Definition: Randomizer.h:40
-
void gapPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:219
+
void gapPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:218
void onShortClick() override
Definition: Randomizer.cpp:86
Randomizer(const RGBColor &col, bool advanced)
Definition: Randomizer.cpp:17
-
void dashPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:228
+
void dashPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:227
Random m_singlesRandCtx[LED_COUNT]
Definition: Randomizer.h:29
bool rollPattern(Random &ctx, Mode *pMode, LedPos pos)
Definition: Randomizer.cpp:178
-
bool reRoll()
Definition: Randomizer.cpp:260
+
bool reRoll()
Definition: Randomizer.cpp:259
bool m_autoCycle
Definition: Randomizer.h:56
uint8_t m_flags
Definition: Randomizer.h:48
Colorset rollColorset(Random &ctx)
Definition: Randomizer.cpp:129
@@ -195,7 +195,7 @@
uint8_t m_displayHue
Definition: Randomizer.h:51
MenuAction run() override
Definition: Randomizer.cpp:52
bool m_needToSelect
Definition: Randomizer.h:54
-
void traditionalPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:211
+
void traditionalPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:210
bool init() override
Definition: Randomizer.cpp:31
diff --git a/docs/duo/Storage_8cpp.html b/docs/duo/Storage_8cpp.html index 3f3d34c806..1acf97c2ae 100644 --- a/docs/duo/Storage_8cpp.html +++ b/docs/duo/Storage_8cpp.html @@ -96,13 +96,10 @@ #include "../Memory/Memory.h"
#include "../Serial/ByteStream.h"
#include "../Log/Log.h"
-#include "../Leds/Leds.h"
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <util/delay.h>
-#include <unistd.h>
-#include <stdio.h>
Include dependency graph for Storage.cpp:
@@ -132,7 +129,7 @@

-

Definition at line 30 of file Storage.cpp.

+

Definition at line 31 of file Storage.cpp.

@@ -148,7 +145,7 @@

-

Definition at line 36 of file Storage.cpp.

+

Definition at line 37 of file Storage.cpp.

diff --git a/docs/duo/Storage_8cpp__incl.md5 b/docs/duo/Storage_8cpp__incl.md5 index 2c88b0cb38..976128ec73 100644 --- a/docs/duo/Storage_8cpp__incl.md5 +++ b/docs/duo/Storage_8cpp__incl.md5 @@ -1 +1 @@ -7c7b729d171d3a6fd466d52f420df17d \ No newline at end of file +8a03ff7d7248a4af267842613b388554 \ No newline at end of file diff --git a/docs/duo/Storage_8cpp__incl.svg b/docs/duo/Storage_8cpp__incl.svg index 29a8df8fc3..f69cdabb45 100644 --- a/docs/duo/Storage_8cpp__incl.svg +++ b/docs/duo/Storage_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -76,383 +76,266 @@ var sectionId = 'dynsection-0'; Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - - -../Leds/Leds.h + + +avr/io.h Node1->Node13 - - + + - - -Node16 - - -avr/io.h - - - - - -Node1->Node16 - - - - - -Node17 - - -avr/pgmspace.h - - - - - -Node1->Node17 - - - - - -Node18 - - -avr/interrupt.h - - - - - -Node1->Node18 - - - - - -Node19 - - -util/delay.h + + +Node14 + + +avr/pgmspace.h - - -Node1->Node19 - - + + +Node1->Node14 + + - - -Node20 - - -unistd.h + + +Node15 + + +avr/interrupt.h - - -Node1->Node20 - - + + +Node1->Node15 + + - - -Node21 - - -stdio.h + + +Node16 + + +util/delay.h - - -Node1->Node21 - - + + +Node1->Node16 + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - - - - -Node13->Node3 - - - - - -Node14 - - -../Colors/ColorTypes.h - - - - - -Node13->Node14 - - - - - -Node15 - - -LedTypes.h - - - - - -Node13->Node15 - - - - - -Node14->Node3 - - - - - -Node14->Node6 - - - - - -Node14->Node7 - - - - - -Node15->Node3 - - - - - -Node15->Node6 - - - - - -Node15->Node11 - - + + diff --git a/docs/duo/Storage_8cpp__incl_org.svg b/docs/duo/Storage_8cpp__incl_org.svg index bf37c20bf0..79a985756a 100644 --- a/docs/duo/Storage_8cpp__incl_org.svg +++ b/docs/duo/Storage_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Storage/Storage.cpp Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -30,383 +30,266 @@ Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - - -../Leds/Leds.h + + +avr/io.h Node1->Node13 - - + + - - -Node16 - - -avr/io.h - - - - - -Node1->Node16 - - - - - -Node17 - - -avr/pgmspace.h - - - - - -Node1->Node17 - - - - - -Node18 - - -avr/interrupt.h - - - - - -Node1->Node18 - - - - - -Node19 - - -util/delay.h + + +Node14 + + +avr/pgmspace.h - - -Node1->Node19 - - + + +Node1->Node14 + + - - -Node20 - - -unistd.h + + +Node15 + + +avr/interrupt.h - - -Node1->Node20 - - + + +Node1->Node15 + + - - -Node21 - - -stdio.h + + +Node16 + + +util/delay.h - - -Node1->Node21 - - + + +Node1->Node16 + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - - - - -Node13->Node3 - - - - - -Node14 - - -../Colors/ColorTypes.h - - - - - -Node13->Node14 - - - - - -Node15 - - -LedTypes.h - - - - - -Node13->Node15 - - - - - -Node14->Node3 - - - - - -Node14->Node6 - - - - - -Node14->Node7 - - - - - -Node15->Node3 - - - - - -Node15->Node6 - - - - - -Node15->Node11 - - + + diff --git a/docs/duo/Storage_8cpp_source.html b/docs/duo/Storage_8cpp_source.html index 1d0c274e81..f0dd7f64b8 100644 --- a/docs/duo/Storage_8cpp_source.html +++ b/docs/duo/Storage_8cpp_source.html @@ -96,234 +96,238 @@
7 #include "../Memory/Memory.h"
8 #include "../Serial/ByteStream.h"
9 #include "../Log/Log.h"
-
10 #include "../Leds/Leds.h"
-
11 
-
12 #ifdef VORTEX_EMBEDDED
-
13 #include <avr/io.h>
-
14 #include <avr/pgmspace.h>
-
15 #include <avr/interrupt.h>
-
16 #include <util/delay.h>
-
17 #endif
-
18 
-
19 #ifdef VORTEX_LIB
-
20 #include "../VortexLib/VortexLib.h"
-
21 #endif
-
22 
+
10 
+
11 #ifdef VORTEX_EMBEDDED
+
12 #include <avr/io.h>
+
13 #include <avr/pgmspace.h>
+
14 #include <avr/interrupt.h>
+
15 #include <util/delay.h>
+
16 #endif
+
17 
+
18 #ifdef VORTEX_LIB
+
19 #include "../VortexLib/VortexLib.h"
+
20 #endif
+
21 
+
22 #ifndef VORTEX_EMBEDDED
23 #ifdef _WIN32
24 #include <Windows.h>
25 #else
26 #include <unistd.h>
27 #include <stdio.h>
28 #endif
-
29 
-
30 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
-
31 
-
32 #ifdef VORTEX_LIB
-
33 std::string Storage::m_storageFilename;
-
34 #define STORAGE_FILENAME m_storageFilename.c_str()
-
35 #else
-
36 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
-
37 #endif
-
38 
-
39 uint32_t Storage::m_lastSaveSize = 0;
-
40 
- -
42 {
-
43 }
-
44 
- -
46 {
-
47 #ifdef VORTEX_LIB
-
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
50  }
-
51 #endif
-
52  return true;
-
53 }
-
54 
- -
56 {
-
57 }
-
58 
-
59 // store a serial buffer to storage
- -
61 {
-
62 #ifdef VORTEX_LIB
-
63  if (!Vortex::storageEnabled()) {
-
64  // success so the system thinks it all worked
-
65  return true;
-
66  }
-
67 #endif
-
68  // Check size
-
69  uint16_t size = buffer.rawSize();
-
70  if (!size || size > STORAGE_SIZE) {
-
71  ERROR_LOG("Buffer too big for storage space");
-
72  return false;
-
73  }
-
74 #ifdef VORTEX_EMBEDDED
-
75  const uint8_t *buf = (const uint8_t *)buffer.rawData();
-
76  // start writing to eeprom
-
77  for (uint16_t i = 0; i < size; ++i) {
-
78  if (buf[i] != eepromReadByte(i)) {
-
79  eepromWriteByte(i, buf[i]);
-
80  }
-
81  }
-
82  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
83  if ((NVMCTRL.STATUS & 4) != 0) {
-
84  return false;
-
85  }
-
86 #elif defined(_WIN32)
-
87  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
88  if (hFile == INVALID_HANDLE_VALUE) {
-
89  // error
-
90  return false;
-
91  }
-
92  DWORD written = 0;
-
93  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
94  // error
-
95  return false;
-
96  }
-
97  CloseHandle(hFile);
-
98 #else
-
99  FILE *f = fopen(STORAGE_FILENAME, "w");
-
100  if (!f) {
-
101  return false;
-
102  }
-
103  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
+
29 #endif
+
30 
+
31 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
32 
+
33 #ifdef VORTEX_LIB
+
34 std::string Storage::m_storageFilename;
+
35 #define STORAGE_FILENAME m_storageFilename.c_str()
+
36 #else
+
37 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
+
38 #endif
+
39 
+
40 uint32_t Storage::m_lastSaveSize = 0;
+
41 
+ +
43 {
+
44 }
+
45 
+ +
47 {
+
48 #ifdef VORTEX_LIB
+
49  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
50  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
51  }
+
52 #endif
+
53  return true;
+
54 }
+
55 
+ +
57 {
+
58 }
+
59 
+
60 // store a serial buffer to storage
+ +
62 {
+
63 #ifdef VORTEX_LIB
+
64  if (!Vortex::storageEnabled()) {
+
65  // success so the system thinks it all worked
+
66  return true;
+
67  }
+
68 #endif
+
69  // Check size
+
70  uint16_t size = buffer.rawSize();
+
71  if (!size || size > STORAGE_SIZE) {
+
72  ERROR_LOG("Buffer too big for storage space");
+
73  return false;
+
74  }
+
75  // just in case
+
76  buffer.recalcCRC();
+
77 #ifdef VORTEX_EMBEDDED
+
78  const uint8_t *buf = (const uint8_t *)buffer.rawData();
+
79  // start writing to eeprom
+
80  for (uint16_t i = 0; i < size; ++i) {
+
81  if (buf[i] != eepromReadByte(i)) {
+
82  eepromWriteByte(i, buf[i]);
+
83  }
+
84  }
+
85  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
86  if ((NVMCTRL.STATUS & 4) != 0) {
+
87  return false;
+
88  }
+
89 #elif defined(_WIN32)
+
90  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
91  if (hFile == INVALID_HANDLE_VALUE) {
+
92  // error
+
93  return false;
+
94  }
+
95  DWORD written = 0;
+
96  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
+
97  // error
+
98  return false;
+
99  }
+
100  CloseHandle(hFile);
+
101 #else
+
102  FILE *f = fopen(STORAGE_FILENAME, "w");
+
103  if (!f) {
104  return false;
105  }
-
106  fclose(f);
-
107 #endif // VORTEX_EMBEDDED
-
108  return true;
-
109 }
-
110 
-
111 // read a serial buffer from storage
- -
113 {
-
114 #ifdef VORTEX_LIB
-
115  if (!Vortex::storageEnabled()) {
-
116  // return false here, but true in write because we don't want to return
-
117  // an empty buffer after returning true
-
118  return false;
-
119  }
-
120  uint16_t size = STORAGE_SIZE;
-
121 #else
-
122  uint16_t size = *(uint16_t *)MAPPED_EEPROM_START;
-
123 #endif
-
124  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
125  size = STORAGE_SIZE;
-
126  }
-
127  if (!buffer.init(size)) {
-
128  return false;
+
106  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
+
107  return false;
+
108  }
+
109  fclose(f);
+
110 #endif // VORTEX_EMBEDDED
+
111  return true;
+
112 }
+
113 
+
114 // read a serial buffer from storage
+ +
116 {
+
117 #ifdef VORTEX_LIB
+
118  if (!Vortex::storageEnabled()) {
+
119  // return false here, but true in write because we don't want to return
+
120  // an empty buffer after returning true
+
121  return false;
+
122  }
+
123  uint16_t size = STORAGE_SIZE;
+
124 #else
+
125  uint16_t size = *(uint16_t *)MAPPED_EEPROM_START;
+
126 #endif
+
127  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
+
128  size = STORAGE_SIZE;
129  }
-
130 #ifdef VORTEX_EMBEDDED
-
131  // Read the data from EEPROM first
-
132  uint8_t *pos = (uint8_t *)buffer.rawData();
-
133  uint16_t fullsize = buffer.rawSize() + size;
-
134  for (uint16_t i = 0; i < fullsize; ++i) {
-
135  pos[i] = eepromReadByte(i);
-
136  }
-
137 #elif defined(_WIN32)
-
138  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
139  if (hFile == INVALID_HANDLE_VALUE) {
-
140  // error
-
141  return false;
-
142  }
-
143  DWORD bytesRead = 0;
-
144  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
145  // error
-
146  return false;
-
147  }
-
148  CloseHandle(hFile);
-
149 #else
-
150  FILE *f = fopen(STORAGE_FILENAME, "r");
-
151  if (!f) {
-
152  return false;
-
153  }
-
154  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
+
130  if (!buffer.init(size)) {
+
131  return false;
+
132  }
+
133 #ifdef VORTEX_EMBEDDED
+
134  // Read the data from EEPROM first
+
135  uint8_t *pos = (uint8_t *)buffer.rawData();
+
136  uint16_t fullsize = buffer.rawSize() + size;
+
137  for (uint16_t i = 0; i < fullsize; ++i) {
+
138  pos[i] = eepromReadByte(i);
+
139  }
+
140 #elif defined(_WIN32)
+
141  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
142  if (hFile == INVALID_HANDLE_VALUE) {
+
143  // error
+
144  return false;
+
145  }
+
146  DWORD bytesRead = 0;
+
147  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
+
148  // error
+
149  return false;
+
150  }
+
151  CloseHandle(hFile);
+
152 #else
+
153  FILE *f = fopen(STORAGE_FILENAME, "r");
+
154  if (!f) {
155  return false;
156  }
-
157  fclose(f);
-
158 #endif
-
159  // ensure the internal buffer is sane after reading it out, this
-
160  // prevents segfaults if the internal size reports larger than capacity
-
161  buffer.sanity();
-
162  // check crc immediately since we read into raw data copying the
-
163  // array could be dangerous
-
164  if (!buffer.checkCRC()) {
-
165  buffer.clear();
-
166  ERROR_LOG("Could not verify buffer");
-
167  return false;
-
168  }
-
169  m_lastSaveSize = size;
-
170  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
171  return true;
-
172 }
-
173 
- -
175 {
-
176  return m_lastSaveSize;
-
177 }
-
178 
-
179 #ifdef VORTEX_EMBEDDED
-
180 // write out the eeprom byte
-
181 void Storage::eepromWriteByte(uint16_t index, uint8_t in)
-
182 {
-
183  uint16_t adr;
-
184  // The first two pages of the data goes into the eeprom and then the last page goes
-
185  // into the USERROW which is located at 0x1300
-
186  if (index > 255) {
-
187  adr = 0x1300 + (index & 0xFF);
-
188  } else {
-
189  adr = MAPPED_EEPROM_START + index;
-
190  }
-
191  __asm__ __volatile__(
-
192  "ldi r30, 0x00" "\n\t"
-
193  "ldi r31, 0x10" "\n\t"
-
194  "ldd r18, Z+2" "\n\t"
-
195  "andi r18, 3" "\n\t"
-
196  "brne .-6" "\n\t"
-
197  "st X, %0" "\n\t"
-
198  "ldi %0, 0x9D" "\n\t"
-
199  "out 0x34, %0" "\n\t"
-
200  "ldi %0, 0x03" "\n\t"
-
201  "st Z, %0" "\n\t"
-
202  :"+d"(in)
-
203  : "x"(adr)
-
204  : "r30", "r31", "r18");
-
205 }
-
206 
-
207 uint8_t Storage::eepromReadByte(uint16_t index)
-
208 {
-
209  if (index > 255) {
-
210  // USERROW start
-
211  return *(uint8_t *)(0x1300 + (index & 0xFF));
-
212  }
-
213  return *(uint8_t *)(MAPPED_EEPROM_START + index);
-
214 }
-
215 #endif
+
157  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
+
158  return false;
+
159  }
+
160  fclose(f);
+
161 #endif
+
162  // ensure the internal buffer is sane after reading it out, this
+
163  // prevents segfaults if the internal size reports larger than capacity
+
164  buffer.sanity();
+
165  // check crc immediately since we read into raw data copying the
+
166  // array could be dangerous
+
167  if (!buffer.checkCRC()) {
+
168  buffer.clear();
+
169  ERROR_LOG("Could not verify buffer");
+
170  return false;
+
171  }
+
172  m_lastSaveSize = size;
+
173  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
174  return true;
+
175 }
+
176 
+ +
178 {
+
179  return m_lastSaveSize;
+
180 }
+
181 
+
182 #ifdef VORTEX_EMBEDDED
+
183 // write out the eeprom byte
+
184 void Storage::eepromWriteByte(uint16_t index, uint8_t in)
+
185 {
+
186  uint16_t adr;
+
187  // The first two pages of the data goes into the eeprom and then the last page goes
+
188  // into the USERROW which is located at 0x1300
+
189  if (index > 255) {
+
190  adr = 0x1300 + (index & 0xFF);
+
191  } else {
+
192  adr = MAPPED_EEPROM_START + index;
+
193  }
+
194  __asm__ __volatile__(
+
195  "ldi r30, 0x00" "\n\t"
+
196  "ldi r31, 0x10" "\n\t"
+
197  "ldd r18, Z+2" "\n\t"
+
198  "andi r18, 3" "\n\t"
+
199  "brne .-6" "\n\t"
+
200  "st X, %0" "\n\t"
+
201  "ldi %0, 0x9D" "\n\t"
+
202  "out 0x34, %0" "\n\t"
+
203  "ldi %0, 0x03" "\n\t"
+
204  "st Z, %0" "\n\t"
+
205  :"+d"(in)
+
206  : "x"(adr)
+
207  : "r30", "r31", "r18");
+
208 }
+
209 
+
210 uint8_t Storage::eepromReadByte(uint16_t index)
+
211 {
+
212  if (index > 255) {
+
213  // USERROW start
+
214  return *(uint8_t *)(0x1300 + (index & 0xFF));
+
215  }
+
216  return *(uint8_t *)(MAPPED_EEPROM_START + index);
+
217 }
+
218 #endif
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:30
-
#define STORAGE_FILENAME
Definition: Storage.cpp:36
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:31
+
#define STORAGE_FILENAME
Definition: Storage.cpp:37
-
#define STORAGE_SIZE
Definition: VortexConfig.h:522
+
#define STORAGE_SIZE
Definition: VortexConfig.h:527
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
void * rawData() const
Definition: ByteStream.h:121
uint32_t rawSize() const
Definition: ByteStream.h:122
void clear()
Definition: ByteStream.cpp:107
uint32_t size() const
Definition: ByteStream.h:123
bool checkCRC() const
Definition: ByteStream.cpp:327
void sanity()
Definition: ByteStream.cpp:319
-
static bool init()
Definition: Storage.cpp:45
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:60
-
static void cleanup()
Definition: Storage.cpp:55
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:112
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:174
-
Storage()
Definition: Storage.cpp:41
-
static void eepromWriteByte(uint16_t index, uint8_t in)
Definition: Storage.cpp:181
-
static uint8_t eepromReadByte(uint16_t index)
Definition: Storage.cpp:207
+
static bool init()
Definition: Storage.cpp:46
+
static bool write(ByteStream &buffer)
Definition: Storage.cpp:61
+
static void cleanup()
Definition: Storage.cpp:56
+
static bool read(ByteStream &buffer)
Definition: Storage.cpp:115
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:177
+
Storage()
Definition: Storage.cpp:42
+
static void eepromWriteByte(uint16_t index, uint8_t in)
Definition: Storage.cpp:184
+
static uint8_t eepromReadByte(uint16_t index)
Definition: Storage.cpp:210
static uint32_t m_lastSaveSize
Definition: Storage.h:44
diff --git a/docs/duo/Storage_8h_source.html b/docs/duo/Storage_8h_source.html index 0644d6c7c9..8fa61ea839 100644 --- a/docs/duo/Storage_8h_source.html +++ b/docs/duo/Storage_8h_source.html @@ -136,14 +136,14 @@
47 #endif
-
static bool init()
Definition: Storage.cpp:45
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:60
-
static void cleanup()
Definition: Storage.cpp:55
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:112
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:174
-
Storage()
Definition: Storage.cpp:41
-
static void eepromWriteByte(uint16_t index, uint8_t in)
Definition: Storage.cpp:181
-
static uint8_t eepromReadByte(uint16_t index)
Definition: Storage.cpp:207
+
static bool init()
Definition: Storage.cpp:46
+
static bool write(ByteStream &buffer)
Definition: Storage.cpp:61
+
static void cleanup()
Definition: Storage.cpp:56
+
static bool read(ByteStream &buffer)
Definition: Storage.cpp:115
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:177
+
Storage()
Definition: Storage.cpp:42
+
static void eepromWriteByte(uint16_t index, uint8_t in)
Definition: Storage.cpp:184
+
static uint8_t eepromReadByte(uint16_t index)
Definition: Storage.cpp:210
static uint32_t m_lastSaveSize
Definition: Storage.h:44
diff --git a/docs/duo/TimeControl_8cpp.html b/docs/duo/TimeControl_8cpp.html index f59a30bdb0..5f80a18fa6 100644 --- a/docs/duo/TimeControl_8cpp.html +++ b/docs/duo/TimeControl_8cpp.html @@ -203,49 +203,49 @@

-

Definition at line 204 of file TimeControl.cpp.

-
207 {
-
208 #ifdef VORTEX_EMBEDDED
-
209 #if F_CPU >= 20000000L
-
210  // for a one-microsecond delay, burn 4 clocks and then return
-
211  __asm__ __volatile__ (
-
212  "rjmp .+0" "\n\t" // 2 cycles
-
213  "nop" ); // 1 cycle
-
214  // wait 3 cycles with 2 words
-
215  if (us <= 1) return; // = 3 cycles, (4 when true)
-
216  // the loop takes a 1/2 of a microsecond (10 cycles) per iteration
-
217  // so execute it twice for each microsecond of delay requested.
-
218  us = us << 1; // x2 us, = 2 cycles
-
219  // we just burned 21 (23) cycles above, remove 2
-
220  // us is at least 4 so we can subtract 2.
-
221  us -= 2; // 2 cycles
-
222 #elif F_CPU >= 10000000L
-
223  // for a 1 microsecond delay, simply return. the overhead
-
224  // of the function call takes 14 (16) cycles, which is 1.5us
-
225  if (us <= 2) return; // = 3 cycles, (4 when true)
-
226  // we just burned 20 (22) cycles above, remove 4, (5*4=20)
-
227  // us is at least 6 so we can subtract 4
-
228  us -= 4; // 2 cycles
-
229 #endif
-
230  __asm__ __volatile__(
-
231  "1: sbiw %0, 1" "\n\t" // 2 cycles
-
232  "rjmp .+0" "\n\t" // 2 cycles
-
233  "rjmp .+0" "\n\t" // 2 cycles
-
234  "rjmp .+0" "\n\t" // 2 cycles
-
235  "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
-
236  );
-
237  // return = 4 cycles
-
238 #elif defined(_WIN32)
-
239  uint32_t newtime = microseconds() + us;
-
240  while (microseconds() < newtime) {
-
241  // busy loop
-
242  }
-
243 #else
-
244  usleep(us);
-
245 #endif
-
246 }
+

Definition at line 216 of file TimeControl.cpp.

+
219 {
+
220 #ifdef VORTEX_EMBEDDED
+
221 #if F_CPU >= 20000000L
+
222  // for a one-microsecond delay, burn 4 clocks and then return
+
223  __asm__ __volatile__ (
+
224  "rjmp .+0" "\n\t" // 2 cycles
+
225  "nop" ); // 1 cycle
+
226  // wait 3 cycles with 2 words
+
227  if (us <= 1) return; // = 3 cycles, (4 when true)
+
228  // the loop takes a 1/2 of a microsecond (10 cycles) per iteration
+
229  // so execute it twice for each microsecond of delay requested.
+
230  us = us << 1; // x2 us, = 2 cycles
+
231  // we just burned 21 (23) cycles above, remove 2
+
232  // us is at least 4 so we can subtract 2.
+
233  us -= 2; // 2 cycles
+
234 #elif F_CPU >= 10000000L
+
235  // for a 1 microsecond delay, simply return. the overhead
+
236  // of the function call takes 14 (16) cycles, which is 1.5us
+
237  if (us <= 2) return; // = 3 cycles, (4 when true)
+
238  // we just burned 20 (22) cycles above, remove 4, (5*4=20)
+
239  // us is at least 6 so we can subtract 4
+
240  us -= 4; // 2 cycles
+
241 #endif
+
242  __asm__ __volatile__(
+
243  "1: sbiw %0, 1" "\n\t" // 2 cycles
+
244  "rjmp .+0" "\n\t" // 2 cycles
+
245  "rjmp .+0" "\n\t" // 2 cycles
+
246  "rjmp .+0" "\n\t" // 2 cycles
+
247  "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
+
248  );
+
249  // return = 4 cycles
+
250 #elif defined(_WIN32)
+
251  uint32_t newtime = microseconds() + us;
+
252  while (microseconds() < newtime) {
+
253  // busy loop
+
254  }
+
255 #else
+
256  usleep(us);
+
257 #endif
+
258 }
-

References Time::microseconds().

+

References Time::microseconds().

@@ -264,7 +264,7 @@

Definition at line 20 of file TimeControl.cpp.

-

Referenced by Time::init(), and Time::microseconds().

+

Referenced by Time::init(), and Time::microseconds().

diff --git a/docs/duo/TimeControl_8cpp_source.html b/docs/duo/TimeControl_8cpp_source.html index d975c36824..fe8bb4ffb2 100644 --- a/docs/duo/TimeControl_8cpp_source.html +++ b/docs/duo/TimeControl_8cpp_source.html @@ -140,363 +140,354 @@
51 bool Time::init()
52 {
53 #ifdef VORTEX_EMBEDDED
-
54  initMCUTime();
-
55 #endif
-
56  m_curTick = 0;
-
57 #if VARIABLE_TICKRATE == 1
-
58  m_tickrate = DEFAULT_TICKRATE;
-
59 #endif
-
60 #ifdef VORTEX_LIB
-
61  m_firstTime = m_prevTime = microseconds();
-
62  m_simulationTick = 0;
-
63  m_isSimulation = false;
-
64  m_instantTimestep = false;
-
65 #endif
-
66 #if !defined(_WIN32) || defined(WASM)
-
67  start = microseconds();
-
68 #else
-
69  QueryPerformanceFrequency(&tps);
-
70  QueryPerformanceCounter(&start);
+
54  // initialize main clock
+
55 #if (F_CPU == 20000000)
+
56  // No division on clock
+
57  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0x00);
+
58 #elif (F_CPU == 10000000)
+
59  // 20MHz prescaled by 2, Clock DIV2
+
60  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, (CLKCTRL_PEN_bm | CLKCTRL_PDIV_2X_gc));
+
61 #else
+
62  #error "F_CPU not supported"
+
63 #endif
+
64  // IVSEL = 1 means Interrupt vectors are placed at the start of the boot section of the Flash
+
65  // as opposed to the application section of Flash. See 13.5.1
+
66  _PROTECTED_WRITE(CPUINT_CTRLA, CPUINT_IVSEL_bm);
+
67 #endif
+
68  m_curTick = 0;
+
69 #if VARIABLE_TICKRATE == 1
+
70  m_tickrate = DEFAULT_TICKRATE;
71 #endif
-
72  return true;
-
73 }
-
74 
- -
76 {
-
77 }
-
78 
- -
80 {
-
81  // tick clock forward
-
82  m_curTick++;
-
83 
-
84 #if DEBUG_ALLOCATIONS == 1
-
85  if ((m_curTick % MS_TO_TICKS(1000)) == 0) {
-
86  DEBUG_LOGF("Cur Memory: %u (%u)", cur_memory_usage(), cur_memory_usage_background());
-
87  }
-
88 #endif
-
89 
-
90  // the rest of this only runs inside vortexlib because on the duo the tick runs in the
-
91  // tcb timer callback instead of in a busy loop constantly checking microseconds()
-
92 #ifdef VORTEX_LIB
-
93  if (m_instantTimestep) {
-
94  return;
-
95  }
-
96 
-
97  // perform timestep
-
98  uint32_t elapsed_us;
-
99  uint32_t us;
-
100  do {
-
101  us = microseconds();
-
102  // detect rollover of microsecond counter
-
103  if (us < m_prevTime) {
-
104  // calculate wrapped around difference
-
105  elapsed_us = (uint32_t)((UINT32_MAX - m_prevTime) + us);
-
106  } else {
-
107  // otherwise calculate regular difference
-
108  elapsed_us = (uint32_t)(us - m_prevTime);
-
109  }
-
110  // if building anywhere except visual studio then we can run alternate sleep code
-
111  // because in visual studio + windows it's better to just spin and check the high
-
112  // resolution clock instead of trying to sleep for microseconds.
-
113 #if !defined(_WIN32) && defined(VORTEX_LIB)
-
114  uint32_t required = (1000000 / TICKRATE);
-
115  uint32_t sleepTime = 0;
-
116  if (required > elapsed_us) {
-
117  // in vortex lib on linux we can just sleep instead of spinning
-
118  // but on arduino we must spin and on windows it actually ends
-
119  // up being more accurate to poll QPF + QPC via microseconds()
-
120  sleepTime = required - elapsed_us;
+
72 #ifdef VORTEX_LIB
+
73  m_firstTime = m_prevTime = microseconds();
+
74  m_simulationTick = 0;
+
75  m_isSimulation = false;
+
76  m_instantTimestep = false;
+
77 #endif
+
78 #if !defined(_WIN32) || defined(WASM)
+
79  start = microseconds();
+
80 #else
+
81  QueryPerformanceFrequency(&tps);
+
82  QueryPerformanceCounter(&start);
+
83 #endif
+
84  return true;
+
85 }
+
86 
+ +
88 {
+
89 }
+
90 
+ +
92 {
+
93  // tick clock forward
+
94  m_curTick++;
+
95 
+
96 #if DEBUG_ALLOCATIONS == 1
+
97  if ((m_curTick % MS_TO_TICKS(1000)) == 0) {
+
98  DEBUG_LOGF("Cur Memory: %u (%u)", cur_memory_usage(), cur_memory_usage_background());
+
99  }
+
100 #endif
+
101 
+
102  // the rest of this only runs inside vortexlib because on the duo the tick runs in the
+
103  // tcb timer callback instead of in a busy loop constantly checking microseconds()
+
104 #ifdef VORTEX_LIB
+
105  if (m_instantTimestep) {
+
106  return;
+
107  }
+
108 
+
109  // perform timestep
+
110  uint32_t elapsed_us;
+
111  uint32_t us;
+
112  do {
+
113  us = microseconds();
+
114  // detect rollover of microsecond counter
+
115  if (us < m_prevTime) {
+
116  // calculate wrapped around difference
+
117  elapsed_us = (uint32_t)((UINT32_MAX - m_prevTime) + us);
+
118  } else {
+
119  // otherwise calculate regular difference
+
120  elapsed_us = (uint32_t)(us - m_prevTime);
121  }
-
122  Time::delayMicroseconds(sleepTime);
-
123  break;
-
124 #endif
-
125  // 1000us per ms, divided by tickrate gives
-
126  // the number of microseconds per tick
-
127  } while (elapsed_us < (1000000 / TICKRATE));
-
128 
-
129  // store current time
-
130  m_prevTime = microseconds();
-
131 #endif
-
132 }
-
133 
-
134 // the real current time, bypass simulations, used by timers
- -
136 {
-
137  return m_curTick;
-
138 }
-
139 
- -
141 {
-
142  return TICKRATE;
-
143 }
-
144 
-
145 // Set tickrate in Ticks Per Second (TPS)
-
146 // The valid range for this is 1 <= x <= 1000000
-
147 void Time::setTickrate(uint32_t tickrate)
+
122  // if building anywhere except visual studio then we can run alternate sleep code
+
123  // because in visual studio + windows it's better to just spin and check the high
+
124  // resolution clock instead of trying to sleep for microseconds.
+
125 #if !defined(_WIN32) && defined(VORTEX_LIB)
+
126  uint32_t required = (1000000 / TICKRATE);
+
127  uint32_t sleepTime = 0;
+
128  if (required > elapsed_us) {
+
129  // in vortex lib on linux we can just sleep instead of spinning
+
130  // but on embedded we must spin and on windows it actually ends
+
131  // up being more accurate to poll QPF + QPC via microseconds()
+
132  sleepTime = required - elapsed_us;
+
133  }
+
134  Time::delayMicroseconds(sleepTime);
+
135  break;
+
136 #endif
+
137  // 1000us per ms, divided by tickrate gives
+
138  // the number of microseconds per tick
+
139  } while (elapsed_us < (1000000 / TICKRATE));
+
140 
+
141  // store current time
+
142  m_prevTime = microseconds();
+
143 #endif
+
144 }
+
145 
+
146 // the real current time, bypass simulations, used by timers
+
148 {
-
149 #if VARIABLE_TICKRATE == 1
-
150  if (!tickrate) {
-
151  // can't set 0 tickrate, so 0 sets default
-
152  tickrate = DEFAULT_TICKRATE;
-
153  } else if (tickrate > 1000000) {
-
154  // more than 1 million ticks per second won't work anyway
-
155  tickrate = 1000000;
-
156  }
-
157  // update the tickrate
-
158  m_tickrate = tickrate;
-
159 #endif
-
160 }
-
161 
-
162 #if VARIABLE_TICKRATE == 1
-
163 uint32_t Time::millisecondsToTicks(uint32_t ms)
-
164 {
-
165  // 0ms = 0 ticks
-
166  if (!ms) {
-
167  return 0;
+
149  return m_curTick;
+
150 }
+
151 
+ +
153 {
+
154  return TICKRATE;
+
155 }
+
156 
+
157 // Set tickrate in Ticks Per Second (TPS)
+
158 // The valid range for this is 1 <= x <= 1000000
+
159 void Time::setTickrate(uint32_t tickrate)
+
160 {
+
161 #if VARIABLE_TICKRATE == 1
+
162  if (!tickrate) {
+
163  // can't set 0 tickrate, so 0 sets default
+
164  tickrate = DEFAULT_TICKRATE;
+
165  } else if (tickrate > 1000000) {
+
166  // more than 1 million ticks per second won't work anyway
+
167  tickrate = 1000000;
168  }
-
169  // but anything > 0 ms must be no less than 1 tick
-
170  // otherwise short durations will disappear at low
-
171  // tickrates
-
172  uint32_t ticks = (ms * TICKRATE) / 1000;
-
173  if (!ticks) {
-
174  return 1;
-
175  }
-
176  return ticks;
-
177 }
-
178 #endif
-
179 
- -
181 {
-
182 #ifndef VORTEX_LIB // Embedded avr devices
-
183  uint32_t ticks;
-
184  // divide by 10
-
185  ticks = (m_curTick * DEFAULT_TICKRATE) + (TCB0.CNT / 1000);
-
186  return ticks;
-
187 #elif defined(_WIN32) // windows
-
188  LARGE_INTEGER now;
-
189  QueryPerformanceCounter(&now);
-
190  if (!tps.QuadPart) {
-
191  return 0;
-
192  }
-
193  // yes, this will overflow, that's how arduino microseconds() works *shrug*
-
194  return (unsigned long)((now.QuadPart - start.QuadPart) * 1000000 / tps.QuadPart);
-
195 #else // linux/wasm/etc
-
196  struct timespec ts;
-
197  clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
-
198  uint64_t us = SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec);
-
199  return (unsigned long)us;
-
200 #endif
-
201 }
-
202 
-
203 #ifdef VORTEX_EMBEDDED
-
204 __attribute__ ((noinline))
-
205 #endif
-
206 void Time::delayMicroseconds(uint32_t us)
-
207 {
-
208 #ifdef VORTEX_EMBEDDED
-
209 #if F_CPU >= 20000000L
-
210  // for a one-microsecond delay, burn 4 clocks and then return
-
211  __asm__ __volatile__ (
-
212  "rjmp .+0" "\n\t" // 2 cycles
-
213  "nop" ); // 1 cycle
-
214  // wait 3 cycles with 2 words
-
215  if (us <= 1) return; // = 3 cycles, (4 when true)
-
216  // the loop takes a 1/2 of a microsecond (10 cycles) per iteration
-
217  // so execute it twice for each microsecond of delay requested.
-
218  us = us << 1; // x2 us, = 2 cycles
-
219  // we just burned 21 (23) cycles above, remove 2
-
220  // us is at least 4 so we can subtract 2.
-
221  us -= 2; // 2 cycles
-
222 #elif F_CPU >= 10000000L
-
223  // for a 1 microsecond delay, simply return. the overhead
-
224  // of the function call takes 14 (16) cycles, which is 1.5us
-
225  if (us <= 2) return; // = 3 cycles, (4 when true)
-
226  // we just burned 20 (22) cycles above, remove 4, (5*4=20)
-
227  // us is at least 6 so we can subtract 4
-
228  us -= 4; // 2 cycles
-
229 #endif
-
230  __asm__ __volatile__(
-
231  "1: sbiw %0, 1" "\n\t" // 2 cycles
-
232  "rjmp .+0" "\n\t" // 2 cycles
-
233  "rjmp .+0" "\n\t" // 2 cycles
-
234  "rjmp .+0" "\n\t" // 2 cycles
-
235  "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
-
236  );
-
237  // return = 4 cycles
-
238 #elif defined(_WIN32)
-
239  uint32_t newtime = microseconds() + us;
-
240  while (microseconds() < newtime) {
-
241  // busy loop
-
242  }
-
243 #else
-
244  usleep(us);
-
245 #endif
-
246 }
-
247 
-
248 void Time::delayMilliseconds(uint32_t ms)
-
249 {
-
250 #ifdef VORTEX_EMBEDDED
-
251  // not very accurate
-
252  for (uint16_t i = 0; i < ms; ++i) {
-
253  delayMicroseconds(1000);
+
169  // update the tickrate
+
170  m_tickrate = tickrate;
+
171 #endif
+
172 }
+
173 
+
174 #if VARIABLE_TICKRATE == 1
+
175 uint32_t Time::millisecondsToTicks(uint32_t ms)
+
176 {
+
177  // 0ms = 0 ticks
+
178  if (!ms) {
+
179  return 0;
+
180  }
+
181  // but anything > 0 ms must be no less than 1 tick
+
182  // otherwise short durations will disappear at low
+
183  // tickrates
+
184  uint32_t ticks = (ms * TICKRATE) / 1000;
+
185  if (!ticks) {
+
186  return 1;
+
187  }
+
188  return ticks;
+
189 }
+
190 #endif
+
191 
+ +
193 {
+
194 #ifndef VORTEX_LIB // Embedded avr devices
+
195  uint32_t ticks;
+
196  // divide by 10
+
197  ticks = (m_curTick * DEFAULT_TICKRATE) + (TCB0.CNT / 1000);
+
198  return ticks;
+
199 #elif defined(_WIN32) // windows
+
200  LARGE_INTEGER now;
+
201  QueryPerformanceCounter(&now);
+
202  if (!tps.QuadPart) {
+
203  return 0;
+
204  }
+
205  // yes, this will overflow, that's how arduino microseconds() works *shrug*
+
206  return (unsigned long)((now.QuadPart - start.QuadPart) * 1000000 / tps.QuadPart);
+
207 #else // linux/wasm/etc
+
208  struct timespec ts;
+
209  clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
+
210  uint64_t us = SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec);
+
211  return (unsigned long)us;
+
212 #endif
+
213 }
+
214 
+
215 #ifdef VORTEX_EMBEDDED
+
216 __attribute__ ((noinline))
+
217 #endif
+
218 void Time::delayMicroseconds(uint32_t us)
+
219 {
+
220 #ifdef VORTEX_EMBEDDED
+
221 #if F_CPU >= 20000000L
+
222  // for a one-microsecond delay, burn 4 clocks and then return
+
223  __asm__ __volatile__ (
+
224  "rjmp .+0" "\n\t" // 2 cycles
+
225  "nop" ); // 1 cycle
+
226  // wait 3 cycles with 2 words
+
227  if (us <= 1) return; // = 3 cycles, (4 when true)
+
228  // the loop takes a 1/2 of a microsecond (10 cycles) per iteration
+
229  // so execute it twice for each microsecond of delay requested.
+
230  us = us << 1; // x2 us, = 2 cycles
+
231  // we just burned 21 (23) cycles above, remove 2
+
232  // us is at least 4 so we can subtract 2.
+
233  us -= 2; // 2 cycles
+
234 #elif F_CPU >= 10000000L
+
235  // for a 1 microsecond delay, simply return. the overhead
+
236  // of the function call takes 14 (16) cycles, which is 1.5us
+
237  if (us <= 2) return; // = 3 cycles, (4 when true)
+
238  // we just burned 20 (22) cycles above, remove 4, (5*4=20)
+
239  // us is at least 6 so we can subtract 4
+
240  us -= 4; // 2 cycles
+
241 #endif
+
242  __asm__ __volatile__(
+
243  "1: sbiw %0, 1" "\n\t" // 2 cycles
+
244  "rjmp .+0" "\n\t" // 2 cycles
+
245  "rjmp .+0" "\n\t" // 2 cycles
+
246  "rjmp .+0" "\n\t" // 2 cycles
+
247  "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
+
248  );
+
249  // return = 4 cycles
+
250 #elif defined(_WIN32)
+
251  uint32_t newtime = microseconds() + us;
+
252  while (microseconds() < newtime) {
+
253  // busy loop
254  }
-
255 #elif defined(_WIN32)
-
256  Sleep(ms);
-
257 #else
-
258  usleep(ms * 1000);
-
259 #endif
-
260 }
-
261 
-
262 #ifdef VORTEX_LIB
-
263 
-
264 // Start a time simulation, while the simulation is active you can
-
265 // increment the 'current time' with tickSimulation() then when you
-
266 // call endSimulation() the currentTime will be restored
-
267 uint32_t Time::startSimulation()
-
268 {
-
269  m_simulationTick = 0;
-
270  m_isSimulation = true;
-
271  return (uint32_t)getCurtime();
+
255 #else
+
256  usleep(us);
+
257 #endif
+
258 }
+
259 
+
260 void Time::delayMilliseconds(uint32_t ms)
+
261 {
+
262 #ifdef VORTEX_EMBEDDED
+
263  // not very accurate
+
264  for (uint16_t i = 0; i < ms; ++i) {
+
265  delayMicroseconds(1000);
+
266  }
+
267 #elif defined(_WIN32)
+
268  Sleep(ms);
+
269 #else
+
270  usleep(ms * 1000);
+
271 #endif
272 }
273 
-
274 // Tick a time simulation forward, returning the next tick
-
275 uint32_t Time::tickSimulation()
-
276 {
-
277  return ++m_simulationTick;
-
278 }
-
279 
-
280 // whether running time simulation
-
281 bool Time::isSimulation()
-
282 {
-
283  return m_isSimulation;
+
274 #ifdef VORTEX_LIB
+
275 
+
276 // Start a time simulation, while the simulation is active you can
+
277 // increment the 'current time' with tickSimulation() then when you
+
278 // call endSimulation() the currentTime will be restored
+
279 uint32_t Time::startSimulation()
+
280 {
+
281  m_simulationTick = 0;
+
282  m_isSimulation = true;
+
283  return (uint32_t)getCurtime();
284 }
285 
-
286 // get the current tick in the simulation
-
287 uint32_t Time::getSimulationTick()
+
286 // Tick a time simulation forward, returning the next tick
+
287 uint32_t Time::tickSimulation()
288 {
-
289  return m_simulationTick;
+
289  return ++m_simulationTick;
290 }
291 
-
292 // Finish a time simulation
-
293 uint32_t Time::endSimulation()
+
292 // whether running time simulation
+
293 bool Time::isSimulation()
294 {
-
295  uint32_t endTick = (uint32_t)getCurtime();
-
296  m_simulationTick = 0;
-
297  m_isSimulation = false;
-
298  return endTick;
-
299 }
-
300 
-
301 #endif
-
302 
-
303 #ifdef VORTEX_EMBEDDED
- -
305 {
-
306  // initialize main clock
-
307 #if (F_CPU == 20000000)
-
308  // No division on clock
-
309  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0x00);
-
310 #elif (F_CPU == 10000000)
-
311  // 20MHz prescaled by 2, Clock DIV2
-
312  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, (CLKCTRL_PEN_bm | CLKCTRL_PDIV_2X_gc));
-
313 #else
-
314  #error "F_CPU not supported"
-
315 #endif
-
316 
-
317  // IVSEL = 1 means Interrupt vectors are placed at the start of the boot section of the Flash
-
318  // as opposed to the application section of Flash. See 13.5.1
-
319  _PROTECTED_WRITE(CPUINT_CTRLA, CPUINT_IVSEL_bm);
-
320 }
-
321 #endif // VORTEX_EMBEDDED
-
322 
-
323 #if TIMER_TEST == 1
-
324 #include <assert.h>
-
325 
-
326 void Time::test()
-
327 {
-
328  DEBUG_LOG("Starting Time class tests...");
-
329 
-
330  // just return immediately when testing the time system,
-
331  // this prevents the actual delay from occurring and
-
332  // allows us to tick forward as fast as we want
-
333  setInstantTimestep(true);
-
334 
-
335  // Test init function
-
336  assert(init());
-
337  DEBUG_LOG("Init test passed");
-
338  cleanup();
-
339 
-
340  // Test tickClock function
-
341  uint32_t initialTick = m_curTick;
-
342  tickClock();
-
343  assert(m_curTick == initialTick + 1);
-
344  DEBUG_LOG("tickClock test passed");
-
345 
-
346  // Test msToTicks function
-
347  assert(msToTicks(1000) == TICKRATE);
-
348  assert(msToTicks(500) == TICKRATE / 2);
-
349  assert(msToTicks(0) == 0);
-
350  DEBUG_LOG("msToTicks test passed");
+
295  return m_isSimulation;
+
296 }
+
297 
+
298 // get the current tick in the simulation
+
299 uint32_t Time::getSimulationTick()
+
300 {
+
301  return m_simulationTick;
+
302 }
+
303 
+
304 // Finish a time simulation
+
305 uint32_t Time::endSimulation()
+
306 {
+
307  uint32_t endTick = (uint32_t)getCurtime();
+
308  m_simulationTick = 0;
+
309  m_isSimulation = false;
+
310  return endTick;
+
311 }
+
312 
+
313 #endif
+
314 
+
315 #if TIMER_TEST == 1
+
316 #include <assert.h>
+
317 
+
318 void Time::test()
+
319 {
+
320  DEBUG_LOG("Starting Time class tests...");
+
321 
+
322  // just return immediately when testing the time system,
+
323  // this prevents the actual delay from occurring and
+
324  // allows us to tick forward as fast as we want
+
325  setInstantTimestep(true);
+
326 
+
327  // Test init function
+
328  assert(init());
+
329  DEBUG_LOG("Init test passed");
+
330  cleanup();
+
331 
+
332  // Test tickClock function
+
333  uint32_t initialTick = m_curTick;
+
334  tickClock();
+
335  assert(m_curTick == initialTick + 1);
+
336  DEBUG_LOG("tickClock test passed");
+
337 
+
338  // Test msToTicks function
+
339  assert(msToTicks(1000) == TICKRATE);
+
340  assert(msToTicks(500) == TICKRATE / 2);
+
341  assert(msToTicks(0) == 0);
+
342  DEBUG_LOG("msToTicks test passed");
+
343 
+
344  // Test getRealCurtime function
+
345  assert(getRealCurtime() == m_curTick);
+
346  DEBUG_LOG("getRealCurtime test passed");
+
347 
+
348  // Test getTickrate function
+
349  assert(getTickrate() == TICKRATE);
+
350  DEBUG_LOG("getTickrate test passed");
351 
-
352  // Test getRealCurtime function
-
353  assert(getRealCurtime() == m_curTick);
-
354  DEBUG_LOG("getRealCurtime test passed");
-
355 
-
356  // Test getTickrate function
-
357  assert(getTickrate() == TICKRATE);
-
358  DEBUG_LOG("getTickrate test passed");
+
352  // Test setTickrate function (only when VARIABLE_TICKRATE is enabled)
+
353 #if VARIABLE_TICKRATE == 1
+
354  uint32_t newTickrate = TICKRATE * 2;
+
355  setTickrate(newTickrate);
+
356  assert(getTickrate() == newTickrate);
+
357  DEBUG_LOG("setTickrate test passed");
+
358 #endif
359 
-
360  // Test setTickrate function (only when VARIABLE_TICKRATE is enabled)
-
361 #if VARIABLE_TICKRATE == 1
-
362  uint32_t newTickrate = TICKRATE * 2;
-
363  setTickrate(newTickrate);
-
364  assert(getTickrate() == newTickrate);
-
365  DEBUG_LOG("setTickrate test passed");
-
366 #endif
-
367 
-
368 #ifdef VORTEX_LIB
-
369  // Test simulation functions
-
370  uint32_t simulationStartTick = startSimulation();
-
371  assert(isSimulation());
-
372  assert(getSimulationTick() == 0);
-
373  DEBUG_LOG("startSimulation test passed");
-
374 
-
375  uint32_t simulationTick = tickSimulation();
-
376  assert(getSimulationTick() == 1);
-
377  DEBUG_LOGF("tickSimulation test passed, simulationTick: %u", simulationTick);
-
378 
-
379  uint32_t simulationEndTick = endSimulation();
-
380  assert(!isSimulation());
-
381  assert(simulationEndTick == simulationStartTick + 1);
-
382  DEBUG_LOGF("endSimulation test passed, simulationEndTick: %u", simulationEndTick);
-
383 #endif
-
384 
-
385  DEBUG_LOG("Time class tests completed successfully.");
-
386 }
-
387 #endif
+
360 #ifdef VORTEX_LIB
+
361  // Test simulation functions
+
362  uint32_t simulationStartTick = startSimulation();
+
363  assert(isSimulation());
+
364  assert(getSimulationTick() == 0);
+
365  DEBUG_LOG("startSimulation test passed");
+
366 
+
367  uint32_t simulationTick = tickSimulation();
+
368  assert(getSimulationTick() == 1);
+
369  DEBUG_LOGF("tickSimulation test passed, simulationTick: %u", simulationTick);
+
370 
+
371  uint32_t simulationEndTick = endSimulation();
+
372  assert(!isSimulation());
+
373  assert(simulationEndTick == simulationStartTick + 1);
+
374  DEBUG_LOGF("endSimulation test passed, simulationEndTick: %u", simulationEndTick);
+
375 #endif
+
376 
+
377  DEBUG_LOG("Time class tests completed successfully.");
+
378 }
+
379 #endif
#define DEBUG_LOG(msg)
Definition: Log.h:40
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
uint64_t start
Definition: TimeControl.cpp:20
-
__attribute__((noinline)) void Time
+
__attribute__((noinline)) void Time
#define TICKRATE
Definition: TimeControl.cpp:48
#define NS_TO_US(ns)
Definition: TimeControl.cpp:23
#define SEC_TO_US(sec)
Definition: TimeControl.cpp:22
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:210
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:209
static bool init()
Definition: TimeControl.cpp:51
-
static void initMCUTime()
-
static uint32_t getRealCurtime()
+
static uint32_t getRealCurtime()
static uint32_t getCurtime()
Definition: TimeControl.h:40
-
static void tickClock()
Definition: TimeControl.cpp:79
+
static void tickClock()
Definition: TimeControl.cpp:91
static void delayMicroseconds(uint32_t us)
-
static void delayMilliseconds(uint32_t ms)
-
static void setTickrate(uint32_t tickrate=0)
+
static void delayMilliseconds(uint32_t ms)
+
static void setTickrate(uint32_t tickrate=0)
static uint32_t m_curTick
Definition: TimeControl.h:118
-
static uint32_t microseconds()
-
static uint32_t getTickrate()
-
static void cleanup()
Definition: TimeControl.cpp:75
+
static uint32_t microseconds()
+
static uint32_t getTickrate()
+
static void cleanup()
Definition: TimeControl.cpp:87
diff --git a/docs/duo/TimeControl_8h_source.html b/docs/duo/TimeControl_8h_source.html index 03f32e3571..d0d14a1e79 100644 --- a/docs/duo/TimeControl_8h_source.html +++ b/docs/duo/TimeControl_8h_source.html @@ -195,7 +195,7 @@
106 
107 private:
108 #ifdef VORTEX_EMBEDDED
-
109  static void initMCUTime();
+
109  static void initMCUTime();
110 #endif
111 
112 #if VARIABLE_TICKRATE == 1
@@ -231,18 +231,18 @@
#define SIMULATION_TICK
Definition: TimeControl.h:20
static bool init()
Definition: TimeControl.cpp:51
-
static void initMCUTime()
-
static uint32_t getRealCurtime()
+
static uint32_t getRealCurtime()
static uint32_t getCurtime()
Definition: TimeControl.h:40
-
static void tickClock()
Definition: TimeControl.cpp:79
+
static void tickClock()
Definition: TimeControl.cpp:91
static void delayMicroseconds(uint32_t us)
-
static void delayMilliseconds(uint32_t ms)
-
static void setTickrate(uint32_t tickrate=0)
+
static void delayMilliseconds(uint32_t ms)
+
static void setTickrate(uint32_t tickrate=0)
static uint32_t m_curTick
Definition: TimeControl.h:118
-
static uint32_t microseconds()
-
static uint32_t getTickrate()
-
static void cleanup()
Definition: TimeControl.cpp:75
+
static uint32_t microseconds()
+
static uint32_t getTickrate()
+
static void initMCUTime()
+
static void cleanup()
Definition: TimeControl.cpp:87
diff --git a/docs/duo/Timer_8cpp_source.html b/docs/duo/Timer_8cpp_source.html index 41cdf7af51..068a2b1677 100644 --- a/docs/duo/Timer_8cpp_source.html +++ b/docs/duo/Timer_8cpp_source.html @@ -350,7 +350,7 @@
#define TIMER_4_ALARMS
Definition: Timer.h:19
#define TIMER_2_ALARMS
Definition: Timer.h:17
static uint32_t getCurtime()
Definition: TimeControl.h:40
-
static void tickClock()
Definition: TimeControl.cpp:79
+
static void tickClock()
Definition: TimeControl.cpp:91
Definition: Timer.h:28
uint32_t getStartTime() const
Definition: Timer.cpp:137
~Timer()
Definition: Timer.cpp:19
diff --git a/docs/duo/Timings_8h.html b/docs/duo/Timings_8h.html index 6fe3eaeba0..0fa82fe3db 100644 --- a/docs/duo/Timings_8h.html +++ b/docs/duo/Timings_8h.html @@ -114,10 +114,10 @@   #define CONSECUTIVE_WINDOW_TICKS   MS_TO_TICKS(CONSECUTIVE_WINDOW)   -#define UNLOCK_WAKE_WINDOW_TICKS   MS_TO_TICKS(UNLOCK_WAKE_WINDOW) -  #define AUTO_RANDOM_DELAY_TICKS   MS_TO_TICKS(AUTO_RANDOM_DELAY)   +#define UNLOCK_WAKE_WINDOW_TICKS   MS_TO_TICKS(UNLOCK_WAKE_WINDOW) +  #define SLEEP_ENTER_THRESHOLD_TICKS   MS_TO_TICKS(SLEEP_TRIGGER_TIME)   #define SLEEP_WINDOW_THRESHOLD_TICKS   MS_TO_TICKS(SLEEP_WINDOW_TIME) @@ -212,7 +212,7 @@

-

Definition at line 16 of file Timings.h.

+

Definition at line 15 of file Timings.h.

@@ -772,7 +772,7 @@

-

Definition at line 15 of file Timings.h.

+

Definition at line 16 of file Timings.h.

diff --git a/docs/duo/Timings_8h_source.html b/docs/duo/Timings_8h_source.html index 8678c33ce4..661f814e34 100644 --- a/docs/duo/Timings_8h_source.html +++ b/docs/duo/Timings_8h_source.html @@ -101,8 +101,8 @@
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
-
15 #define UNLOCK_WAKE_WINDOW_TICKS MS_TO_TICKS(UNLOCK_WAKE_WINDOW)
-
16 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
+
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
+
16 #define UNLOCK_WAKE_WINDOW_TICKS MS_TO_TICKS(UNLOCK_WAKE_WINDOW)
17 #define SLEEP_ENTER_THRESHOLD_TICKS MS_TO_TICKS(SLEEP_TRIGGER_TIME)
18 #define SLEEP_WINDOW_THRESHOLD_TICKS MS_TO_TICKS(SLEEP_WINDOW_TIME)
19 #define FORCE_SLEEP_THRESHOLD_TICKS MS_TO_TICKS(FORCE_SLEEP_TIME)
diff --git a/docs/duo/VLReceiver_8cpp_source.html b/docs/duo/VLReceiver_8cpp_source.html index 77ffdb75a8..554058e50a 100644 --- a/docs/duo/VLReceiver_8cpp_source.html +++ b/docs/duo/VLReceiver_8cpp_source.html @@ -408,7 +408,7 @@
uint32_t rawSize() const
Definition: ByteStream.h:122
Definition: Mode.h:39
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:189
-
static uint32_t microseconds()
+
static uint32_t microseconds()
static void handleVLTiming(uint32_t diff)
Definition: VLReceiver.cpp:243
static uint32_t m_previousBytes
Definition: VLReceiver.h:74
static void cleanup()
Definition: VLReceiver.cpp:62
diff --git a/docs/duo/VortexConfig_8h.html b/docs/duo/VortexConfig_8h.html index a168f87b78..503f2904d3 100644 --- a/docs/duo/VortexConfig_8h.html +++ b/docs/duo/VortexConfig_8h.html @@ -145,7 +145,7 @@   #define AUTO_RANDOM_DELAY   1875   -#define AUTO_CYCLE_MODES_CLICKS   ((MAX_MODES > 2) ? (MAX_MODES * 2) : 4) +#define AUTO_CYCLE_MODES_CLICKS   10   #define AUTO_CYCLE_RANDOMIZER_CLICKS   3   @@ -277,6 +277,10 @@   #define EDITOR_VERB_GOODBYE   "l"   +#define MAX_MODE_SIZE   76 +  +#define NUM_MODE_SLOTS   (MAX_MODES + 1) +  #define STORAGE_SIZE   384   #define VORTEX_EMBEDDED   1 @@ -331,7 +335,7 @@

-

Definition at line 295 of file VortexConfig.h.

+

Definition at line 294 of file VortexConfig.h.

@@ -342,7 +346,7 @@

- +
#define AUTO_CYCLE_MODES_CLICKS   ((MAX_MODES > 2) ? (MAX_MODES * 2) : 4)#define AUTO_CYCLE_MODES_CLICKS   10
@@ -411,7 +415,7 @@

-

Definition at line 302 of file VortexConfig.h.

+

Definition at line 301 of file VortexConfig.h.

@@ -427,7 +431,7 @@

-

Definition at line 303 of file VortexConfig.h.

+

Definition at line 302 of file VortexConfig.h.

@@ -443,7 +447,7 @@

-

Definition at line 304 of file VortexConfig.h.

+

Definition at line 303 of file VortexConfig.h.

@@ -507,7 +511,7 @@

-

Definition at line 412 of file VortexConfig.h.

+

Definition at line 411 of file VortexConfig.h.

@@ -539,7 +543,7 @@

-

Definition at line 353 of file VortexConfig.h.

+

Definition at line 352 of file VortexConfig.h.

@@ -571,7 +575,7 @@

-

Definition at line 220 of file VortexConfig.h.

+

Definition at line 219 of file VortexConfig.h.

@@ -587,7 +591,7 @@

-

Definition at line 210 of file VortexConfig.h.

+

Definition at line 209 of file VortexConfig.h.

@@ -603,7 +607,7 @@

-

Definition at line 342 of file VortexConfig.h.

+

Definition at line 341 of file VortexConfig.h.

@@ -635,7 +639,7 @@

-

Definition at line 507 of file VortexConfig.h.

+

Definition at line 506 of file VortexConfig.h.

@@ -651,7 +655,7 @@

-

Definition at line 509 of file VortexConfig.h.

+

Definition at line 508 of file VortexConfig.h.

@@ -667,7 +671,7 @@

-

Definition at line 502 of file VortexConfig.h.

+

Definition at line 501 of file VortexConfig.h.

@@ -683,7 +687,7 @@

-

Definition at line 504 of file VortexConfig.h.

+

Definition at line 503 of file VortexConfig.h.

@@ -699,7 +703,7 @@

-

Definition at line 513 of file VortexConfig.h.

+

Definition at line 512 of file VortexConfig.h.

@@ -715,7 +719,7 @@

-

Definition at line 478 of file VortexConfig.h.

+

Definition at line 477 of file VortexConfig.h.

@@ -731,7 +735,7 @@

-

Definition at line 477 of file VortexConfig.h.

+

Definition at line 476 of file VortexConfig.h.

@@ -747,7 +751,7 @@

-

Definition at line 476 of file VortexConfig.h.

+

Definition at line 475 of file VortexConfig.h.

@@ -763,7 +767,7 @@

-

Definition at line 481 of file VortexConfig.h.

+

Definition at line 480 of file VortexConfig.h.

@@ -779,7 +783,7 @@

-

Definition at line 490 of file VortexConfig.h.

+

Definition at line 489 of file VortexConfig.h.

@@ -795,7 +799,7 @@

-

Definition at line 494 of file VortexConfig.h.

+

Definition at line 493 of file VortexConfig.h.

@@ -811,7 +815,7 @@

-

Definition at line 492 of file VortexConfig.h.

+

Definition at line 491 of file VortexConfig.h.

@@ -827,7 +831,7 @@

-

Definition at line 497 of file VortexConfig.h.

+

Definition at line 496 of file VortexConfig.h.

@@ -843,7 +847,7 @@

-

Definition at line 499 of file VortexConfig.h.

+

Definition at line 498 of file VortexConfig.h.

@@ -859,7 +863,7 @@

-

Definition at line 487 of file VortexConfig.h.

+

Definition at line 486 of file VortexConfig.h.

@@ -875,7 +879,7 @@

-

Definition at line 405 of file VortexConfig.h.

+

Definition at line 404 of file VortexConfig.h.

@@ -911,7 +915,7 @@

-

Definition at line 333 of file VortexConfig.h.

+

Definition at line 332 of file VortexConfig.h.

@@ -927,7 +931,7 @@

-

Definition at line 398 of file VortexConfig.h.

+

Definition at line 397 of file VortexConfig.h.

@@ -959,7 +963,7 @@

-

Definition at line 275 of file VortexConfig.h.

+

Definition at line 274 of file VortexConfig.h.

@@ -975,7 +979,7 @@

-

Definition at line 282 of file VortexConfig.h.

+

Definition at line 281 of file VortexConfig.h.

@@ -991,7 +995,7 @@

-

Definition at line 289 of file VortexConfig.h.

+

Definition at line 288 of file VortexConfig.h.

@@ -1023,7 +1027,7 @@

-

Definition at line 246 of file VortexConfig.h.

+

Definition at line 245 of file VortexConfig.h.

@@ -1039,7 +1043,7 @@

-

Definition at line 251 of file VortexConfig.h.

+

Definition at line 250 of file VortexConfig.h.

@@ -1055,7 +1059,7 @@

-

Definition at line 240 of file VortexConfig.h.

+

Definition at line 239 of file VortexConfig.h.

@@ -1087,7 +1091,23 @@

-

Definition at line 228 of file VortexConfig.h.

+

Definition at line 227 of file VortexConfig.h.

+ + + + +

◆ MAX_MODE_SIZE

+ +
+
+ + + + +
#define MAX_MODE_SIZE   76
+
+ +

Definition at line 520 of file VortexConfig.h.

@@ -1103,7 +1123,7 @@

-

Definition at line 189 of file VortexConfig.h.

+

Definition at line 188 of file VortexConfig.h.

@@ -1135,7 +1155,23 @@

-

Definition at line 426 of file VortexConfig.h.

+

Definition at line 425 of file VortexConfig.h.

+ + + + +

◆ NUM_MODE_SLOTS

+ +
+
+ + + + +
#define NUM_MODE_SLOTS   (MAX_MODES + 1)
+
+ +

Definition at line 523 of file VortexConfig.h.

@@ -1183,7 +1219,7 @@

-

Definition at line 461 of file VortexConfig.h.

+

Definition at line 460 of file VortexConfig.h.

@@ -1199,7 +1235,7 @@

-

Definition at line 455 of file VortexConfig.h.

+

Definition at line 454 of file VortexConfig.h.

@@ -1215,7 +1251,7 @@

-

Definition at line 452 of file VortexConfig.h.

+

Definition at line 451 of file VortexConfig.h.

@@ -1231,7 +1267,7 @@

-

Definition at line 464 of file VortexConfig.h.

+

Definition at line 463 of file VortexConfig.h.

@@ -1247,7 +1283,7 @@

-

Definition at line 449 of file VortexConfig.h.

+

Definition at line 448 of file VortexConfig.h.

@@ -1263,7 +1299,7 @@

-

Definition at line 458 of file VortexConfig.h.

+

Definition at line 457 of file VortexConfig.h.

@@ -1279,7 +1315,7 @@

-

Definition at line 446 of file VortexConfig.h.

+

Definition at line 445 of file VortexConfig.h.

@@ -1295,7 +1331,7 @@

-

Definition at line 310 of file VortexConfig.h.

+

Definition at line 309 of file VortexConfig.h.

@@ -1311,7 +1347,7 @@

-

Definition at line 311 of file VortexConfig.h.

+

Definition at line 310 of file VortexConfig.h.

@@ -1327,7 +1363,7 @@

-

Definition at line 312 of file VortexConfig.h.

+

Definition at line 311 of file VortexConfig.h.

@@ -1343,7 +1379,7 @@

-

Definition at line 313 of file VortexConfig.h.

+

Definition at line 312 of file VortexConfig.h.

@@ -1375,7 +1411,7 @@

-

Definition at line 418 of file VortexConfig.h.

+

Definition at line 417 of file VortexConfig.h.

@@ -1423,7 +1459,7 @@

-

Definition at line 522 of file VortexConfig.h.

+

Definition at line 527 of file VortexConfig.h.

@@ -1439,7 +1475,7 @@

-

Definition at line 432 of file VortexConfig.h.

+

Definition at line 431 of file VortexConfig.h.

@@ -1455,7 +1491,7 @@

-

Definition at line 319 of file VortexConfig.h.

+

Definition at line 318 of file VortexConfig.h.

@@ -1471,7 +1507,7 @@

-

Definition at line 320 of file VortexConfig.h.

+

Definition at line 319 of file VortexConfig.h.

@@ -1487,7 +1523,7 @@

-

Definition at line 321 of file VortexConfig.h.

+

Definition at line 320 of file VortexConfig.h.

@@ -1503,7 +1539,7 @@

-

Definition at line 322 of file VortexConfig.h.

+

Definition at line 321 of file VortexConfig.h.

@@ -1519,7 +1555,7 @@

-

Definition at line 367 of file VortexConfig.h.

+

Definition at line 366 of file VortexConfig.h.

@@ -1535,7 +1571,7 @@

-

Definition at line 533 of file VortexConfig.h.

+

Definition at line 538 of file VortexConfig.h.

@@ -1551,7 +1587,7 @@

-

Definition at line 386 of file VortexConfig.h.

+

Definition at line 385 of file VortexConfig.h.

@@ -1583,7 +1619,7 @@

-

Definition at line 256 of file VortexConfig.h.

+

Definition at line 255 of file VortexConfig.h.

diff --git a/docs/duo/VortexConfig_8h.js b/docs/duo/VortexConfig_8h.js index da294c0bd0..665be21f82 100644 --- a/docs/duo/VortexConfig_8h.js +++ b/docs/duo/VortexConfig_8h.js @@ -50,9 +50,11 @@ var VortexConfig_8h = [ "LOGGING_LEVEL", "VortexConfig_8h.html#aaff29f732338b733b8d1fee0e8df32ab", null ], [ "MAX_COLOR_SLOTS", "VortexConfig_8h.html#a1a0b694e2871554a4066f8d61f577c4c", null ], [ "MAX_MEMORY", "VortexConfig_8h.html#add0367147bdc878651ddf447424b50d5", null ], + [ "MAX_MODE_SIZE", "VortexConfig_8h.html#a4d5f0e0392f00d31715ddf81eb87434a", null ], [ "MAX_MODES", "VortexConfig_8h.html#a95b270e9c99aea216b47fd1e95b2cf34", null ], [ "MENU_TRIGGER_TIME", "VortexConfig_8h.html#adda1b08b81d68fa6a4a6109701f9dd57", null ], [ "MODES_TEST", "VortexConfig_8h.html#a9c95eccf51317b46e19269c6dbc7628e", null ], + [ "NUM_MODE_SLOTS", "VortexConfig_8h.html#ab0c5cc9223512ec01c405592b6741898", null ], [ "ONE_CLICK_MODE_TRHESHOLD", "VortexConfig_8h.html#abb4bd04b4fdd55b391227f28c94aa543", null ], [ "RESET_HOLD_TIME", "VortexConfig_8h.html#a18f22a5b8ac9dfe404fd4b83e502eda2", null ], [ "RGB_MENU_BRIGHTNESS_SELECT", "VortexConfig_8h.html#a3fd5d16a2fea0175b3b34083c6dfb42f", null ], diff --git a/docs/duo/VortexConfig_8h__dep__incl.md5 b/docs/duo/VortexConfig_8h__dep__incl.md5 index 7b23079faa..cff4ff1ec5 100644 --- a/docs/duo/VortexConfig_8h__dep__incl.md5 +++ b/docs/duo/VortexConfig_8h__dep__incl.md5 @@ -1 +1 @@ -a2fc5391191ee0bcdb7eab9e73413d08 \ No newline at end of file +865bed1a6e47ba65080e6cfd313cc6bf \ No newline at end of file diff --git a/docs/duo/VortexConfig_8h__dep__incl.svg b/docs/duo/VortexConfig_8h__dep__incl.svg index fddb7e344e..56c74b030f 100644 --- a/docs/duo/VortexConfig_8h__dep__incl.svg +++ b/docs/duo/VortexConfig_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,8 +58,8 @@ var sectionId = 'dynsection-1'; Node1 - -VortexEngine/src/VortexConfig.h + +VortexEngine/src/VortexConfig.h @@ -67,1618 +67,1612 @@ var sectionId = 'dynsection-1'; Node2 - -VortexEngine/src/Buttons -/Button.h + +VortexEngine/src/Buttons +/Button.h Node1->Node2 - - + + Node10 - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp - + Node1->Node10 - - + + Node16 - -VortexEngine/src/Colors -/Colorset.h + +VortexEngine/src/Colors +/Colorset.h Node1->Node16 - - + + Node30 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node1->Node30 - - + + Node83 - -VortexEngine/src/Colors -/ColorTypes.h + +VortexEngine/src/Colors +/ColorTypes.h Node1->Node83 - - + + Node86 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node1->Node86 - - + + Node87 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node87 - - + + - - -Node88 - - -VortexEngine/src/Storage -/Storage.cpp + + +Node101 + + +VortexEngine/src/Leds +/LedTypes.h - - -Node1->Node88 - - + + +Node1->Node101 + + Node102 - - -VortexEngine/src/Leds -/LedTypes.h + + +VortexEngine/src/Modes +/DefaultModes.h - + Node1->Node102 - - + + Node103 - - -VortexEngine/src/Modes -/DefaultModes.h + + +VortexEngine/src/Modes +/Mode.h Node1->Node103 - - + + - - -Node104 - - -VortexEngine/src/Modes -/Mode.h + + +Node106 + + +VortexEngine/src/Time +/TimeControl.h - - -Node1->Node104 - - + + +Node1->Node106 + + - + -Node107 - - -VortexEngine/src/Time -/TimeControl.h +Node110 + + +VortexEngine/src/Time +/Timings.h - + -Node1->Node107 - - +Node1->Node110 + + - + -Node111 - - -VortexEngine/src/Time -/Timings.h +Node112 + + +VortexEngine/src/Log +/ErrorBlinker.h - - -Node1->Node111 - - + + +Node1->Node112 + + - + -Node113 - - -VortexEngine/src/Log -/ErrorBlinker.h +Node114 + + +VortexEngine/src/Log +/Log.h - - -Node1->Node113 - - + + +Node1->Node114 + + - + -Node115 - - -VortexEngine/src/Log -/Log.h +Node120 + + +VortexEngine/src/Storage +/Storage.cpp - - -Node1->Node115 - - + + +Node1->Node120 + + Node123 - -VortexEngine/src/Memory -/Memory.h + +VortexEngine/src/Memory +/Memory.h - + Node1->Node123 - - + + Node124 - -VortexEngine/src/Serial -/Compression.cpp + +VortexEngine/src/Serial +/Compression.cpp - + Node1->Node124 - - + + Node125 - -VortexEngine/src/Serial -/Compression.h + +VortexEngine/src/Serial +/Compression.h - + Node1->Node125 - - + + Node126 - -VortexEngine/src/VortexEngine.h + +VortexEngine/src/VortexEngine.h - + Node1->Node126 - - + + Node127 - -VortexEngine/src/Wireless -/VLConfig.h + +VortexEngine/src/Wireless +/VLConfig.h - + Node1->Node127 - - + + Node3 - -VortexEngine/src/Buttons -/Button.cpp + +VortexEngine/src/Buttons +/Button.cpp Node2->Node3 - - + + Node4 - -VortexEngine/src/Buttons -/Buttons.h + +VortexEngine/src/Buttons +/Buttons.h Node2->Node4 - - + + Node8 - -VortexEngine/src/Menus -/Menu.cpp + +VortexEngine/src/Menus +/Menu.cpp Node2->Node8 - - + + Node9 - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp Node2->Node9 - - + + Node2->Node10 - - + + Node11 - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp Node2->Node11 - - + + Node12 - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp Node2->Node12 - - + + Node13 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp Node2->Node13 - - + + Node14 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp Node2->Node14 - - + + Node15 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp Node2->Node15 - - + + Node6 - -VortexEngine/src/Modes -/Modes.cpp + +VortexEngine/src/Modes +/Modes.cpp Node4->Node6 - - + + Node16->Node6 - - + + Node16->Node9 - - + + Node16->Node11 - - + + Node16->Node14 - - + + Node17 - -VortexEngine/src/Colors -/Colorset.cpp + +VortexEngine/src/Colors +/Colorset.cpp Node16->Node17 - - + + Node18 - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + +VortexEngine/src/Menus +/MenuList/ColorSelect.h Node16->Node18 - - + + Node19 - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp Node16->Node19 - - + + Node20 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h Node16->Node20 - - + + Node21 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp Node16->Node21 - - + + Node22 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp Node16->Node22 - - + + Node23 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h Node16->Node23 - - + + Node16->Node30 - - + + Node31 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h Node16->Node31 - - + + Node77 - -VortexEngine/src/Patterns -/Single/BasicPattern.cpp + +VortexEngine/src/Patterns +/Single/BasicPattern.cpp Node16->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Single/BlendPattern.cpp + +VortexEngine/src/Patterns +/Single/BlendPattern.cpp Node16->Node79 - - + + Node18->Node9 - - + + Node18->Node15 - - + + Node20->Node13 - - + + Node20->Node15 - - + + Node25 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h Node23->Node25 - - + + Node31->Node6 - - + + Node31->Node9 - - + + Node31->Node10 - - + + Node31->Node11 - - + + Node31->Node13 - - + + Node31->Node14 - - + + Node31->Node21 - - + + Node31->Node30 - - + + Node83->Node16 - - + + Node84 - -VortexEngine/src/Colors -/ColorTypes.cpp + +VortexEngine/src/Colors +/ColorTypes.cpp Node83->Node84 - - + + Node85 - -VortexEngine/src/Leds -/Leds.h + +VortexEngine/src/Leds +/Leds.h Node83->Node85 - - + + - + Node83->Node87 - - + + - + + +Node91 + + +VortexEngine/src/Leds +/LedStash.h + + + + + +Node83->Node91 + + + + -Node92 - - -VortexEngine/src/Leds -/LedStash.h +Node93 + + +VortexEngine/src/Menus +/Menu.h - - -Node83->Node92 - - + + +Node83->Node93 + + - + -Node94 - - -VortexEngine/src/Menus -/Menu.h +Node99 + + +VortexEngine/src/Menus +/Menus.h - - -Node83->Node94 - - + + +Node83->Node99 + + Node100 - - -VortexEngine/src/Menus -/Menus.h + + +VortexEngine/src/Modes +/DefaultModes.cpp - + Node83->Node100 - - - - - -Node101 - - -VortexEngine/src/Modes -/DefaultModes.cpp - - - - - -Node83->Node101 - - + + Node85->Node6 - - + + Node85->Node8 - - + + Node85->Node9 - - + + Node85->Node10 - - + + Node85->Node11 - - + + Node85->Node12 - - + + Node85->Node13 - - + + Node85->Node14 - - + + Node85->Node15 - - + + Node85->Node19 - - + + Node85->Node21 - - + + Node85->Node77 - - + + Node85->Node79 - - + + Node85->Node86 - - + + Node85->Node87 - - - - - -Node85->Node88 - - + + Node87->Node6 - - + + Node87->Node8 - - + + Node87->Node9 - - + + Node87->Node10 - - + + Node87->Node11 - - + + Node87->Node12 - - + + Node87->Node13 - - + + Node87->Node14 - - + + Node87->Node15 - - + + Node87->Node19 - - + + Node87->Node86 - - + + - - -Node92->Node86 - - + + +Node91->Node86 + + - + + +Node93->Node8 + + + + -Node94->Node8 - - +Node93->Node18 + + - + -Node94->Node18 - - +Node93->Node20 + + - - -Node94->Node20 - - + + +Node99->Node8 + + - + -Node100->Node8 - - +Node99->Node9 + + - + -Node100->Node9 - - +Node99->Node11 + + - + -Node100->Node11 - - +Node99->Node13 + + - + -Node100->Node13 - - +Node99->Node14 + + - + -Node100->Node14 - - +Node99->Node15 + + - - -Node100->Node15 - - + + +Node101->Node23 + + - + -Node102->Node23 - - +Node101->Node25 + + - + -Node102->Node25 - - +Node101->Node31 + + - - -Node102->Node31 - - + + +Node101->Node85 + + - + -Node102->Node85 - - +Node101->Node91 + + - + -Node102->Node92 - - +Node101->Node93 + + - + -Node102->Node94 - - +Node101->Node99 + + - + -Node102->Node100 - - - - - -Node102->Node103 - - +Node101->Node102 + + - - -Node102->Node104 - - + + +Node101->Node103 + + - + Node33 - - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - - -Node102->Node33 - - + + +Node101->Node33 + + - + Node68 - - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - - -Node102->Node68 - - + + +Node101->Node68 + + - - -Node102->Node107 - - + + +Node101->Node106 + + - - -Node103->Node6 - - + + +Node102->Node6 + + - + + +Node102->Node10 + + + + -Node103->Node10 - - +Node102->Node100 + + - + -Node103->Node101 - - +Node102->Node103 + + - - -Node103->Node104 - - + + +Node103->Node6 + + - - -Node104->Node6 - - + + +Node103->Node8 + + - - -Node104->Node8 - - + + +Node103->Node9 + + - - -Node104->Node9 - - + + +Node103->Node10 + + - + -Node104->Node10 - - +Node103->Node12 + + - - -Node104->Node12 - - + + +Node103->Node14 + + - - -Node104->Node14 - - + + +Node103->Node19 + + - - -Node104->Node19 - - + + +Node103->Node20 + + - - -Node104->Node20 - - + + +Node103->Node21 + + - - -Node104->Node21 - - + + +Node103->Node93 + + - - -Node104->Node94 - - + + +Node103->Node99 + + - - -Node104->Node100 - - + + +Node106->Node3 + + - - -Node107->Node3 - - + + +Node106->Node6 + + - - -Node107->Node6 - - + + +Node106->Node8 + + - + -Node107->Node8 - - +Node106->Node9 + + - - -Node107->Node9 - - + + +Node106->Node10 + + - + -Node107->Node10 - - +Node106->Node11 + + - + -Node107->Node11 - - +Node106->Node12 + + - + -Node107->Node12 - - +Node106->Node13 + + - + -Node107->Node13 - - +Node106->Node15 + + - - -Node107->Node15 - - + + +Node106->Node19 + + - - -Node107->Node19 - - + + +Node106->Node21 + + - - -Node107->Node21 - - + + +Node106->Node30 + + - + -Node107->Node30 - - +Node106->Node77 + + - + -Node107->Node77 - - +Node106->Node79 + + - - -Node107->Node79 - - + + +Node106->Node86 + + - - -Node107->Node86 - - + + +Node106->Node110 + + - + -Node107->Node111 - - +Node110->Node3 + + - - -Node111->Node3 - - + + +Node110->Node6 + + - - -Node111->Node6 - - + + +Node110->Node8 + + - + -Node111->Node8 - - +Node110->Node9 + + - + -Node111->Node9 - - +Node110->Node10 + + - + -Node111->Node10 - - +Node110->Node11 + + - + -Node111->Node11 - - +Node110->Node12 + + - + -Node111->Node12 - - +Node110->Node13 + + - + -Node111->Node13 - - +Node110->Node14 + + - + -Node111->Node14 - - +Node110->Node15 + + - - -Node111->Node15 - - + + +Node110->Node68 + + - - -Node111->Node68 - - + + +Node112->Node114 + + - + -Node113->Node115 - - +Node114->Node3 + + - - -Node115->Node3 - - + + +Node114->Node6 + + - - -Node115->Node6 - - + + +Node114->Node8 + + - + -Node115->Node8 - - +Node114->Node9 + + - - -Node115->Node9 - - + + +Node114->Node10 + + - + -Node115->Node10 - - +Node114->Node11 + + - + -Node115->Node11 - - +Node114->Node12 + + - + -Node115->Node12 - - +Node114->Node13 + + - + -Node115->Node13 - - +Node114->Node14 + + - + -Node115->Node14 - - +Node114->Node15 + + - - -Node115->Node15 - - + + +Node114->Node17 + + - - -Node115->Node17 - - + + +Node114->Node19 + + - - -Node115->Node19 - - + + +Node114->Node21 + + - - -Node115->Node21 - - + + +Node114->Node30 + + - + -Node115->Node30 - - - - - -Node115->Node88 - - +Node114->Node120 + + - + Node123->Node14 - - + + - + Node123->Node17 - - + + - + Node123->Node21 - - + + - + Node123->Node30 - - + + - - -Node123->Node88 - - + + +Node123->Node120 + + - + Node123->Node124 - - + + - + Node125->Node124 - - + + - + Node126->Node3 - - + + - + Node126->Node6 - - + + - + Node126->Node9 - - + + - + Node126->Node10 - - + + - + Node126->Node11 - - + + - + Node126->Node15 - - + + - + Node126->Node21 - - + + diff --git a/docs/duo/VortexConfig_8h__dep__incl_org.svg b/docs/duo/VortexConfig_8h__dep__incl_org.svg index 124195c39e..a641bb5e91 100644 --- a/docs/duo/VortexConfig_8h__dep__incl_org.svg +++ b/docs/duo/VortexConfig_8h__dep__incl_org.svg @@ -4,16 +4,16 @@ - + VortexEngine/src/VortexConfig.h Node1 - -VortexEngine/src/VortexConfig.h + +VortexEngine/src/VortexConfig.h @@ -21,1618 +21,1612 @@ Node2 - -VortexEngine/src/Buttons -/Button.h + +VortexEngine/src/Buttons +/Button.h Node1->Node2 - - + + Node10 - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp - + Node1->Node10 - - + + Node16 - -VortexEngine/src/Colors -/Colorset.h + +VortexEngine/src/Colors +/Colorset.h Node1->Node16 - - + + Node30 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node1->Node30 - - + + Node83 - -VortexEngine/src/Colors -/ColorTypes.h + +VortexEngine/src/Colors +/ColorTypes.h Node1->Node83 - - + + Node86 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node1->Node86 - - + + Node87 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node87 - - + + - - -Node88 - - -VortexEngine/src/Storage -/Storage.cpp + + +Node101 + + +VortexEngine/src/Leds +/LedTypes.h - - -Node1->Node88 - - + + +Node1->Node101 + + Node102 - - -VortexEngine/src/Leds -/LedTypes.h + + +VortexEngine/src/Modes +/DefaultModes.h - + Node1->Node102 - - + + Node103 - - -VortexEngine/src/Modes -/DefaultModes.h + + +VortexEngine/src/Modes +/Mode.h Node1->Node103 - - + + - - -Node104 - - -VortexEngine/src/Modes -/Mode.h + + +Node106 + + +VortexEngine/src/Time +/TimeControl.h - - -Node1->Node104 - - + + +Node1->Node106 + + - + -Node107 - - -VortexEngine/src/Time -/TimeControl.h +Node110 + + +VortexEngine/src/Time +/Timings.h - + -Node1->Node107 - - +Node1->Node110 + + - + -Node111 - - -VortexEngine/src/Time -/Timings.h +Node112 + + +VortexEngine/src/Log +/ErrorBlinker.h - - -Node1->Node111 - - + + +Node1->Node112 + + - + -Node113 - - -VortexEngine/src/Log -/ErrorBlinker.h +Node114 + + +VortexEngine/src/Log +/Log.h - - -Node1->Node113 - - + + +Node1->Node114 + + - + -Node115 - - -VortexEngine/src/Log -/Log.h +Node120 + + +VortexEngine/src/Storage +/Storage.cpp - - -Node1->Node115 - - + + +Node1->Node120 + + Node123 - -VortexEngine/src/Memory -/Memory.h + +VortexEngine/src/Memory +/Memory.h - + Node1->Node123 - - + + Node124 - -VortexEngine/src/Serial -/Compression.cpp + +VortexEngine/src/Serial +/Compression.cpp - + Node1->Node124 - - + + Node125 - -VortexEngine/src/Serial -/Compression.h + +VortexEngine/src/Serial +/Compression.h - + Node1->Node125 - - + + Node126 - -VortexEngine/src/VortexEngine.h + +VortexEngine/src/VortexEngine.h - + Node1->Node126 - - + + Node127 - -VortexEngine/src/Wireless -/VLConfig.h + +VortexEngine/src/Wireless +/VLConfig.h - + Node1->Node127 - - + + Node3 - -VortexEngine/src/Buttons -/Button.cpp + +VortexEngine/src/Buttons +/Button.cpp Node2->Node3 - - + + Node4 - -VortexEngine/src/Buttons -/Buttons.h + +VortexEngine/src/Buttons +/Buttons.h Node2->Node4 - - + + Node8 - -VortexEngine/src/Menus -/Menu.cpp + +VortexEngine/src/Menus +/Menu.cpp Node2->Node8 - - + + Node9 - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp Node2->Node9 - - + + Node2->Node10 - - + + Node11 - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp Node2->Node11 - - + + Node12 - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp Node2->Node12 - - + + Node13 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp Node2->Node13 - - + + Node14 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp Node2->Node14 - - + + Node15 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp Node2->Node15 - - + + Node6 - -VortexEngine/src/Modes -/Modes.cpp + +VortexEngine/src/Modes +/Modes.cpp Node4->Node6 - - + + Node16->Node6 - - + + Node16->Node9 - - + + Node16->Node11 - - + + Node16->Node14 - - + + Node17 - -VortexEngine/src/Colors -/Colorset.cpp + +VortexEngine/src/Colors +/Colorset.cpp Node16->Node17 - - + + Node18 - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + +VortexEngine/src/Menus +/MenuList/ColorSelect.h Node16->Node18 - - + + Node19 - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp Node16->Node19 - - + + Node20 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h Node16->Node20 - - + + Node21 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp Node16->Node21 - - + + Node22 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp Node16->Node22 - - + + Node23 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h Node16->Node23 - - + + Node16->Node30 - - + + Node31 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h Node16->Node31 - - + + Node77 - -VortexEngine/src/Patterns -/Single/BasicPattern.cpp + +VortexEngine/src/Patterns +/Single/BasicPattern.cpp Node16->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Single/BlendPattern.cpp + +VortexEngine/src/Patterns +/Single/BlendPattern.cpp Node16->Node79 - - + + Node18->Node9 - - + + Node18->Node15 - - + + Node20->Node13 - - + + Node20->Node15 - - + + Node25 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h Node23->Node25 - - + + Node31->Node6 - - + + Node31->Node9 - - + + Node31->Node10 - - + + Node31->Node11 - - + + Node31->Node13 - - + + Node31->Node14 - - + + Node31->Node21 - - + + Node31->Node30 - - + + Node83->Node16 - - + + Node84 - -VortexEngine/src/Colors -/ColorTypes.cpp + +VortexEngine/src/Colors +/ColorTypes.cpp Node83->Node84 - - + + Node85 - -VortexEngine/src/Leds -/Leds.h + +VortexEngine/src/Leds +/Leds.h Node83->Node85 - - + + - + Node83->Node87 - - + + - + + +Node91 + + +VortexEngine/src/Leds +/LedStash.h + + + + + +Node83->Node91 + + + + -Node92 - - -VortexEngine/src/Leds -/LedStash.h +Node93 + + +VortexEngine/src/Menus +/Menu.h - - -Node83->Node92 - - + + +Node83->Node93 + + - + -Node94 - - -VortexEngine/src/Menus -/Menu.h +Node99 + + +VortexEngine/src/Menus +/Menus.h - - -Node83->Node94 - - + + +Node83->Node99 + + Node100 - - -VortexEngine/src/Menus -/Menus.h + + +VortexEngine/src/Modes +/DefaultModes.cpp - + Node83->Node100 - - - - - -Node101 - - -VortexEngine/src/Modes -/DefaultModes.cpp - - - - - -Node83->Node101 - - + + Node85->Node6 - - + + Node85->Node8 - - + + Node85->Node9 - - + + Node85->Node10 - - + + Node85->Node11 - - + + Node85->Node12 - - + + Node85->Node13 - - + + Node85->Node14 - - + + Node85->Node15 - - + + Node85->Node19 - - + + Node85->Node21 - - + + Node85->Node77 - - + + Node85->Node79 - - + + Node85->Node86 - - + + Node85->Node87 - - - - - -Node85->Node88 - - + + Node87->Node6 - - + + Node87->Node8 - - + + Node87->Node9 - - + + Node87->Node10 - - + + Node87->Node11 - - + + Node87->Node12 - - + + Node87->Node13 - - + + Node87->Node14 - - + + Node87->Node15 - - + + Node87->Node19 - - + + Node87->Node86 - - + + - - -Node92->Node86 - - + + +Node91->Node86 + + - + + +Node93->Node8 + + + + -Node94->Node8 - - +Node93->Node18 + + - + -Node94->Node18 - - +Node93->Node20 + + - - -Node94->Node20 - - + + +Node99->Node8 + + - + -Node100->Node8 - - +Node99->Node9 + + - + -Node100->Node9 - - +Node99->Node11 + + - + -Node100->Node11 - - +Node99->Node13 + + - + -Node100->Node13 - - +Node99->Node14 + + - + -Node100->Node14 - - +Node99->Node15 + + - - -Node100->Node15 - - + + +Node101->Node23 + + - + -Node102->Node23 - - +Node101->Node25 + + - + -Node102->Node25 - - +Node101->Node31 + + - - -Node102->Node31 - - + + +Node101->Node85 + + - + -Node102->Node85 - - +Node101->Node91 + + - + -Node102->Node92 - - +Node101->Node93 + + - + -Node102->Node94 - - +Node101->Node99 + + - + -Node102->Node100 - - - - - -Node102->Node103 - - +Node101->Node102 + + - - -Node102->Node104 - - + + +Node101->Node103 + + - + Node33 - - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - - -Node102->Node33 - - + + +Node101->Node33 + + - + Node68 - - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - - -Node102->Node68 - - + + +Node101->Node68 + + - - -Node102->Node107 - - + + +Node101->Node106 + + - - -Node103->Node6 - - + + +Node102->Node6 + + - + + +Node102->Node10 + + + + -Node103->Node10 - - +Node102->Node100 + + - + -Node103->Node101 - - +Node102->Node103 + + - - -Node103->Node104 - - + + +Node103->Node6 + + - - -Node104->Node6 - - + + +Node103->Node8 + + - - -Node104->Node8 - - + + +Node103->Node9 + + - - -Node104->Node9 - - + + +Node103->Node10 + + - + -Node104->Node10 - - +Node103->Node12 + + - - -Node104->Node12 - - + + +Node103->Node14 + + - - -Node104->Node14 - - + + +Node103->Node19 + + - - -Node104->Node19 - - + + +Node103->Node20 + + - - -Node104->Node20 - - + + +Node103->Node21 + + - - -Node104->Node21 - - + + +Node103->Node93 + + - - -Node104->Node94 - - + + +Node103->Node99 + + - - -Node104->Node100 - - + + +Node106->Node3 + + - - -Node107->Node3 - - + + +Node106->Node6 + + - - -Node107->Node6 - - + + +Node106->Node8 + + - + -Node107->Node8 - - +Node106->Node9 + + - - -Node107->Node9 - - + + +Node106->Node10 + + - + -Node107->Node10 - - +Node106->Node11 + + - + -Node107->Node11 - - +Node106->Node12 + + - + -Node107->Node12 - - +Node106->Node13 + + - + -Node107->Node13 - - +Node106->Node15 + + - - -Node107->Node15 - - + + +Node106->Node19 + + - - -Node107->Node19 - - + + +Node106->Node21 + + - - -Node107->Node21 - - + + +Node106->Node30 + + - + -Node107->Node30 - - +Node106->Node77 + + - + -Node107->Node77 - - +Node106->Node79 + + - - -Node107->Node79 - - + + +Node106->Node86 + + - - -Node107->Node86 - - + + +Node106->Node110 + + - + -Node107->Node111 - - +Node110->Node3 + + - - -Node111->Node3 - - + + +Node110->Node6 + + - - -Node111->Node6 - - + + +Node110->Node8 + + - + -Node111->Node8 - - +Node110->Node9 + + - + -Node111->Node9 - - +Node110->Node10 + + - + -Node111->Node10 - - +Node110->Node11 + + - + -Node111->Node11 - - +Node110->Node12 + + - + -Node111->Node12 - - +Node110->Node13 + + - + -Node111->Node13 - - +Node110->Node14 + + - + -Node111->Node14 - - +Node110->Node15 + + - - -Node111->Node15 - - + + +Node110->Node68 + + - - -Node111->Node68 - - + + +Node112->Node114 + + - + -Node113->Node115 - - +Node114->Node3 + + - - -Node115->Node3 - - + + +Node114->Node6 + + - - -Node115->Node6 - - + + +Node114->Node8 + + - + -Node115->Node8 - - +Node114->Node9 + + - - -Node115->Node9 - - + + +Node114->Node10 + + - + -Node115->Node10 - - +Node114->Node11 + + - + -Node115->Node11 - - +Node114->Node12 + + - + -Node115->Node12 - - +Node114->Node13 + + - + -Node115->Node13 - - +Node114->Node14 + + - + -Node115->Node14 - - +Node114->Node15 + + - - -Node115->Node15 - - + + +Node114->Node17 + + - - -Node115->Node17 - - + + +Node114->Node19 + + - - -Node115->Node19 - - + + +Node114->Node21 + + - - -Node115->Node21 - - + + +Node114->Node30 + + - + -Node115->Node30 - - - - - -Node115->Node88 - - +Node114->Node120 + + - + Node123->Node14 - - + + - + Node123->Node17 - - + + - + Node123->Node21 - - + + - + Node123->Node30 - - + + - - -Node123->Node88 - - + + +Node123->Node120 + + - + Node123->Node124 - - + + - + Node125->Node124 - - + + - + Node126->Node3 - - + + - + Node126->Node6 - - + + - + Node126->Node9 - - + + - + Node126->Node10 - - + + - + Node126->Node11 - - + + - + Node126->Node15 - - + + - + Node126->Node21 - - + + diff --git a/docs/duo/VortexConfig_8h_source.html b/docs/duo/VortexConfig_8h_source.html index 42b036f375..4c37113671 100644 --- a/docs/duo/VortexConfig_8h_source.html +++ b/docs/duo/VortexConfig_8h_source.html @@ -206,7 +206,7 @@
117 // as the auto random delay. This number is intentionally high because we really
118 // don't want it activated automatically but it's there for demo purposes and as
119 // a fun little easter egg to anybody that might come across it
-
120 #define AUTO_CYCLE_MODES_CLICKS ((MAX_MODES > 2) ? (MAX_MODES * 2) : 4)
+
120 #define AUTO_CYCLE_MODES_CLICKS 10
121 
122 // Randomizer Auto Cycle Modes Clicks
123 //
@@ -271,434 +271,439 @@
182 // two fold the issues with space because they are already limited
183 // and the lack of compression makes their save files bigger
184 //
-
185 // This is set to 0 by default which allows for any number of modes
-
186 // to be stored, however this is not recommended for production and
-
187 // a specific maximum should be chosen for each device
-
188 //
-
189 #define MAX_MODES 5
-
190 
-
191 // Default Tickrate in Ticks Per Second (TPS)
-
192 //
-
193 // The valid range for this is 1 <= x <= 1000000 (default 1000)
-
194 //
-
195 // Any value near or above 10000 will most likely be too fast for
-
196 // the processor to handle.
-
197 //
-
198 // Any value less than 100 and you risk a single tick taking longer
-
199 // than some pattern timings which results in very weird behaviour
-
200 //
-
201 // It's probably best that you leave this at 1000
-
202 //
-
203 // WARNING:
-
204 //
-
205 // The timer system was not designed to handle ticks that are not
-
206 // exactly 1 ms. This means that if you change the tickrate to any
-
207 // value other than 1000 the timer system will miss alarms, patterns
-
208 // will not look correct and there is no fix at the moment.
-
209 //
-
210 #define DEFAULT_TICKRATE 1000
-
211 
-
212 // Pair time offset in ticks
-
213 //
-
214 // This changes how many ticks out of sync each finger will run.
-
215 // So 33 means each finger runs 33 ticks out of sync with the
-
216 // previous finger.
-
217 //
-
218 // This was an early feature that fell into disrepair, I don't
-
219 // think it works anymore and really hasn't proven to be useful
-
220 #define DEFAULT_TICK_OFFSET 0
-
221 
-
222 // Max Memory Usage
-
223 //
-
224 // The maximum memory usage allowed by the memory tracker.
-
225 // The memory tracker isn't present in final builds, only debug
-
226 // so this number doesn't actually do anything in production.
-
227 // Mostly for catching leaks or high memory usage in development.
-
228 #define MAX_MEMORY 8000
-
229 
-
230 // Log Level
-
231 //
-
232 // Set the logging level to control info/error/debug logs accordingly
-
233 // The available logging levels are:
-
234 //
-
235 // 0 Off All logging is disabled
-
236 // 1 Info Only info logs are present
-
237 // 2 Errors Info and error logs are present
-
238 // 3 Debug All logs are present, info, error, and debug
-
239 //
-
240 #define LOGGING_LEVEL 0
-
241 
-
242 // Log to Console
-
243 //
-
244 // Enable logging to console, still need to change LOGGING_LEVEL
-
245 // this only enables the console output connection
-
246 #define LOG_TO_CONSOLE 0
-
247 
-
248 // Log to File
-
249 //
-
250 // Enable this configuration to enable logging to the file
-
251 #define LOG_TO_FILE 0
-
252 
-
253 // Log Name
-
254 //
-
255 // The name of the file on disk that will receive the log info
-
256 #define VORTEX_LOG_NAME "vortexlog"
-
257 
-
258 // HSV to RGB Conversion Algorithm
-
259 //
-
260 // Here you can choose the HSV to RGB conversion algorithm, this will
-
261 // control the overall appearance of all colours produced with HSV.
-
262 // The available options are:
-
263 //
-
264 // 1 FastLED 'hsv to rgb rainbow'
-
265 // 2 FastLED 'hsv to rgb raw C'
-
266 // 3 generic hsv to rgb 'pastel'
-
267 //
-
268 // Option 1 is the default and legacy choice, also looks best because
-
269 // it puts even weight into every color of the rainbow which involves
-
270 // stretching some segments like yellow to take up more hue space.
-
271 //
-
272 // Note you can still call the other routines from your pattern code,
-
273 // for example blend and complementary blend use hsv to rgb 'pastel'
-
274 // because it looks better than hsv to rgb rainbow
-
275 #define HSV_TO_RGB_ALGORITHM 3
-
276 
-
277 // IR Receiver Time-out Duration (ms)
-
278 //
-
279 // This is the amount of time in ms for the IR receiver to wait
-
280 // before reseting itself in the case that communication gets
-
281 // interrupted.
-
282 #define IR_RECEIVER_TIMEOUT_DURATION 2000
-
283 
-
284 // IR Sender Wait Duration (ms)
-
285 //
-
286 // This is the amount of time in ms for the IR sender to wait
-
287 // between IR sends. This duration allows the user to give input
-
288 // as it is not possible to give input during a send.
-
289 #define IR_SENDER_WAIT_DURATION 2000
-
290 
-
291 // Enter Advanced Menus Click Duration (ms)
-
292 //
-
293 // How long the user must long click on the menu item to enter the
-
294 // 'advanced' version of the menu
-
295 #define ADVANCED_MENU_ENTER_DURATION 1500
-
296 
-
297 // Brightness Options
-
298 //
-
299 // These are the four options available in the global brightness menu
-
300 // There is only four options, be careful not to go too low
-
301 #define BRIGHTNESS_OPTION_1 40
-
302 #define BRIGHTNESS_OPTION_2 120
-
303 #define BRIGHTNESS_OPTION_3 185
-
304 #define BRIGHTNESS_OPTION_4 255
-
305 
-
306 // Saturation Options
-
307 //
-
308 // These are the four saturations available in the color selection menu
-
309 // Any color can be picked with any of these 4 saturations
-
310 #define SAT_OPTION_1 0
-
311 #define SAT_OPTION_2 85
-
312 #define SAT_OPTION_3 170
-
313 #define SAT_OPTION_4 255
-
314 
-
315 // Value/Luminance Options
-
316 //
-
317 // These are the four values/luminance options in the color selection menu
-
318 // Any color can be picked with any of these 4 values
-
319 #define VAL_OPTION_1 0
-
320 #define VAL_OPTION_2 85
-
321 #define VAL_OPTION_3 170
-
322 #define VAL_OPTION_4 255
-
323 
-
324 // ===================================================================
-
325 // Boolean Configurations (0 or 1)
-
326 
-
327 // Fill From Thumb
-
328 //
-
329 // The ring menu will fill from the thumb if this is present, otherwise
-
330 // it will fill from the pinkie.
-
331 //
-
332 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
-
333 #define FILL_FROM_THUMB 1
-
334 
-
335 // Demo All Patterns
-
336 //
-
337 // The default modes that are set on the gloveset will be dynamically
-
338 // generated with one mode per pattern in the patterns list
-
339 //
-
340 // This can be used to quickly demo all possible patterns, mostly useful
-
341 // for testing and development
-
342 #define DEMO_ALL_PATTERNS 0
-
343 
-
344 // Debug Allocations
-
345 //
-
346 // Tracks all memory allocations and logs them, useful for finding leaks
-
347 //
-
348 // Note tracking allocations while using the test framework will be inaccurate
-
349 // because the test framework allocations will be caught as well.
-
350 //
-
351 // When the test framework does things like display a color for the first time
-
352 // it will allocate space permanently for the new brush and never free it
-
353 #define DEBUG_ALLOCATIONS 0
-
354 
-
355 // Variable Tickrate
-
356 //
-
357 // This controls whether the setTickrate function is available and
-
358 // whether changing the tickrate is allowed. This goes hand-in-hand
-
359 // with the Default Tickrate configuration above
-
360 //
-
361 // The tickrate should always be fixed in final builds because this
-
362 // functionality induces extra performance costs and the intended
-
363 // tickrate for the final build should already be known.
-
364 //
-
365 // However there may be some clever uses for variable tickrate in
-
366 // the final build? I'm not sure.
-
367 #define VARIABLE_TICKRATE 0
-
368 
-
369 // Error Blinker System
-
370 //
-
371 // This toggles the vortex error blinker system, this system reports
-
372 // fatal errors as a series of blinks. If an error is encountered the
-
373 // chip will only blink out the error code from there forward.
-
374 //
-
375 // Note that enabling this system takes a non-negligible amount
-
376 // of space for all of the code, it really should only be used
-
377 // for debug settings or given tiers like logging level.
-
378 //
-
379 // This is mainly useful for tracking down issues on devices that don't
-
380 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
-
381 // set the error code and then the device will blink out the error
-
382 //
-
383 // for ex: red red green blue blue blue is code 213
-
384 //
-
385 // See Log/ErrorBlinker.h for details on the error codes
-
386 #define VORTEX_ERROR_BLINK 0
-
387 
-
388 // Fixed LED Count
-
389 //
-
390 // Do not allow the Mode loader to dynamically load however many modes
-
391 // are saved in the savefile. This should be enabled for arduino or vortex
-
392 // device builds because they cannot change their number of LEDs. However
-
393 // other tools like the editor or vortex emulator may be able to make use
-
394 // of this to dynamically adjust the number of leds that a mode can handle
-
395 //
-
396 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
-
397 // a mode will stretch it's list of patterns to match the number of leds
-
398 #define FIXED_LED_COUNT 1
-
399 
-
400 // Enable Editor Connection
-
401 //
-
402 // Turn on the editor connection, some devices are capable of connecting to
-
403 // the pc-based editor, this controls whether the engine exposes the purple
-
404 // editor connection menu or not
-
405 #define ENABLE_EDITOR_CONNECTION 0
-
406 
-
407 // Compression Test
-
408 //
-
409 // Run the built-in compression test that will find any faults
-
410 // in the compressor or decompressor. This is useful if you install
-
411 // a new compressor or want to test any changes to the compressor
-
412 #define COMPRESSION_TEST 0
-
413 
-
414 // Serialization Test
-
415 //
-
416 // Run the serializer/unserializer test which will find any objects
-
417 // which don't serialize and unserialize cleanly
-
418 #define SERIALIZATION_TEST 0
-
419 
-
420 // Modes Test
-
421 //
-
422 // Run unit tests on the Modes class which manages the list of Modes.
-
423 // If any patterns fail to instantiate or perform basic operations
-
424 // it should show up in the modes test. Also if the Modes api has been
-
425 // updated then this will test for any issues
-
426 #define MODES_TEST 0
-
427 
-
428 // Timer Test
-
429 //
-
430 // Tests the timers, time control, and timestep system to ensure they
-
431 // are all working as expected and behaving properly
-
432 #define TIMER_TEST 0
+
185 // This should not be set to 0, it should be a specific maximum for
+
186 // each separate device
+
187 //
+
188 #define MAX_MODES 5
+
189 
+
190 // Default Tickrate in Ticks Per Second (TPS)
+
191 //
+
192 // The valid range for this is 1 <= x <= 1000000 (default 1000)
+
193 //
+
194 // Any value near or above 10000 will most likely be too fast for
+
195 // the processor to handle.
+
196 //
+
197 // Any value less than 100 and you risk a single tick taking longer
+
198 // than some pattern timings which results in very weird behaviour
+
199 //
+
200 // It's probably best that you leave this at 1000
+
201 //
+
202 // WARNING:
+
203 //
+
204 // The timer system was not designed to handle ticks that are not
+
205 // exactly 1 ms. This means that if you change the tickrate to any
+
206 // value other than 1000 the timer system will miss alarms, patterns
+
207 // will not look correct and there is no fix at the moment.
+
208 //
+
209 #define DEFAULT_TICKRATE 1000
+
210 
+
211 // Pair time offset in ticks
+
212 //
+
213 // This changes how many ticks out of sync each finger will run.
+
214 // So 33 means each finger runs 33 ticks out of sync with the
+
215 // previous finger.
+
216 //
+
217 // This was an early feature that fell into disrepair, I don't
+
218 // think it works anymore and really hasn't proven to be useful
+
219 #define DEFAULT_TICK_OFFSET 0
+
220 
+
221 // Max Memory Usage
+
222 //
+
223 // The maximum memory usage allowed by the memory tracker.
+
224 // The memory tracker isn't present in final builds, only debug
+
225 // so this number doesn't actually do anything in production.
+
226 // Mostly for catching leaks or high memory usage in development.
+
227 #define MAX_MEMORY 8000
+
228 
+
229 // Log Level
+
230 //
+
231 // Set the logging level to control info/error/debug logs accordingly
+
232 // The available logging levels are:
+
233 //
+
234 // 0 Off All logging is disabled
+
235 // 1 Info Only info logs are present
+
236 // 2 Errors Info and error logs are present
+
237 // 3 Debug All logs are present, info, error, and debug
+
238 //
+
239 #define LOGGING_LEVEL 0
+
240 
+
241 // Log to Console
+
242 //
+
243 // Enable logging to console, still need to change LOGGING_LEVEL
+
244 // this only enables the console output connection
+
245 #define LOG_TO_CONSOLE 0
+
246 
+
247 // Log to File
+
248 //
+
249 // Enable this configuration to enable logging to the file
+
250 #define LOG_TO_FILE 0
+
251 
+
252 // Log Name
+
253 //
+
254 // The name of the file on disk that will receive the log info
+
255 #define VORTEX_LOG_NAME "vortexlog"
+
256 
+
257 // HSV to RGB Conversion Algorithm
+
258 //
+
259 // Here you can choose the HSV to RGB conversion algorithm, this will
+
260 // control the overall appearance of all colours produced with HSV.
+
261 // The available options are:
+
262 //
+
263 // 1 FastLED 'hsv to rgb rainbow'
+
264 // 2 FastLED 'hsv to rgb raw C'
+
265 // 3 generic hsv to rgb 'pastel'
+
266 //
+
267 // Option 1 is the default and legacy choice, also looks best because
+
268 // it puts even weight into every color of the rainbow which involves
+
269 // stretching some segments like yellow to take up more hue space.
+
270 //
+
271 // Note you can still call the other routines from your pattern code,
+
272 // for example blend and complementary blend use hsv to rgb 'pastel'
+
273 // because it looks better than hsv to rgb rainbow
+
274 #define HSV_TO_RGB_ALGORITHM 3
+
275 
+
276 // IR Receiver Time-out Duration (ms)
+
277 //
+
278 // This is the amount of time in ms for the IR receiver to wait
+
279 // before reseting itself in the case that communication gets
+
280 // interrupted.
+
281 #define IR_RECEIVER_TIMEOUT_DURATION 2000
+
282 
+
283 // IR Sender Wait Duration (ms)
+
284 //
+
285 // This is the amount of time in ms for the IR sender to wait
+
286 // between IR sends. This duration allows the user to give input
+
287 // as it is not possible to give input during a send.
+
288 #define IR_SENDER_WAIT_DURATION 2000
+
289 
+
290 // Enter Advanced Menus Click Duration (ms)
+
291 //
+
292 // How long the user must long click on the menu item to enter the
+
293 // 'advanced' version of the menu
+
294 #define ADVANCED_MENU_ENTER_DURATION 1500
+
295 
+
296 // Brightness Options
+
297 //
+
298 // These are the four options available in the global brightness menu
+
299 // There is only four options, be careful not to go too low
+
300 #define BRIGHTNESS_OPTION_1 40
+
301 #define BRIGHTNESS_OPTION_2 120
+
302 #define BRIGHTNESS_OPTION_3 185
+
303 #define BRIGHTNESS_OPTION_4 255
+
304 
+
305 // Saturation Options
+
306 //
+
307 // These are the four saturations available in the color selection menu
+
308 // Any color can be picked with any of these 4 saturations
+
309 #define SAT_OPTION_1 0
+
310 #define SAT_OPTION_2 85
+
311 #define SAT_OPTION_3 170
+
312 #define SAT_OPTION_4 255
+
313 
+
314 // Value/Luminance Options
+
315 //
+
316 // These are the four values/luminance options in the color selection menu
+
317 // Any color can be picked with any of these 4 values
+
318 #define VAL_OPTION_1 0
+
319 #define VAL_OPTION_2 85
+
320 #define VAL_OPTION_3 170
+
321 #define VAL_OPTION_4 255
+
322 
+
323 // ===================================================================
+
324 // Boolean Configurations (0 or 1)
+
325 
+
326 // Fill From Thumb
+
327 //
+
328 // The ring menu will fill from the thumb if this is present, otherwise
+
329 // it will fill from the pinkie.
+
330 //
+
331 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
+
332 #define FILL_FROM_THUMB 1
+
333 
+
334 // Demo All Patterns
+
335 //
+
336 // The default modes that are set on the gloveset will be dynamically
+
337 // generated with one mode per pattern in the patterns list
+
338 //
+
339 // This can be used to quickly demo all possible patterns, mostly useful
+
340 // for testing and development
+
341 #define DEMO_ALL_PATTERNS 0
+
342 
+
343 // Debug Allocations
+
344 //
+
345 // Tracks all memory allocations and logs them, useful for finding leaks
+
346 //
+
347 // Note tracking allocations while using the test framework will be inaccurate
+
348 // because the test framework allocations will be caught as well.
+
349 //
+
350 // When the test framework does things like display a color for the first time
+
351 // it will allocate space permanently for the new brush and never free it
+
352 #define DEBUG_ALLOCATIONS 0
+
353 
+
354 // Variable Tickrate
+
355 //
+
356 // This controls whether the setTickrate function is available and
+
357 // whether changing the tickrate is allowed. This goes hand-in-hand
+
358 // with the Default Tickrate configuration above
+
359 //
+
360 // The tickrate should always be fixed in final builds because this
+
361 // functionality induces extra performance costs and the intended
+
362 // tickrate for the final build should already be known.
+
363 //
+
364 // However there may be some clever uses for variable tickrate in
+
365 // the final build? I'm not sure.
+
366 #define VARIABLE_TICKRATE 0
+
367 
+
368 // Error Blinker System
+
369 //
+
370 // This toggles the vortex error blinker system, this system reports
+
371 // fatal errors as a series of blinks. If an error is encountered the
+
372 // chip will only blink out the error code from there forward.
+
373 //
+
374 // Note that enabling this system takes a non-negligible amount
+
375 // of space for all of the code, it really should only be used
+
376 // for debug settings or given tiers like logging level.
+
377 //
+
378 // This is mainly useful for tracking down issues on devices that don't
+
379 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
+
380 // set the error code and then the device will blink out the error
+
381 //
+
382 // for ex: red red green blue blue blue is code 213
+
383 //
+
384 // See Log/ErrorBlinker.h for details on the error codes
+
385 #define VORTEX_ERROR_BLINK 0
+
386 
+
387 // Fixed LED Count
+
388 //
+
389 // Do not allow the Mode loader to dynamically load however many modes
+
390 // are saved in the savefile. This should be enabled for embedded or vortex
+
391 // device builds because they cannot change their number of LEDs. However
+
392 // other tools like the editor or vortex emulator may be able to make use
+
393 // of this to dynamically adjust the number of leds that a mode can handle
+
394 //
+
395 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
+
396 // a mode will stretch it's list of patterns to match the number of leds
+
397 #define FIXED_LED_COUNT 1
+
398 
+
399 // Enable Editor Connection
+
400 //
+
401 // Turn on the editor connection, some devices are capable of connecting to
+
402 // the pc-based editor, this controls whether the engine exposes the purple
+
403 // editor connection menu or not
+
404 #define ENABLE_EDITOR_CONNECTION 0
+
405 
+
406 // Compression Test
+
407 //
+
408 // Run the built-in compression test that will find any faults
+
409 // in the compressor or decompressor. This is useful if you install
+
410 // a new compressor or want to test any changes to the compressor
+
411 #define COMPRESSION_TEST 0
+
412 
+
413 // Serialization Test
+
414 //
+
415 // Run the serializer/unserializer test which will find any objects
+
416 // which don't serialize and unserialize cleanly
+
417 #define SERIALIZATION_TEST 0
+
418 
+
419 // Modes Test
+
420 //
+
421 // Run unit tests on the Modes class which manages the list of Modes.
+
422 // If any patterns fail to instantiate or perform basic operations
+
423 // it should show up in the modes test. Also if the Modes api has been
+
424 // updated then this will test for any issues
+
425 #define MODES_TEST 0
+
426 
+
427 // Timer Test
+
428 //
+
429 // Tests the timers, time control, and timestep system to ensure they
+
430 // are all working as expected and behaving properly
+
431 #define TIMER_TEST 0
+
432 
433 
-
434 
-
435 // ===================================================================
-
436 // Menu Colors
-
437 //
-
438 // These are the colors for the respective menus, each color should
-
439 // be unique and distinct from the others. It should also be bright
-
440 // enough to be seen on the lowest brightness setting of the device
-
441 //
-
442 // See the below header for all of the available color constants
-
443 #include "Colors/ColorConstants.h"
-
444 
-
445 // Randomizer Menu Color
-
446 #define RGB_MENU_RANDOMIZER RGB_WHITE1
-
447 
-
448 // Mode Sharing Menu Color
-
449 #define RGB_MENU_MODE_SHARING RGB_CYAN1
-
450 
-
451 // Editor Connection Menu Color
-
452 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
-
453 
-
454 // Color Select Menu Color
-
455 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
-
456 
-
457 // Pattern Select Menu Color
-
458 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
-
459 
-
460 // Global Brightness Menu Color
-
461 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
-
462 
-
463 // Factory Reset Menu Color
-
464 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
434 // ===================================================================
+
435 // Menu Colors
+
436 //
+
437 // These are the colors for the respective menus, each color should
+
438 // be unique and distinct from the others. It should also be bright
+
439 // enough to be seen on the lowest brightness setting of the device
+
440 //
+
441 // See the below header for all of the available color constants
+
442 #include "Colors/ColorConstants.h"
+
443 
+
444 // Randomizer Menu Color
+
445 #define RGB_MENU_RANDOMIZER RGB_WHITE1
+
446 
+
447 // Mode Sharing Menu Color
+
448 #define RGB_MENU_MODE_SHARING RGB_CYAN1
+
449 
+
450 // Editor Connection Menu Color
+
451 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
+
452 
+
453 // Color Select Menu Color
+
454 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
+
455 
+
456 // Pattern Select Menu Color
+
457 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
+
458 
+
459 // Global Brightness Menu Color
+
460 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
+
461 
+
462 // Factory Reset Menu Color
+
463 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
464 
465 
-
466 
-
467 // ===================================================================
-
468 // Editor Verbs
-
469 //
-
470 // These are the commands used in the protocol with the editor.
-
471 // They are defined here so the editor can access them easily,
-
472 // also so you can configure them at your own free will.
-
473 
-
474 // the initial hello from the gloveset to the editor
-
475 // is the full name of this build of vortex
-
476 #define EDITOR_VERB_GREETING_PREFIX "== "
-
477 #define EDITOR_VERB_GREETING_POSTFIX " =="
-
478 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
-
479 
-
480 // the hello from the editor to the gloves
-
481 #define EDITOR_VERB_HELLO "a"
-
482 
-
483 // the response from the gloveset when it's ready to receive something
-
484 // after the editor has given it a command to do something the gloveset
-
485 // will respond with this then once it's done doing the action it will
-
486 // send a different finished response for each action
-
487 #define EDITOR_VERB_READY "b"
-
488 
-
489 // the command from the editor to send modes over
-
490 #define EDITOR_VERB_PULL_MODES "c"
-
491 // the response from the editor once modes are received
-
492 #define EDITOR_VERB_PULL_MODES_DONE "d"
-
493 // the response from the gloves once it acknowledges the editor got the modes
-
494 #define EDITOR_VERB_PULL_MODES_ACK "e"
-
495 
-
496 // the command from the editor to send modes over
-
497 #define EDITOR_VERB_PUSH_MODES "f"
-
498 // the response from the gloveset when it received the mode
-
499 #define EDITOR_VERB_PUSH_MODES_ACK "g"
-
500 
-
501 // the command from the editor to tell the gloveset to demo a mode
-
502 #define EDITOR_VERB_DEMO_MODE "h"
-
503 // the response from the gloveset when it's received the mode to demo
-
504 #define EDITOR_VERB_DEMO_MODE_ACK "i"
-
505 
-
506 // the command from the editor to tell the gloveset to clear the demo
-
507 #define EDITOR_VERB_CLEAR_DEMO "j"
-
508 // the response from the gloveset when it's received disabled the demo
-
509 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
-
510 
-
511 // when the gloveset is leaving the menu and needs to tell the editor
-
512 // that it's no longer listening
-
513 #define EDITOR_VERB_GOODBYE "l"
-
514 
-
515 // ===================================================================
-
516 // Manually Configured Sizes
-
517 //
-
518 // These are the various storage space constants of the vortex device
-
519 
-
520 // the space available for storing modes, we can't make this too big
-
521 // otherwise we will have trouble loading it into memory
-
522 #define STORAGE_SIZE 384
-
523 
-
524 // ===================================================================
-
525 // Test Framework configurations
-
526 //
-
527 // * Unless you are using the test framework, don't touch these! *
+
466 // ===================================================================
+
467 // Editor Verbs
+
468 //
+
469 // These are the commands used in the protocol with the editor.
+
470 // They are defined here so the editor can access them easily,
+
471 // also so you can configure them at your own free will.
+
472 
+
473 // the initial hello from the gloveset to the editor
+
474 // is the full name of this build of vortex
+
475 #define EDITOR_VERB_GREETING_PREFIX "== "
+
476 #define EDITOR_VERB_GREETING_POSTFIX " =="
+
477 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
+
478 
+
479 // the hello from the editor to the gloves
+
480 #define EDITOR_VERB_HELLO "a"
+
481 
+
482 // the response from the gloveset when it's ready to receive something
+
483 // after the editor has given it a command to do something the gloveset
+
484 // will respond with this then once it's done doing the action it will
+
485 // send a different finished response for each action
+
486 #define EDITOR_VERB_READY "b"
+
487 
+
488 // the command from the editor to send modes over
+
489 #define EDITOR_VERB_PULL_MODES "c"
+
490 // the response from the editor once modes are received
+
491 #define EDITOR_VERB_PULL_MODES_DONE "d"
+
492 // the response from the gloves once it acknowledges the editor got the modes
+
493 #define EDITOR_VERB_PULL_MODES_ACK "e"
+
494 
+
495 // the command from the editor to send modes over
+
496 #define EDITOR_VERB_PUSH_MODES "f"
+
497 // the response from the gloveset when it received the mode
+
498 #define EDITOR_VERB_PUSH_MODES_ACK "g"
+
499 
+
500 // the command from the editor to tell the gloveset to demo a mode
+
501 #define EDITOR_VERB_DEMO_MODE "h"
+
502 // the response from the gloveset when it's received the mode to demo
+
503 #define EDITOR_VERB_DEMO_MODE_ACK "i"
+
504 
+
505 // the command from the editor to tell the gloveset to clear the demo
+
506 #define EDITOR_VERB_CLEAR_DEMO "j"
+
507 // the response from the gloveset when it's received disabled the demo
+
508 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
+
509 
+
510 // when the gloveset is leaving the menu and needs to tell the editor
+
511 // that it's no longer listening
+
512 #define EDITOR_VERB_GOODBYE "l"
+
513 
+
514 // ===================================================================
+
515 // Manually Configured Sizes
+
516 //
+
517 // These are the various storage space constants of the vortex device
+
518 
+
519 // maximum size of a mode here
+
520 #define MAX_MODE_SIZE 76
+
521 
+
522 // the number of storage slots for modes, add 1 for the header
+
523 #define NUM_MODE_SLOTS (MAX_MODES + 1)
+
524 
+
525 // the space available for storing modes, we can't make this too big
+
526 // otherwise we will have trouble loading it into memory
+
527 #define STORAGE_SIZE 384
528 
-
529 // These defines come from the project settings for preprocessor, an
-
530 // entry for $(SolutionName) produces preprocessor definitions that
-
531 // match the solution that is compiling the engine
-
532 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
-
533 #define VORTEX_EMBEDDED 1
-
534 #endif
-
535 
-
536 // if building for editor or test framework then we're building vortex lib, it should
-
537 // be defined in the project settings but sometimes it's not for example if a cpp file
-
538 // from the test framework includes a header from the engine it might not have VORTEX_LIB
-
539 // this will ensure that anything which includes this config file will have VORTEX_LIB
-
540 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
-
541 #undef VORTEX_LIB
-
542 #define VORTEX_LIB
-
543 #endif
-
544 
-
545 #ifdef VORTEX_LIB
-
546 #undef VORTEX_SLIM
-
547 #define VORTEX_SLIM 0
-
548 
-
549 // The test framework needs brighter menu colors can't really see them on the screen
-
550 #undef RGB_MENU_RANDOMIZER
-
551 #undef RGB_MENU_MODE_SHARING
-
552 #undef RGB_MENU_EDITOR_CONNECTION
-
553 #undef RGB_MENU_COLOR_SELECT
-
554 #undef RGB_MENU_PATTERN_SELECT
-
555 #undef RGB_MENU_BRIGHTNESS_SELECT
-
556 #undef RGB_MENU_FACTORY_RESET
-
557 #define RGB_MENU_RANDOMIZER RGB_WHITE4
-
558 #define RGB_MENU_MODE_SHARING RGB_CYAN4
-
559 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
-
560 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
-
561 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
-
562 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
-
563 #define RGB_MENU_FACTORY_RESET RGB_RED4
-
564 
-
565 #endif // ifdef VORTEX_LIB
-
566 
-
567 // This will be defined if the project is being built inside the test framework
-
568 #ifdef PROJECT_NAME_VortexTestingFramework
+
529 // ===================================================================
+
530 // Test Framework configurations
+
531 //
+
532 // * Unless you are using the test framework, don't touch these! *
+
533 
+
534 // These defines come from the project settings for preprocessor, an
+
535 // entry for $(SolutionName) produces preprocessor definitions that
+
536 // match the solution that is compiling the engine
+
537 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
+
538 #define VORTEX_EMBEDDED 1
+
539 #endif
+
540 
+
541 // if building for editor or test framework then we're building vortex lib, it should
+
542 // be defined in the project settings but sometimes it's not for example if a cpp file
+
543 // from the test framework includes a header from the engine it might not have VORTEX_LIB
+
544 // this will ensure that anything which includes this config file will have VORTEX_LIB
+
545 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
+
546 #undef VORTEX_LIB
+
547 #define VORTEX_LIB
+
548 #endif
+
549 
+
550 #ifdef VORTEX_LIB
+
551 #undef VORTEX_SLIM
+
552 #define VORTEX_SLIM 0
+
553 
+
554 // The test framework needs brighter menu colors can't really see them on the screen
+
555 #undef RGB_MENU_RANDOMIZER
+
556 #undef RGB_MENU_MODE_SHARING
+
557 #undef RGB_MENU_EDITOR_CONNECTION
+
558 #undef RGB_MENU_COLOR_SELECT
+
559 #undef RGB_MENU_PATTERN_SELECT
+
560 #undef RGB_MENU_BRIGHTNESS_SELECT
+
561 #undef RGB_MENU_FACTORY_RESET
+
562 #define RGB_MENU_RANDOMIZER RGB_WHITE4
+
563 #define RGB_MENU_MODE_SHARING RGB_CYAN4
+
564 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
+
565 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
+
566 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
+
567 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
+
568 #define RGB_MENU_FACTORY_RESET RGB_RED4
569 
-
570 // In the test framework variable tickrate must be enabled to allow
-
571 // the tickrate slider to function, also the test framework never runs
-
572 // at full tickrate, maximum is 500 tps
-
573 #undef VARIABLE_TICKRATE
-
574 #define VARIABLE_TICKRATE 1
-
575 
-
576 #undef DEFAULT_BRIGHTNESS
-
577 #define DEFAULT_BRIGHTNESS 255
-
578 
-
579 // test framework needs more time to click idk
-
580 #undef CONSECUTIVE_WINDOW
-
581 #define CONSECUTIVE_WINDOW 300
-
582 
-
583 // force logging to 3 on linux build
-
584 #ifndef _WIN32
-
585 #undef LOGGING_LEVEL
-
586 #define LOGGING_LEVEL 3
-
587 #endif
-
588 
-
589 #endif // VortexTestingFramework
-
590 
-
591 // This will be defined if the project is being built inside the editor
-
592 #ifdef PROJECT_NAME_VortexEditor
+
570 #endif // ifdef VORTEX_LIB
+
571 
+
572 // This will be defined if the project is being built inside the test framework
+
573 #ifdef PROJECT_NAME_VortexTestingFramework
+
574 
+
575 // In the test framework variable tickrate must be enabled to allow
+
576 // the tickrate slider to function, also the test framework never runs
+
577 // at full tickrate, maximum is 500 tps
+
578 #undef VARIABLE_TICKRATE
+
579 #define VARIABLE_TICKRATE 1
+
580 
+
581 #undef DEFAULT_BRIGHTNESS
+
582 #define DEFAULT_BRIGHTNESS 255
+
583 
+
584 // test framework needs more time to click idk
+
585 #undef CONSECUTIVE_WINDOW
+
586 #define CONSECUTIVE_WINDOW 300
+
587 
+
588 // force logging to 3 on linux build
+
589 #ifndef _WIN32
+
590 #undef LOGGING_LEVEL
+
591 #define LOGGING_LEVEL 3
+
592 #endif
593 
-
594 // The editor needs an unfixed led count in order to load any mode
-
595 #undef FIXED_LED_COUNT
-
596 #define FIXED_LED_COUNT 0
-
597 
-
598 #endif // VortexEditor
-
599 
-
600 // When running in the test framework with demo all patterns enabled
-
601 // we should change the max patterns to the total pattern count because
-
602 // the test framework can handle the memory usage and we can't demo
-
603 // all the patterns without the increased limit
-
604 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
-
605  #undef MAX_MODES
-
606  #include "Patterns/Patterns.h"
-
607  #define MAX_MODES 0
-
608  #undef LOGGING_LEVEL
-
609  #define LOGGING_LEVEL 3
-
610 #endif
-
611 
-
612 #endif // VORTEX_CONFIG_H
+
594 #endif // VortexTestingFramework
+
595 
+
596 // This will be defined if the project is being built inside the editor
+
597 #ifdef PROJECT_NAME_VortexEditor
+
598 
+
599 // The editor needs an unfixed led count in order to load any mode
+
600 #undef FIXED_LED_COUNT
+
601 #define FIXED_LED_COUNT 0
+
602 
+
603 #endif // VortexEditor
+
604 
+
605 // When running in the test framework with demo all patterns enabled
+
606 // we should change the max patterns to the total pattern count because
+
607 // the test framework can handle the memory usage and we can't demo
+
608 // all the patterns without the increased limit
+
609 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
+
610  #undef MAX_MODES
+
611  #include "Patterns/Patterns.h"
+
612  #define MAX_MODES 0
+
613  #undef LOGGING_LEVEL
+
614  #define LOGGING_LEVEL 3
+
615 #endif
+
616 
+
617 #endif // VORTEX_CONFIG_H
diff --git a/docs/duo/VortexEngine_8cpp_source.html b/docs/duo/VortexEngine_8cpp_source.html index b122fa8a83..b95276a59e 100644 --- a/docs/duo/VortexEngine_8cpp_source.html +++ b/docs/duo/VortexEngine_8cpp_source.html @@ -199,7 +199,7 @@
111 {
112  // cleanup in reverse order
-
113  // NOTE: the arduino doesn't actually cleanup,
+
113  // NOTE: the embedded doesn't actually cleanup,
114  // but the test frameworks do
115 #ifdef VORTEX_LIB
116  Modes::cleanup();
@@ -759,7 +759,7 @@
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:164
#define DEVICE_LOCK_CLICKS
Definition: VortexConfig.h:86
#define VORTEX_VERSION_MINOR
Definition: VortexConfig.h:17
-
#define STORAGE_SIZE
Definition: VortexConfig.h:522
+
#define STORAGE_SIZE
Definition: VortexConfig.h:527
#define AUTO_CYCLE_MODES_CLICKS
Definition: VortexConfig.h:120
#define VORTEX_VERSION_MAJOR
Definition: VortexConfig.h:10
#define AUTO_RANDOM_DELAY
Definition: VortexConfig.h:111
@@ -832,14 +832,14 @@
static PatternArgs getDefaultArgs(PatternID id)
void getArgs(PatternArgs &args) const
Definition: Pattern.cpp:121
Definition: Random.h:6
-
static bool init()
Definition: Storage.cpp:45
-
static void cleanup()
Definition: Storage.cpp:55
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:174
+
static bool init()
Definition: Storage.cpp:46
+
static void cleanup()
Definition: Storage.cpp:56
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:177
static bool init()
Definition: TimeControl.cpp:51
static uint32_t getCurtime()
Definition: TimeControl.h:40
-
static void tickClock()
Definition: TimeControl.cpp:79
+
static void tickClock()
Definition: TimeControl.cpp:91
static void delayMicroseconds(uint32_t us)
-
static void cleanup()
Definition: TimeControl.cpp:75
+
static void cleanup()
Definition: TimeControl.cpp:87
static void cleanup()
Definition: VLReceiver.cpp:62
static bool init()
Definition: VLReceiver.cpp:52
static void cleanup()
Definition: VLSender.cpp:38
diff --git a/docs/duo/classBlendPattern.html b/docs/duo/classBlendPattern.html index 646759bc76..997df8e09d 100644 --- a/docs/duo/classBlendPattern.html +++ b/docs/duo/classBlendPattern.html @@ -468,7 +468,7 @@

46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -478,7 +478,7 @@

56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/duo/classByteStream.html b/docs/duo/classByteStream.html index 5254988a3a..5efa715548 100644 --- a/docs/duo/classByteStream.html +++ b/docs/duo/classByteStream.html @@ -440,7 +440,7 @@

References isCRCDirty(), m_pData, and ByteStream::RawBuffer::verify().

-

Referenced by Storage::read().

+

Referenced by Storage::read().

@@ -472,7 +472,7 @@

References m_capacity, m_pData, m_position, and vfree.

-

Referenced by init(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

+

Referenced by init(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

@@ -904,7 +904,7 @@

References ByteStream::RawBuffer::buf, clear(), ByteStream::RawBuffer::crc32, ERROR_OUT_OF_MEMORY, ByteStream::RawBuffer::flags, m_capacity, m_pData, ByteStream::RawBuffer::recalcCRC(), size(), ByteStream::RawBuffer::size, and vcalloc.

-

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

+

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

@@ -1406,7 +1406,7 @@

References m_pData.

-

Referenced by VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

@@ -1492,7 +1492,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), VLReceiver::receiveMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), VLReceiver::receiveMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

@@ -1532,7 +1532,7 @@

References BUFFER_FLAG_DIRTY, ByteStream::RawBuffer::crc32, ByteStream::RawBuffer::flags, m_pData, ByteStream::RawBuffer::recalcCRC(), and ByteStream::RawBuffer::size.

-

Referenced by compress(), Randomizer::init(), and SerialComs::write().

+

Referenced by compress(), Randomizer::init(), Storage::write(), and SerialComs::write().

@@ -1588,7 +1588,7 @@

References m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by decompress(), rawInit(), and Storage::read().

+

Referenced by decompress(), rawInit(), and Storage::read().

@@ -1769,7 +1769,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), and Modes::unserialize().

+

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), and Modes::unserialize().

diff --git a/docs/duo/classColorSelect.html b/docs/duo/classColorSelect.html index c206acf666..48ffb4d9f2 100644 --- a/docs/duo/classColorSelect.html +++ b/docs/duo/classColorSelect.html @@ -1075,10 +1075,10 @@

SAT_OPTION_2,
}
-
#define SAT_OPTION_3
Definition: VortexConfig.h:312
-
#define SAT_OPTION_2
Definition: VortexConfig.h:311
-
#define SAT_OPTION_4
Definition: VortexConfig.h:313
-
#define SAT_OPTION_1
Definition: VortexConfig.h:310
+
#define SAT_OPTION_3
Definition: VortexConfig.h:311
+
#define SAT_OPTION_2
Definition: VortexConfig.h:310
+
#define SAT_OPTION_4
Definition: VortexConfig.h:312
+
#define SAT_OPTION_1
Definition: VortexConfig.h:309

Definition at line 40 of file ColorSelect.h.

@@ -1111,10 +1111,10 @@

VAL_OPTION_2,
}
-
#define VAL_OPTION_1
Definition: VortexConfig.h:319
-
#define VAL_OPTION_2
Definition: VortexConfig.h:320
-
#define VAL_OPTION_4
Definition: VortexConfig.h:322
-
#define VAL_OPTION_3
Definition: VortexConfig.h:321
+
#define VAL_OPTION_1
Definition: VortexConfig.h:318
+
#define VAL_OPTION_2
Definition: VortexConfig.h:319
+
#define VAL_OPTION_4
Definition: VortexConfig.h:321
+
#define VAL_OPTION_3
Definition: VortexConfig.h:320

Definition at line 48 of file ColorSelect.h.

diff --git a/docs/duo/classEditorConnection.html b/docs/duo/classEditorConnection.html index ca7e60168b..0641f96c1d 100644 --- a/docs/duo/classEditorConnection.html +++ b/docs/duo/classEditorConnection.html @@ -438,13 +438,13 @@

293  m_state = STATE_CLEAR_DEMO;
294  }
295 }
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:490
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:507
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:497
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:502
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:489
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:506
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:496
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:501
bool receiveMessage(const char *message)
-

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

+

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

Referenced by run().

@@ -525,11 +525,11 @@

187  SerialComs::write(EDITOR_VERB_GOODBYE);
188  Menu::leaveMenu(true);
189 }
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:513
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:512
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:153
static void write(const char *msg,...)
Definition: Serial.cpp:70
-

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

+

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

Referenced by onLongClick().

@@ -955,13 +955,13 @@

167  }
168  return MENU_CONTINUE;
169 }
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:499
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:487
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:492
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:509
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:504
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:494
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:498
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:486
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:491
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:508
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:503
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:493
@@ -974,7 +974,7 @@

static bool checkSerial()
Definition: Serial.cpp:36
static bool isConnected()
Definition: Serial.cpp:30
-

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

+

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

diff --git a/docs/duo/classFactoryReset.html b/docs/duo/classFactoryReset.html index a12324a4e7..298168946a 100644 --- a/docs/duo/classFactoryReset.html +++ b/docs/duo/classFactoryReset.html @@ -330,7 +330,7 @@

77  // restore defaults and then leave menu and save
78  if (m_advanced) {
79  // reset the target mode slot on the target led
- +
81  Mode *cur = Modes::curMode();
83  const DefaultLedEntry &led = defMode.leds[pos];
@@ -348,7 +348,7 @@

95  leaveMenu(true);
96 }
Button * g_pButton
Definition: Buttons.cpp:16
-
const DefaultModeEntry defaultModes[]
Definition: DefaultModes.cpp:7
+
const DefaultModeEntry defaultModes[MAX_MODES]
Definition: DefaultModes.cpp:7
#define MAP_FOREACH_LED(map)
Definition: LedTypes.h:113
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
#define FACTORY_RESET_THRESHOLD_TICKS
Definition: Timings.h:23
diff --git a/docs/duo/classGlobalBrightness.html b/docs/duo/classGlobalBrightness.html index a86c2be235..966fbd7471 100644 --- a/docs/duo/classGlobalBrightness.html +++ b/docs/duo/classGlobalBrightness.html @@ -768,10 +768,10 @@

BRIGHTNESS_OPTION_3,
}
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:304
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:303
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:302
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:301
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:303
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:302
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:301
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:300

Definition at line 23 of file GlobalBrightness.h.

diff --git a/docs/duo/classLeds.html b/docs/duo/classLeds.html index fece06ad8d..37552c453b 100644 --- a/docs/duo/classLeds.html +++ b/docs/duo/classLeds.html @@ -1537,9 +1537,9 @@

270  Time::delayMilliseconds(250);
271 }
static void update()
Definition: Leds.cpp:273
-
static void delayMilliseconds(uint32_t ms)
+
static void delayMilliseconds(uint32_t ms)
-

References Time::delayMilliseconds(), setAll(), and update().

+

References Time::delayMilliseconds(), setAll(), and update().

Referenced by PatternSelect::onLongClick(), PatternSelect::onShortClick(), Randomizer::run(), VortexEngine::runMainLogic(), and Menus::runMenuSelection().

diff --git a/docs/duo/classMenu.html b/docs/duo/classMenu.html index c884f487d0..5ce143a9e3 100644 --- a/docs/duo/classMenu.html +++ b/docs/duo/classMenu.html @@ -751,7 +751,7 @@

Definition at line 59 of file Menu.h.

-

Referenced by ColorSelect::ColorSelect(), ColorSelect::init(), FactoryReset::init(), GlobalBrightness::init(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), PatternSelect::onLongClick(), ColorSelect::onShortClick(), GlobalBrightness::onShortClick(), PatternSelect::onShortClick(), ModeSharing::receiveMode(), Randomizer::reRoll(), ColorSelect::run(), GlobalBrightness::run(), PatternSelect::run(), and ModeSharing::showReceiveMode().

+

Referenced by ColorSelect::ColorSelect(), ColorSelect::init(), FactoryReset::init(), GlobalBrightness::init(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), PatternSelect::onLongClick(), ColorSelect::onShortClick(), GlobalBrightness::onShortClick(), PatternSelect::onShortClick(), ModeSharing::receiveMode(), Randomizer::reRoll(), ColorSelect::run(), GlobalBrightness::run(), PatternSelect::run(), and ModeSharing::showReceiveMode().

@@ -855,7 +855,7 @@

Definition at line 48 of file Menu.h.

-

Referenced by EditorConnection::clearDemo(), init(), ColorSelect::init(), ColorSelect::onLongClick(), ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), ColorSelect::onShortClick(), PatternSelect::onShortClick(), EditorConnection::receiveDemoMode(), ModeSharing::receiveMode(), Randomizer::reRoll(), ColorSelect::run(), PatternSelect::run(), Randomizer::run(), GlobalBrightness::runKeychainMode(), GlobalBrightness::setKeychainModeState(), EditorConnection::showEditor(), and ModeSharing::showReceiveMode().

+

Referenced by EditorConnection::clearDemo(), init(), ColorSelect::init(), ColorSelect::onLongClick(), ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), ColorSelect::onShortClick(), PatternSelect::onShortClick(), EditorConnection::receiveDemoMode(), ModeSharing::receiveMode(), Randomizer::reRoll(), ColorSelect::run(), PatternSelect::run(), Randomizer::run(), GlobalBrightness::runKeychainMode(), GlobalBrightness::setKeychainModeState(), EditorConnection::showEditor(), and ModeSharing::showReceiveMode().

@@ -907,7 +907,7 @@

Definition at line 53 of file Menu.h.

-

Referenced by FactoryReset::init(), nextBulbSelection(), ColorSelect::onLedSelected(), PatternSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), ColorSelect::onShortClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and showBulbSelection().

+

Referenced by FactoryReset::init(), nextBulbSelection(), ColorSelect::onLedSelected(), PatternSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), ColorSelect::onShortClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and showBulbSelection().

diff --git a/docs/duo/classMode.html b/docs/duo/classMode.html index 0137991460..f3247f1773 100644 --- a/docs/duo/classMode.html +++ b/docs/duo/classMode.html @@ -1168,7 +1168,7 @@

References Pattern::init(), LED_FIRST, m_singlePats, and MODE_LEDCOUNT.

-

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), ColorSelect::init(), loadFromBuffer(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and GlobalBrightness::setKeychainModeState().

+

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), ColorSelect::init(), loadFromBuffer(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and GlobalBrightness::setKeychainModeState().

@@ -1719,7 +1719,7 @@

References LED_ALL, LED_ALL_SINGLE, LED_ANY, LED_COUNT, LED_FIRST, LED_MULTI, m_singlePats, and Pattern::setColorset().

-

Referenced by clearColorset(), ColorSelect::init(), ColorSelect::onLongClick(), Randomizer::reRoll(), and setColorsetMap().

+

Referenced by clearColorset(), ColorSelect::init(), ColorSelect::onLongClick(), Randomizer::reRoll(), and setColorsetMap().

@@ -1878,7 +1878,7 @@

References Pattern::bind(), clearPattern(), getColorset(), isMultiLedPatternID(), LED_ALL, LED_ALL_SINGLE, LED_ANY, LED_COUNT, LED_FIRST, LED_MULTI, m_singlePats, PatternBuilder::makeMulti(), PatternBuilder::makeSingle(), and Pattern::setColorset().

-

Referenced by EditorConnection::clearDemo(), clearPattern(), Mode(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), Randomizer::rollPattern(), GlobalBrightness::setKeychainModeState(), and setPatternMap().

+

Referenced by EditorConnection::clearDemo(), clearPattern(), Mode(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), Randomizer::rollPattern(), GlobalBrightness::setKeychainModeState(), and setPatternMap().

diff --git a/docs/duo/classModes.html b/docs/duo/classModes.html index 9a9c09aeb1..65336c4b11 100644 --- a/docs/duo/classModes.html +++ b/docs/duo/classModes.html @@ -300,12 +300,12 @@

422  return true;
423 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
-
#define MAX_MODES
Definition: VortexConfig.h:189
+
#define MAX_MODES
Definition: VortexConfig.h:188
static ModeLink * m_storedModes
Definition: Modes.h:221
static uint8_t m_numModes
Definition: Modes.h:215
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -371,7 +371,7 @@

Definition: Mode.h:39
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:375
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

@@ -502,7 +502,7 @@

331  return true;
332 }
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -552,7 +552,7 @@

virtual void init()
Definition: Mode.cpp:130
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:263
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

Referenced by unserialize().

@@ -1180,9 +1180,9 @@

static bool oneClickModeEnabled()
Definition: Modes.h:119
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:114
static Mode * switchToStartupMode()
Definition: Modes.cpp:583
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:112
+
static bool read(ByteStream &buffer)
Definition: Storage.cpp:115
-

References clearModes(), DEBUG_LOG, loadFromBuffer(), oneClickModeEnabled(), Storage::read(), ByteStream::size(), and switchToStartupMode().

+

References clearModes(), DEBUG_LOG, loadFromBuffer(), oneClickModeEnabled(), Storage::read(), ByteStream::size(), and switchToStartupMode().

Referenced by init().

@@ -1403,7 +1403,7 @@

68  return;
69  }
70  // shortclick either turns off the lights, cycles to the next mode
-
71  // or possible locks the lights based on the situation
+
71  // or possibly locks the lights based on the situation
72  if (g_pButton->onShortClick()) {
74  // enter sleep doesn't return on arduino, but it does on vortexlib
@@ -1585,11 +1585,11 @@

190  DEBUG_LOG("Success saving modes to storage");
191  return true;
192 }
-
#define STORAGE_SIZE
Definition: VortexConfig.h:522
+
#define STORAGE_SIZE
Definition: VortexConfig.h:527
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:87
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:60
+
static bool write(ByteStream &buffer)
Definition: Storage.cpp:61
-

References DEBUG_LOG, saveToBuffer(), STORAGE_SIZE, and Storage::write().

+

References DEBUG_LOG, saveToBuffer(), STORAGE_SIZE, and Storage::write().

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

@@ -1890,7 +1890,7 @@

285 #else
286  // add each default mode with each of the given colors
287  for (uint8_t i = 0; i < MAX_MODES; ++i) {
-
288  Mode defMode(defaultModes[i]);
+
288  Mode defMode(defaultModes[i]);
289  if (!addMode(&defMode)) {
290  ERROR_LOGF("Failed to add default mode %u", i);
291  return false;
@@ -1899,7 +1899,7 @@

294 #endif
295  return true;
296 }
-
const DefaultModeEntry defaultModes[]
Definition: DefaultModes.cpp:7
+
const DefaultModeEntry defaultModes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:20
@ LED_FIRST
Definition: LedTypes.h:13
@@ -1910,7 +1910,7 @@

@ PATTERN_LAST
Definition: Patterns.h:100
void randomize(Random &ctx, uint8_t numColors=0)
Definition: Colorset.cpp:222
-

References addMode(), clearModes(), DEBUG_LOGF, defaultModes, ERROR_LOG, ERROR_LOGF, LED_COUNT, LED_FIRST, MAX_MODES, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, and Colorset::randomize().

+

References addMode(), clearModes(), DEBUG_LOGF, defaultModes, ERROR_LOG, ERROR_LOGF, LED_COUNT, LED_FIRST, MAX_MODES, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, and Colorset::randomize().

Referenced by init(), and FactoryReset::onLongClick().

diff --git a/docs/duo/classPatternArgs.html b/docs/duo/classPatternArgs.html index 6b5a403cdf..f6f08a05b7 100644 --- a/docs/duo/classPatternArgs.html +++ b/docs/duo/classPatternArgs.html @@ -1110,7 +1110,7 @@

References PatternArgs().

-

Referenced by Randomizer::crushPattern(), Randomizer::dashPattern(), Randomizer::gapPattern(), Pattern::getArgs(), GlobalBrightness::setKeychainModeState(), and Randomizer::traditionalPattern().

+

Referenced by Randomizer::crushPattern(), Randomizer::dashPattern(), Randomizer::gapPattern(), Pattern::getArgs(), GlobalBrightness::setKeychainModeState(), and Randomizer::traditionalPattern().

diff --git a/docs/duo/classPatternBuilder.html b/docs/duo/classPatternBuilder.html index 93fd06e458..6478164437 100644 --- a/docs/duo/classPatternBuilder.html +++ b/docs/duo/classPatternBuilder.html @@ -426,12 +426,12 @@

153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/duo/classRandom.html b/docs/duo/classRandom.html index b5604ae322..245d0504fc 100644 --- a/docs/duo/classRandom.html +++ b/docs/duo/classRandom.html @@ -275,7 +275,7 @@

References next16().

-

Referenced by Colorset::addColorWithValueStyle(), Randomizer::crushPattern(), Randomizer::dashPattern(), Randomizer::gapPattern(), MeteorPattern::poststep(), SparkleTracePattern::poststep(), Colorset::randomize(), Colorset::randomizeColors(), Colorset::randomizeColors2(), Randomizer::rollColorset(), Randomizer::rollPattern(), Randomizer::rollPatternID(), and Randomizer::traditionalPattern().

+

Referenced by Colorset::addColorWithValueStyle(), Randomizer::crushPattern(), Randomizer::dashPattern(), Randomizer::gapPattern(), MeteorPattern::poststep(), SparkleTracePattern::poststep(), Colorset::randomize(), Colorset::randomizeColors(), Colorset::randomizeColors2(), Randomizer::rollColorset(), Randomizer::rollPattern(), Randomizer::rollPatternID(), and Randomizer::traditionalPattern().

diff --git a/docs/duo/classRandomizer.html b/docs/duo/classRandomizer.html index 3b7b343b7e..9ebfe38166 100644 --- a/docs/duo/classRandomizer.html +++ b/docs/duo/classRandomizer.html @@ -358,16 +358,16 @@

-

Definition at line 238 of file Randomizer.cpp.

-
239 {
-
240  outArgs.init(
-
241  ctx.next8(1, 10), // on duration 1 -> 10
-
242  ctx.next8(0, 10), // off duration 0 -> 5
-
243  ctx.next8(20, 40), // need gap 20 -> 40
-
244  0, // dash 0
-
245  ctx.next8(0, 8) // groupsize 0 to 8
-
246  );
-
247 }
+

Definition at line 237 of file Randomizer.cpp.

+
238 {
+
239  outArgs.init(
+
240  ctx.next8(1, 10), // on duration 1 -> 10
+
241  ctx.next8(0, 10), // off duration 0 -> 5
+
242  ctx.next8(20, 40), // need gap 20 -> 40
+
243  0, // dash 0
+
244  ctx.next8(0, 8) // groupsize 0 to 8
+
245  );
+
246 }
uint8_t next8(uint8_t minValue=0, uint8_t maxValue=0xFF)
Definition: Random.cpp:41
@@ -411,15 +411,15 @@

-

Definition at line 228 of file Randomizer.cpp.

-
229 {
-
230  outArgs.init(
-
231  ctx.next8(1, 10), // on duration 1 -> 10
-
232  ctx.next8(0, 10), // off duration 0 -> 10
-
233  ctx.next8(20, 30), // need gap 20 -> 30
-
234  ctx.next8(20, 30) // dash duration 20 -> 30
-
235  );
-
236 }
+

Definition at line 227 of file Randomizer.cpp.

+
228 {
+
229  outArgs.init(
+
230  ctx.next8(1, 10), // on duration 1 -> 10
+
231  ctx.next8(0, 10), // off duration 0 -> 10
+
232  ctx.next8(20, 30), // need gap 20 -> 30
+
233  ctx.next8(20, 30) // dash duration 20 -> 30
+
234  );
+
235 }

References PatternArgs::init(), and Random::next8().

@@ -461,14 +461,14 @@

-

Definition at line 219 of file Randomizer.cpp.

-
220 {
-
221  outArgs.init(
-
222  ctx.next8(1, 10), // on duration 1 -> 10
-
223  ctx.next8(0, 6), // off duration 0 -> 6
-
224  ctx.next8(40, 100) // gap duration 40 -> 100
-
225  );
-
226 }
+

Definition at line 218 of file Randomizer.cpp.

+
219 {
+
220  outArgs.init(
+
221  ctx.next8(1, 10), // on duration 1 -> 10
+
222  ctx.next8(0, 6), // off duration 0 -> 6
+
223  ctx.next8(40, 100) // gap duration 40 -> 100
+
224  );
+
225 }

References PatternArgs::init(), and Random::next8().

@@ -625,9 +625,9 @@

97  reRoll();

98 }
-
bool reRoll()
Definition: Randomizer.cpp:260
+
bool reRoll()
Definition: Randomizer.cpp:259

-

References m_flags, m_needToSelect, RANDOMIZE_BOTH, RANDOMIZE_COLORSET, and reRoll().

+

References m_flags, m_needToSelect, RANDOMIZE_BOTH, RANDOMIZE_COLORSET, and reRoll().

@@ -646,39 +646,39 @@

-

Definition at line 260 of file Randomizer.cpp.

-
261 {
- -
263  // grab local reference to the target random context
-
264  Random &ctx = m_singlesRandCtx[pos];
-
265  if (m_flags & RANDOMIZE_PATTERN) {
-
266  // roll a new pattern
-
267  if (m_advanced) {
-
268  if (!rollPattern(ctx, &m_previewMode, pos)) {
-
269  ERROR_LOG("Failed to roll new pattern");
-
270  return false;
-
271  }
-
272  } else {
-
273  if (!m_previewMode.setPattern(rollPatternID(ctx), pos)) {
-
274  ERROR_LOG("Failed to roll new pattern");
-
275  return false;
-
276  }
-
277  }
-
278  }
-
279  if (m_flags & RANDOMIZE_COLORSET) {
-
280  // roll a new colorset
-
281  if (!m_previewMode.setColorset(rollColorset(ctx), pos)) {
-
282  ERROR_LOG("Failed to roll new colorset");
-
283  return false;
-
284  }
-
285  }
-
286  }
-
287  // initialize the mode with the new pattern and colorset
- -
289  DEBUG_LOGF("Randomized Led %u set with randomization technique %u, %u colors, and Pattern number %u",
-
290  pos, randType, randomSet.numColors(), newPat);
-
291  return true;
-
292 }
+

Definition at line 259 of file Randomizer.cpp.

+
260 {
+ +
262  // grab local reference to the target random context
+
263  Random &ctx = m_singlesRandCtx[pos];
+
264  if (m_flags & RANDOMIZE_PATTERN) {
+
265  // roll a new pattern
+
266  if (m_advanced) {
+
267  if (!rollPattern(ctx, &m_previewMode, pos)) {
+
268  ERROR_LOG("Failed to roll new pattern");
+
269  return false;
+
270  }
+
271  } else {
+
272  if (!m_previewMode.setPattern(rollPatternID(ctx), pos)) {
+
273  ERROR_LOG("Failed to roll new pattern");
+
274  return false;
+
275  }
+
276  }
+
277  }
+
278  if (m_flags & RANDOMIZE_COLORSET) {
+
279  // roll a new colorset
+
280  if (!m_previewMode.setColorset(rollColorset(ctx), pos)) {
+
281  ERROR_LOG("Failed to roll new colorset");
+
282  return false;
+
283  }
+
284  }
+
285  }
+
286  // initialize the mode with the new pattern and colorset
+ +
288  DEBUG_LOGF("Randomized Led %u set with randomization technique %u, %u colors, and Pattern number %u",
+
289  pos, randType, randomSet.numColors(), newPat);
+
290  return true;
+
291 }
#define MAP_FOREACH_LED(map)
Definition: LedTypes.h:113
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
@@ -688,11 +688,11 @@

bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:501

bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:580
Definition: Random.h:6
-
PatternID rollPatternID(Random &ctx)
Definition: Randomizer.cpp:249
+
PatternID rollPatternID(Random &ctx)
Definition: Randomizer.cpp:248
bool rollPattern(Random &ctx, Mode *pMode, LedPos pos)
Definition: Randomizer.cpp:178
Colorset rollColorset(Random &ctx)
Definition: Randomizer.cpp:129
-

References DEBUG_LOGF, ERROR_LOG, Mode::init(), Menu::m_advanced, m_flags, Menu::m_previewMode, m_singlesRandCtx, Menu::m_targetLeds, MAP_FOREACH_LED, RANDOMIZE_COLORSET, RANDOMIZE_PATTERN, rollColorset(), rollPattern(), rollPatternID(), Mode::setColorset(), and Mode::setPattern().

+

References DEBUG_LOGF, ERROR_LOG, Mode::init(), Menu::m_advanced, m_flags, Menu::m_previewMode, m_singlesRandCtx, Menu::m_targetLeds, MAP_FOREACH_LED, RANDOMIZE_COLORSET, RANDOMIZE_PATTERN, rollColorset(), rollPattern(), rollPatternID(), Mode::setColorset(), and Mode::setPattern().

Referenced by onShortClick(), and run().

@@ -780,7 +780,7 @@

References Colorset::addColor(), Colorset::get(), Random::next8(), Colorset::numColors(), Colorset::randomize(), Colorset::randomizeColors(), and Colorset::randomizeColors2().

-

Referenced by reRoll().

+

Referenced by reRoll().

@@ -845,30 +845,29 @@

196  crushPattern(ctx, args);
197  break;
198  }
-
199 
-
200  PatternID newPat = PATTERN_STROBE;
-
201  // 1/3 chance to roll a blend pattern instead which will animate between
-
202  // colors instead of blinking each color in the set
-
203  if (!ctx.next8(0, 3)) {
-
204  newPat = PATTERN_BLEND;
-
205  // this is the number of blinks to a complementary color
-
206  args.arg7 = ctx.next8(0, 3);
-
207  }
-
208  return pMode->setPattern(newPat, pos, &args);
-
209 }
+
199  PatternID newPat = PATTERN_STROBE;
+
200  // 1/3 chance to roll a blend pattern instead which will animate between
+
201  // colors instead of blinking each color in the set
+
202  if (!ctx.next8(0, 3)) {
+
203  newPat = PATTERN_BLEND;
+
204  // this is the number of blinks to a complementary color
+
205  args.arg7 = ctx.next8(0, 3);
+
206  }
+
207  return pMode->setPattern(newPat, pos, &args);
+
208 }
PatternID
Definition: Patterns.h:12
@ PATTERN_STROBE
Definition: Patterns.h:25
@ PATTERN_BLEND
Definition: Patterns.h:50
uint8_t arg7
Definition: PatternArgs.h:89
-
void crushPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:238
-
void gapPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:219
-
void dashPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:228
-
void traditionalPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:211
+
void crushPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:237
+
void gapPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:218
+
void dashPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:227
+
void traditionalPattern(Random &ctx, PatternArgs &outArgs)
Definition: Randomizer.cpp:210
-

References PatternArgs::arg7, crushPattern(), dashPattern(), gapPattern(), Random::next8(), PATTERN_BLEND, PATTERN_STROBE, Mode::setPattern(), and traditionalPattern().

+

References PatternArgs::arg7, crushPattern(), dashPattern(), gapPattern(), Random::next8(), PATTERN_BLEND, PATTERN_STROBE, Mode::setPattern(), and traditionalPattern().

-

Referenced by reRoll().

+

Referenced by reRoll().

@@ -896,16 +895,16 @@

-

Definition at line 249 of file Randomizer.cpp.

-
250 {
-
251  PatternID newPat;
-
252  // the random range begin/end
-
253  do {
-
254  // continuously re-randomize the pattern so we don't get undesirable patterns
- -
256  } while (newPat == PATTERN_SOLID || newPat == PATTERN_RIBBON || newPat == PATTERN_MINIRIBBON);
-
257  return newPat;
-
258 }
+

Definition at line 248 of file Randomizer.cpp.

+
249 {
+
250  PatternID newPat;
+
251  // the random range begin/end
+
252  do {
+
253  // continuously re-randomize the pattern so we don't get undesirable patterns
+ +
255  } while (newPat == PATTERN_SOLID || newPat == PATTERN_RIBBON || newPat == PATTERN_MINIRIBBON);
+
256  return newPat;
+
257 }
@ PATTERN_RIBBON
Definition: Patterns.h:48
@ PATTERN_SINGLE_LAST
Definition: Patterns.h:65
@ PATTERN_MINIRIBBON
Definition: Patterns.h:49
@@ -914,7 +913,7 @@

References Random::next8(), PATTERN_MINIRIBBON, PATTERN_RIBBON, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, and PATTERN_SOLID.

-

Referenced by reRoll().

+

Referenced by reRoll().

@@ -979,7 +978,7 @@

Button * g_pButton
Definition: Buttons.cpp:16
#define RGB_RED
#define RGB_GREEN
-
#define AUTO_RANDOM_DELAY_TICKS
Definition: Timings.h:16
+
#define AUTO_RANDOM_DELAY_TICKS
Definition: Timings.h:15
#define AUTO_CYCLE_RANDOMIZER_CLICKS
Definition: VortexConfig.h:126
bool onRelease() const
Definition: Button.h:36
bool onConsecutivePresses(uint8_t numPresses)
Definition: Button.cpp:170
@@ -992,7 +991,7 @@

void showRandomizationSelect()
Definition: Randomizer.cpp:114
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References AUTO_CYCLE_RANDOMIZER_CLICKS, AUTO_RANDOM_DELAY_TICKS, g_pButton, Time::getCurtime(), Leds::holdAll(), m_autoCycle, m_lastRandomization, m_needToSelect, Menu::m_previewMode, Menu::MENU_CONTINUE, Button::onConsecutivePresses(), Button::onRelease(), Mode::play(), reRoll(), RGB_GREEN, RGB_RED, Menu::run(), showRandomizationSelect(), and Menus::showSelection().

+

References AUTO_CYCLE_RANDOMIZER_CLICKS, AUTO_RANDOM_DELAY_TICKS, g_pButton, Time::getCurtime(), Leds::holdAll(), m_autoCycle, m_lastRandomization, m_needToSelect, Menu::m_previewMode, Menu::MENU_CONTINUE, Button::onConsecutivePresses(), Button::onRelease(), Mode::play(), reRoll(), RGB_GREEN, RGB_RED, Menu::run(), showRandomizationSelect(), and Menus::showSelection().

@@ -1084,13 +1083,13 @@

-

Definition at line 211 of file Randomizer.cpp.

-
212 {
-
213  outArgs.init(
-
214  ctx.next8(1, 20), // on duration 1 -> 20
-
215  ctx.next8(8, 60) // off duration 0 -> 60
-
216  );
-
217 }
+

Definition at line 210 of file Randomizer.cpp.

+
211 {
+
212  outArgs.init(
+
213  ctx.next8(1, 20), // on duration 1 -> 20
+
214  ctx.next8(8, 60) // off duration 0 -> 60
+
215  );
+
216 }

References PatternArgs::init(), and Random::next8().

@@ -1173,7 +1172,7 @@

Definition at line 48 of file Randomizer.h.

-

Referenced by onShortClick(), reRoll(), and showRandomizationSelect().

+

Referenced by onShortClick(), reRoll(), and showRandomizationSelect().

@@ -1251,7 +1250,7 @@

Definition at line 29 of file Randomizer.h.

-

Referenced by init(), and reRoll().

+

Referenced by init(), and reRoll().

diff --git a/docs/duo/classStorage.html b/docs/duo/classStorage.html index e494d2656a..f1216ac0b1 100644 --- a/docs/duo/classStorage.html +++ b/docs/duo/classStorage.html @@ -153,9 +153,9 @@

-

Definition at line 41 of file Storage.cpp.

-
42 {
-
43 }
+

Definition at line 42 of file Storage.cpp.

+
43 {
+
44 }
@@ -183,9 +183,9 @@

-

Definition at line 55 of file Storage.cpp.

-
56 {
-
57 }
+

Definition at line 56 of file Storage.cpp.

+
57 {
+
58 }

Referenced by VortexEngine::cleanup().

@@ -215,16 +215,16 @@

-

Definition at line 207 of file Storage.cpp.

-
208 {
-
209  if (index > 255) {
-
210  // USERROW start
-
211  return *(uint8_t *)(0x1300 + (index & 0xFF));
-
212  }
-
213  return *(uint8_t *)(MAPPED_EEPROM_START + index);
-
214 }
+

Definition at line 210 of file Storage.cpp.

+
211 {
+
212  if (index > 255) {
+
213  // USERROW start
+
214  return *(uint8_t *)(0x1300 + (index & 0xFF));
+
215  }
+
216  return *(uint8_t *)(MAPPED_EEPROM_START + index);
+
217 }
-

Referenced by read(), and write().

+

Referenced by read(), and write().

@@ -262,33 +262,33 @@

-

Definition at line 181 of file Storage.cpp.

-
182 {
-
183  uint16_t adr;
-
184  // The first two pages of the data goes into the eeprom and then the last page goes
-
185  // into the USERROW which is located at 0x1300
-
186  if (index > 255) {
-
187  adr = 0x1300 + (index & 0xFF);
-
188  } else {
-
189  adr = MAPPED_EEPROM_START + index;
-
190  }
-
191  __asm__ __volatile__(
-
192  "ldi r30, 0x00" "\n\t"
-
193  "ldi r31, 0x10" "\n\t"
-
194  "ldd r18, Z+2" "\n\t"
-
195  "andi r18, 3" "\n\t"
-
196  "brne .-6" "\n\t"
-
197  "st X, %0" "\n\t"
-
198  "ldi %0, 0x9D" "\n\t"
-
199  "out 0x34, %0" "\n\t"
-
200  "ldi %0, 0x03" "\n\t"
-
201  "st Z, %0" "\n\t"
-
202  :"+d"(in)
-
203  : "x"(adr)
-
204  : "r30", "r31", "r18");
-
205 }
+

Definition at line 184 of file Storage.cpp.

+
185 {
+
186  uint16_t adr;
+
187  // The first two pages of the data goes into the eeprom and then the last page goes
+
188  // into the USERROW which is located at 0x1300
+
189  if (index > 255) {
+
190  adr = 0x1300 + (index & 0xFF);
+
191  } else {
+
192  adr = MAPPED_EEPROM_START + index;
+
193  }
+
194  __asm__ __volatile__(
+
195  "ldi r30, 0x00" "\n\t"
+
196  "ldi r31, 0x10" "\n\t"
+
197  "ldd r18, Z+2" "\n\t"
+
198  "andi r18, 3" "\n\t"
+
199  "brne .-6" "\n\t"
+
200  "st X, %0" "\n\t"
+
201  "ldi %0, 0x9D" "\n\t"
+
202  "out 0x34, %0" "\n\t"
+
203  "ldi %0, 0x03" "\n\t"
+
204  "st Z, %0" "\n\t"
+
205  :"+d"(in)
+
206  : "x"(adr)
+
207  : "r30", "r31", "r18");
+
208 }
-

Referenced by write().

+

Referenced by write().

@@ -315,18 +315,18 @@

-

Definition at line 45 of file Storage.cpp.

-
46 {
-
47 #ifdef VORTEX_LIB
-
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
50  }
-
51 #endif
-
52  return true;
-
53 }
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:30
+

Definition at line 46 of file Storage.cpp.

+
47 {
+
48 #ifdef VORTEX_LIB
+
49  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
50  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
51  }
+
52 #endif
+
53  return true;
+
54 }
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:31
-

References DEFAULT_STORAGE_FILENAME.

+

References DEFAULT_STORAGE_FILENAME.

Referenced by VortexEngine::init().

@@ -355,10 +355,10 @@

-

Definition at line 174 of file Storage.cpp.

-
175 {
-
176  return m_lastSaveSize;
-
177 }
+

Definition at line 177 of file Storage.cpp.

+
178 {
+
179  return m_lastSaveSize;
+
180 }
static uint32_t m_lastSaveSize
Definition: Storage.h:44

References m_lastSaveSize.

@@ -389,71 +389,71 @@

-

Definition at line 112 of file Storage.cpp.

-
113 {
-
114 #ifdef VORTEX_LIB
-
115  if (!Vortex::storageEnabled()) {
-
116  // return false here, but true in write because we don't want to return
-
117  // an empty buffer after returning true
-
118  return false;
-
119  }
-
120  uint16_t size = STORAGE_SIZE;
-
121 #else
-
122  uint16_t size = *(uint16_t *)MAPPED_EEPROM_START;
-
123 #endif
-
124  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
125  size = STORAGE_SIZE;
-
126  }
-
127  if (!buffer.init(size)) {
-
128  return false;
+

Definition at line 115 of file Storage.cpp.

+
116 {
+
117 #ifdef VORTEX_LIB
+
118  if (!Vortex::storageEnabled()) {
+
119  // return false here, but true in write because we don't want to return
+
120  // an empty buffer after returning true
+
121  return false;
+
122  }
+
123  uint16_t size = STORAGE_SIZE;
+
124 #else
+
125  uint16_t size = *(uint16_t *)MAPPED_EEPROM_START;
+
126 #endif
+
127  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
+
128  size = STORAGE_SIZE;
129  }
-
130 #ifdef VORTEX_EMBEDDED
-
131  // Read the data from EEPROM first
-
132  uint8_t *pos = (uint8_t *)buffer.rawData();
-
133  uint16_t fullsize = buffer.rawSize() + size;
-
134  for (uint16_t i = 0; i < fullsize; ++i) {
-
135  pos[i] = eepromReadByte(i);
-
136  }
-
137 #elif defined(_WIN32)
-
138  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
139  if (hFile == INVALID_HANDLE_VALUE) {
-
140  // error
-
141  return false;
-
142  }
-
143  DWORD bytesRead = 0;
-
144  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
145  // error
-
146  return false;
-
147  }
-
148  CloseHandle(hFile);
-
149 #else
-
150  FILE *f = fopen(STORAGE_FILENAME, "r");
-
151  if (!f) {
-
152  return false;
-
153  }
-
154  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
+
130  if (!buffer.init(size)) {
+
131  return false;
+
132  }
+
133 #ifdef VORTEX_EMBEDDED
+
134  // Read the data from EEPROM first
+
135  uint8_t *pos = (uint8_t *)buffer.rawData();
+
136  uint16_t fullsize = buffer.rawSize() + size;
+
137  for (uint16_t i = 0; i < fullsize; ++i) {
+
138  pos[i] = eepromReadByte(i);
+
139  }
+
140 #elif defined(_WIN32)
+
141  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
142  if (hFile == INVALID_HANDLE_VALUE) {
+
143  // error
+
144  return false;
+
145  }
+
146  DWORD bytesRead = 0;
+
147  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
+
148  // error
+
149  return false;
+
150  }
+
151  CloseHandle(hFile);
+
152 #else
+
153  FILE *f = fopen(STORAGE_FILENAME, "r");
+
154  if (!f) {
155  return false;
156  }
-
157  fclose(f);
-
158 #endif
-
159  // ensure the internal buffer is sane after reading it out, this
-
160  // prevents segfaults if the internal size reports larger than capacity
-
161  buffer.sanity();
-
162  // check crc immediately since we read into raw data copying the
-
163  // array could be dangerous
-
164  if (!buffer.checkCRC()) {
-
165  buffer.clear();
-
166  ERROR_LOG("Could not verify buffer");
-
167  return false;
-
168  }
-
169  m_lastSaveSize = size;
-
170  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
171  return true;
-
172 }
+
157  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
+
158  return false;
+
159  }
+
160  fclose(f);
+
161 #endif
+
162  // ensure the internal buffer is sane after reading it out, this
+
163  // prevents segfaults if the internal size reports larger than capacity
+
164  buffer.sanity();
+
165  // check crc immediately since we read into raw data copying the
+
166  // array could be dangerous
+
167  if (!buffer.checkCRC()) {
+
168  buffer.clear();
+
169  ERROR_LOG("Could not verify buffer");
+
170  return false;
+
171  }
+
172  m_lastSaveSize = size;
+
173  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
174  return true;
+
175 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define STORAGE_FILENAME
Definition: Storage.cpp:36
-
#define STORAGE_SIZE
Definition: VortexConfig.h:522
+
#define STORAGE_FILENAME
Definition: Storage.cpp:37
+
#define STORAGE_SIZE
Definition: VortexConfig.h:527
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
void * rawData() const
Definition: ByteStream.h:121
uint32_t rawSize() const
Definition: ByteStream.h:122
@@ -461,10 +461,10 @@

uint32_t size() const
Definition: ByteStream.h:123

bool checkCRC() const
Definition: ByteStream.cpp:327
void sanity()
Definition: ByteStream.cpp:319
-
static uint8_t eepromReadByte(uint16_t index)
Definition: Storage.cpp:207
+
static uint8_t eepromReadByte(uint16_t index)
Definition: Storage.cpp:210
-

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, eepromReadByte(), ERROR_LOG, ByteStream::init(), m_lastSaveSize, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, eepromReadByte(), ERROR_LOG, ByteStream::init(), m_lastSaveSize, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

Referenced by Modes::loadStorage().

@@ -494,59 +494,62 @@

-

Definition at line 60 of file Storage.cpp.

-
61 {
-
62 #ifdef VORTEX_LIB
-
63  if (!Vortex::storageEnabled()) {
-
64  // success so the system thinks it all worked
-
65  return true;
-
66  }
-
67 #endif
-
68  // Check size
-
69  uint16_t size = buffer.rawSize();
-
70  if (!size || size > STORAGE_SIZE) {
-
71  ERROR_LOG("Buffer too big for storage space");
-
72  return false;
-
73  }
-
74 #ifdef VORTEX_EMBEDDED
-
75  const uint8_t *buf = (const uint8_t *)buffer.rawData();
-
76  // start writing to eeprom
-
77  for (uint16_t i = 0; i < size; ++i) {
-
78  if (buf[i] != eepromReadByte(i)) {
-
79  eepromWriteByte(i, buf[i]);
-
80  }
-
81  }
-
82  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
83  if ((NVMCTRL.STATUS & 4) != 0) {
-
84  return false;
-
85  }
-
86 #elif defined(_WIN32)
-
87  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
88  if (hFile == INVALID_HANDLE_VALUE) {
-
89  // error
-
90  return false;
-
91  }
-
92  DWORD written = 0;
-
93  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
94  // error
-
95  return false;
-
96  }
-
97  CloseHandle(hFile);
-
98 #else
-
99  FILE *f = fopen(STORAGE_FILENAME, "w");
-
100  if (!f) {
-
101  return false;
-
102  }
-
103  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
+

Definition at line 61 of file Storage.cpp.

+
62 {
+
63 #ifdef VORTEX_LIB
+
64  if (!Vortex::storageEnabled()) {
+
65  // success so the system thinks it all worked
+
66  return true;
+
67  }
+
68 #endif
+
69  // Check size
+
70  uint16_t size = buffer.rawSize();
+
71  if (!size || size > STORAGE_SIZE) {
+
72  ERROR_LOG("Buffer too big for storage space");
+
73  return false;
+
74  }
+
75  // just in case
+
76  buffer.recalcCRC();
+
77 #ifdef VORTEX_EMBEDDED
+
78  const uint8_t *buf = (const uint8_t *)buffer.rawData();
+
79  // start writing to eeprom
+
80  for (uint16_t i = 0; i < size; ++i) {
+
81  if (buf[i] != eepromReadByte(i)) {
+
82  eepromWriteByte(i, buf[i]);
+
83  }
+
84  }
+
85  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
86  if ((NVMCTRL.STATUS & 4) != 0) {
+
87  return false;
+
88  }
+
89 #elif defined(_WIN32)
+
90  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
91  if (hFile == INVALID_HANDLE_VALUE) {
+
92  // error
+
93  return false;
+
94  }
+
95  DWORD written = 0;
+
96  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
+
97  // error
+
98  return false;
+
99  }
+
100  CloseHandle(hFile);
+
101 #else
+
102  FILE *f = fopen(STORAGE_FILENAME, "w");
+
103  if (!f) {
104  return false;
105  }
-
106  fclose(f);
-
107 #endif // VORTEX_EMBEDDED
-
108  return true;
-
109 }
-
static void eepromWriteByte(uint16_t index, uint8_t in)
Definition: Storage.cpp:181
+
106  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
+
107  return false;
+
108  }
+
109  fclose(f);
+
110 #endif // VORTEX_EMBEDDED
+
111  return true;
+
112 }
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
+
static void eepromWriteByte(uint16_t index, uint8_t in)
Definition: Storage.cpp:184
-

References DEBUG_LOGF, eepromReadByte(), eepromWriteByte(), ERROR_LOG, m_lastSaveSize, ByteStream::rawData(), ByteStream::rawSize(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References DEBUG_LOGF, eepromReadByte(), eepromWriteByte(), ERROR_LOG, m_lastSaveSize, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::recalcCRC(), STORAGE_FILENAME, and STORAGE_SIZE.

Referenced by Modes::saveStorage().

@@ -575,7 +578,7 @@

Definition at line 44 of file Storage.h.

-

Referenced by lastSaveSize(), read(), and write().

+

Referenced by lastSaveSize(), read(), and write().

diff --git a/docs/duo/classTime-members.html b/docs/duo/classTime-members.html index e189410d01..79d180ee30 100644 --- a/docs/duo/classTime-members.html +++ b/docs/duo/classTime-members.html @@ -97,7 +97,7 @@ getRealCurtime()Timestatic getTickrate()Timestatic init()Timestatic - initMCUTime()Timeprivatestatic + initMCUTime()Timeprivatestatic m_curTickTimeprivatestatic microseconds()Timestatic setTickrate(uint32_t tickrate=0)Timestatic diff --git a/docs/duo/classTime.html b/docs/duo/classTime.html index 236fe70cfd..62aa351026 100644 --- a/docs/duo/classTime.html +++ b/docs/duo/classTime.html @@ -126,8 +126,8 @@ - - + +

Static Private Member Functions

static void initMCUTime ()
 
static void initMCUTime ()
 
@@ -187,9 +187,9 @@

-

Definition at line 75 of file TimeControl.cpp.

- @@ -247,19 +247,19 @@

-

Definition at line 248 of file TimeControl.cpp.

-
249 {
-
250 #ifdef VORTEX_EMBEDDED
-
251  // not very accurate
-
252  for (uint16_t i = 0; i < ms; ++i) {
-
253  delayMicroseconds(1000);
-
254  }
-
255 #elif defined(_WIN32)
-
256  Sleep(ms);
-
257 #else
-
258  usleep(ms * 1000);
-
259 #endif
-
260 }
+

Definition at line 260 of file TimeControl.cpp.

+
261 {
+
262 #ifdef VORTEX_EMBEDDED
+
263  // not very accurate
+
264  for (uint16_t i = 0; i < ms; ++i) {
+
265  delayMicroseconds(1000);
+
266  }
+
267 #elif defined(_WIN32)
+
268  Sleep(ms);
+
269 #else
+
270  usleep(ms * 1000);
+
271 #endif
+
272 }
static void delayMicroseconds(uint32_t us)

References delayMicroseconds().

@@ -325,10 +325,10 @@

-

Definition at line 135 of file TimeControl.cpp.

-
136 {
-
137  return m_curTick;
-
138 }
+

Definition at line 147 of file TimeControl.cpp.

+
148 {
+
149  return m_curTick;
+
150 }

References m_curTick.

@@ -357,10 +357,10 @@

-

Definition at line 140 of file TimeControl.cpp.

-
141 {
-
142  return TICKRATE;
-
143 }
+

Definition at line 152 of file TimeControl.cpp.

+
153 {
+
154  return TICKRATE;
+
155 }
#define TICKRATE
Definition: TimeControl.cpp:48

References TICKRATE.

@@ -393,39 +393,50 @@

Definition at line 51 of file TimeControl.cpp.

52 {
53 #ifdef VORTEX_EMBEDDED
-
54  initMCUTime();
-
55 #endif
-
56  m_curTick = 0;
-
57 #if VARIABLE_TICKRATE == 1
-
58  m_tickrate = DEFAULT_TICKRATE;
-
59 #endif
-
60 #ifdef VORTEX_LIB
-
61  m_firstTime = m_prevTime = microseconds();
-
62  m_simulationTick = 0;
-
63  m_isSimulation = false;
-
64  m_instantTimestep = false;
-
65 #endif
-
66 #if !defined(_WIN32) || defined(WASM)
-
67  start = microseconds();
-
68 #else
-
69  QueryPerformanceFrequency(&tps);
-
70  QueryPerformanceCounter(&start);
+
54  // initialize main clock
+
55 #if (F_CPU == 20000000)
+
56  // No division on clock
+
57  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0x00);
+
58 #elif (F_CPU == 10000000)
+
59  // 20MHz prescaled by 2, Clock DIV2
+
60  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, (CLKCTRL_PEN_bm | CLKCTRL_PDIV_2X_gc));
+
61 #else
+
62  #error "F_CPU not supported"
+
63 #endif
+
64  // IVSEL = 1 means Interrupt vectors are placed at the start of the boot section of the Flash
+
65  // as opposed to the application section of Flash. See 13.5.1
+
66  _PROTECTED_WRITE(CPUINT_CTRLA, CPUINT_IVSEL_bm);
+
67 #endif
+
68  m_curTick = 0;
+
69 #if VARIABLE_TICKRATE == 1
+
70  m_tickrate = DEFAULT_TICKRATE;
71 #endif
-
72  return true;
-
73 }
+
72 #ifdef VORTEX_LIB
+
73  m_firstTime = m_prevTime = microseconds();
+
74  m_simulationTick = 0;
+
75  m_isSimulation = false;
+
76  m_instantTimestep = false;
+
77 #endif
+
78 #if !defined(_WIN32) || defined(WASM)
+
79  start = microseconds();
+
80 #else
+
81  QueryPerformanceFrequency(&tps);
+
82  QueryPerformanceCounter(&start);
+
83 #endif
+
84  return true;
+
85 }
uint64_t start
Definition: TimeControl.cpp:20
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:210
-
static void initMCUTime()
-
static uint32_t microseconds()
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:209
+
static uint32_t microseconds()
-

References DEFAULT_TICKRATE, initMCUTime(), m_curTick, microseconds(), and start.

+

References DEFAULT_TICKRATE, m_curTick, microseconds(), and start.

Referenced by VortexEngine::init().

- -

◆ initMCUTime()

+ +

◆ initMCUTime()

@@ -434,7 +445,7 @@

Static Private Attributes

- + @@ -447,26 +458,6 @@

-

Definition at line 304 of file TimeControl.cpp.

-
305 {
-
306  // initialize main clock
-
307 #if (F_CPU == 20000000)
-
308  // No division on clock
-
309  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, 0x00);
-
310 #elif (F_CPU == 10000000)
-
311  // 20MHz prescaled by 2, Clock DIV2
-
312  _PROTECTED_WRITE(CLKCTRL_MCLKCTRLB, (CLKCTRL_PEN_bm | CLKCTRL_PDIV_2X_gc));
-
313 #else
-
314  #error "F_CPU not supported"
-
315 #endif
-
316 
-
317  // IVSEL = 1 means Interrupt vectors are placed at the start of the boot section of the Flash
-
318  // as opposed to the application section of Flash. See 13.5.1
-
319  _PROTECTED_WRITE(CPUINT_CTRLA, CPUINT_IVSEL_bm);
-
320 }
-
-

Referenced by init().

- @@ -492,34 +483,34 @@

-

Definition at line 180 of file TimeControl.cpp.

-
181 {
-
182 #ifndef VORTEX_LIB // Embedded avr devices
-
183  uint32_t ticks;
-
184  // divide by 10
-
185  ticks = (m_curTick * DEFAULT_TICKRATE) + (TCB0.CNT / 1000);
-
186  return ticks;
-
187 #elif defined(_WIN32) // windows
-
188  LARGE_INTEGER now;
-
189  QueryPerformanceCounter(&now);
-
190  if (!tps.QuadPart) {
-
191  return 0;
-
192  }
-
193  // yes, this will overflow, that's how arduino microseconds() works *shrug*
-
194  return (unsigned long)((now.QuadPart - start.QuadPart) * 1000000 / tps.QuadPart);
-
195 #else // linux/wasm/etc
-
196  struct timespec ts;
-
197  clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
-
198  uint64_t us = SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec);
-
199  return (unsigned long)us;
-
200 #endif
-
201 }
+

Definition at line 192 of file TimeControl.cpp.

+
193 {
+
194 #ifndef VORTEX_LIB // Embedded avr devices
+
195  uint32_t ticks;
+
196  // divide by 10
+
197  ticks = (m_curTick * DEFAULT_TICKRATE) + (TCB0.CNT / 1000);
+
198  return ticks;
+
199 #elif defined(_WIN32) // windows
+
200  LARGE_INTEGER now;
+
201  QueryPerformanceCounter(&now);
+
202  if (!tps.QuadPart) {
+
203  return 0;
+
204  }
+
205  // yes, this will overflow, that's how arduino microseconds() works *shrug*
+
206  return (unsigned long)((now.QuadPart - start.QuadPart) * 1000000 / tps.QuadPart);
+
207 #else // linux/wasm/etc
+
208  struct timespec ts;
+
209  clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
+
210  uint64_t us = SEC_TO_US((uint64_t)ts.tv_sec) + NS_TO_US((uint64_t)ts.tv_nsec);
+
211  return (unsigned long)us;
+
212 #endif
+
213 }
#define NS_TO_US(ns)
Definition: TimeControl.cpp:23
#define SEC_TO_US(sec)
Definition: TimeControl.cpp:22
-

References DEFAULT_TICKRATE, m_curTick, NS_TO_US, SEC_TO_US, and start.

+

References DEFAULT_TICKRATE, m_curTick, NS_TO_US, SEC_TO_US, and start.

-

Referenced by __attribute__(), init(), VLReceiver::recvPCIHandler(), and tickClock().

+

Referenced by __attribute__(), init(), VLReceiver::recvPCIHandler(), and tickClock().

@@ -547,22 +538,22 @@

-

Definition at line 147 of file TimeControl.cpp.

-
148 {
-
149 #if VARIABLE_TICKRATE == 1
-
150  if (!tickrate) {
-
151  // can't set 0 tickrate, so 0 sets default
-
152  tickrate = DEFAULT_TICKRATE;
-
153  } else if (tickrate > 1000000) {
-
154  // more than 1 million ticks per second won't work anyway
-
155  tickrate = 1000000;
-
156  }
-
157  // update the tickrate
-
158  m_tickrate = tickrate;
-
159 #endif
-
160 }
+

Definition at line 159 of file TimeControl.cpp.

+
160 {
+
161 #if VARIABLE_TICKRATE == 1
+
162  if (!tickrate) {
+
163  // can't set 0 tickrate, so 0 sets default
+
164  tickrate = DEFAULT_TICKRATE;
+
165  } else if (tickrate > 1000000) {
+
166  // more than 1 million ticks per second won't work anyway
+
167  tickrate = 1000000;
+
168  }
+
169  // update the tickrate
+
170  m_tickrate = tickrate;
+
171 #endif
+
172 }
-

References DEFAULT_TICKRATE.

+

References DEFAULT_TICKRATE.

@@ -589,64 +580,64 @@

-

Definition at line 79 of file TimeControl.cpp.

-
80 {
-
81  // tick clock forward
-
82  m_curTick++;
-
83 
-
84 #if DEBUG_ALLOCATIONS == 1
-
85  if ((m_curTick % MS_TO_TICKS(1000)) == 0) {
-
86  DEBUG_LOGF("Cur Memory: %u (%u)", cur_memory_usage(), cur_memory_usage_background());
-
87  }
-
88 #endif
-
89 
-
90  // the rest of this only runs inside vortexlib because on the duo the tick runs in the
-
91  // tcb timer callback instead of in a busy loop constantly checking microseconds()
-
92 #ifdef VORTEX_LIB
-
93  if (m_instantTimestep) {
-
94  return;
-
95  }
-
96 
-
97  // perform timestep
-
98  uint32_t elapsed_us;
-
99  uint32_t us;
-
100  do {
-
101  us = microseconds();
-
102  // detect rollover of microsecond counter
-
103  if (us < m_prevTime) {
-
104  // calculate wrapped around difference
-
105  elapsed_us = (uint32_t)((UINT32_MAX - m_prevTime) + us);
-
106  } else {
-
107  // otherwise calculate regular difference
-
108  elapsed_us = (uint32_t)(us - m_prevTime);
-
109  }
-
110  // if building anywhere except visual studio then we can run alternate sleep code
-
111  // because in visual studio + windows it's better to just spin and check the high
-
112  // resolution clock instead of trying to sleep for microseconds.
-
113 #if !defined(_WIN32) && defined(VORTEX_LIB)
-
114  uint32_t required = (1000000 / TICKRATE);
-
115  uint32_t sleepTime = 0;
-
116  if (required > elapsed_us) {
-
117  // in vortex lib on linux we can just sleep instead of spinning
-
118  // but on arduino we must spin and on windows it actually ends
-
119  // up being more accurate to poll QPF + QPC via microseconds()
-
120  sleepTime = required - elapsed_us;
+

Definition at line 91 of file TimeControl.cpp.

+
92 {
+
93  // tick clock forward
+
94  m_curTick++;
+
95 
+
96 #if DEBUG_ALLOCATIONS == 1
+
97  if ((m_curTick % MS_TO_TICKS(1000)) == 0) {
+
98  DEBUG_LOGF("Cur Memory: %u (%u)", cur_memory_usage(), cur_memory_usage_background());
+
99  }
+
100 #endif
+
101 
+
102  // the rest of this only runs inside vortexlib because on the duo the tick runs in the
+
103  // tcb timer callback instead of in a busy loop constantly checking microseconds()
+
104 #ifdef VORTEX_LIB
+
105  if (m_instantTimestep) {
+
106  return;
+
107  }
+
108 
+
109  // perform timestep
+
110  uint32_t elapsed_us;
+
111  uint32_t us;
+
112  do {
+
113  us = microseconds();
+
114  // detect rollover of microsecond counter
+
115  if (us < m_prevTime) {
+
116  // calculate wrapped around difference
+
117  elapsed_us = (uint32_t)((UINT32_MAX - m_prevTime) + us);
+
118  } else {
+
119  // otherwise calculate regular difference
+
120  elapsed_us = (uint32_t)(us - m_prevTime);
121  }
-
122  Time::delayMicroseconds(sleepTime);
-
123  break;
-
124 #endif
-
125  // 1000us per ms, divided by tickrate gives
-
126  // the number of microseconds per tick
-
127  } while (elapsed_us < (1000000 / TICKRATE));
-
128 
-
129  // store current time
-
130  m_prevTime = microseconds();
-
131 #endif
-
132 }
+
122  // if building anywhere except visual studio then we can run alternate sleep code
+
123  // because in visual studio + windows it's better to just spin and check the high
+
124  // resolution clock instead of trying to sleep for microseconds.
+
125 #if !defined(_WIN32) && defined(VORTEX_LIB)
+
126  uint32_t required = (1000000 / TICKRATE);
+
127  uint32_t sleepTime = 0;
+
128  if (required > elapsed_us) {
+
129  // in vortex lib on linux we can just sleep instead of spinning
+
130  // but on embedded we must spin and on windows it actually ends
+
131  // up being more accurate to poll QPF + QPC via microseconds()
+
132  sleepTime = required - elapsed_us;
+
133  }
+
134  Time::delayMicroseconds(sleepTime);
+
135  break;
+
136 #endif
+
137  // 1000us per ms, divided by tickrate gives
+
138  // the number of microseconds per tick
+
139  } while (elapsed_us < (1000000 / TICKRATE));
+
140 
+
141  // store current time
+
142  m_prevTime = microseconds();
+
143 #endif
+
144 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
-

References DEBUG_LOGF, delayMicroseconds(), m_curTick, microseconds(), MS_TO_TICKS, and TICKRATE.

+

References DEBUG_LOGF, delayMicroseconds(), m_curTick, microseconds(), MS_TO_TICKS, and TICKRATE.

Referenced by VortexEngine::tick().

@@ -675,7 +666,7 @@

Definition at line 118 of file TimeControl.h.

-

Referenced by getCurtime(), getRealCurtime(), init(), microseconds(), and tickClock().

+

Referenced by getCurtime(), getRealCurtime(), init(), microseconds(), and tickClock().

diff --git a/docs/duo/classTime.js b/docs/duo/classTime.js index 11fe67d915..bb621eb63d 100644 --- a/docs/duo/classTime.js +++ b/docs/duo/classTime.js @@ -8,7 +8,7 @@ var classTime = [ "getRealCurtime", "classTime.html#a719c88f4e11a83f7167f45a2a58f5d60", null ], [ "getTickrate", "classTime.html#acb7cd2d49094647c3fb7112e15ad16d7", null ], [ "init", "classTime.html#a0058db559daacf8050e8a0b1d4b9fd8c", null ], - [ "initMCUTime", "classTime.html#a4006a9aa5cc0cf1276af05aade63bccc", null ], + [ "initMCUTime", "classTime.html#aee78cfad073e0fcdb09fbcda019e9929", null ], [ "microseconds", "classTime.html#ac44f4e49538456714372bb1aad3dd839", null ], [ "setTickrate", "classTime.html#aaf106aff340ea506f16a010b12f51769", null ], [ "tickClock", "classTime.html#a823b10e685d34b667e16e36fea96e150", null ], diff --git a/docs/duo/classVLReceiver.html b/docs/duo/classVLReceiver.html index 0f4a569650..1404a304a9 100644 --- a/docs/duo/classVLReceiver.html +++ b/docs/duo/classVLReceiver.html @@ -859,12 +859,12 @@

238  // handle the bliank duration and process it
239  handleVLTiming(diff);
240 }
-
static uint32_t microseconds()
+
static uint32_t microseconds()
static void handleVLTiming(uint32_t diff)
Definition: VLReceiver.cpp:243
static uint32_t m_prevTime
Definition: VLReceiver.h:70
static uint8_t m_pinState
Definition: VLReceiver.h:71
-

References DEBUG_LOG, handleVLTiming(), m_pinState, m_prevTime, Time::microseconds(), and resetVLState().

+

References DEBUG_LOG, handleVLTiming(), m_pinState, m_prevTime, Time::microseconds(), and resetVLState().

Referenced by ISR().

diff --git a/docs/duo/classVortexEngine.html b/docs/duo/classVortexEngine.html index 14aeb0b540..401529ea7d 100644 --- a/docs/duo/classVortexEngine.html +++ b/docs/duo/classVortexEngine.html @@ -244,7 +244,7 @@

Definition at line 110 of file VortexEngine.cpp.

111 {
112  // cleanup in reverse order
-
113  // NOTE: the arduino doesn't actually cleanup,
+
113  // NOTE: the embedded doesn't actually cleanup,
114  // but the test frameworks do
115 #ifdef VORTEX_LIB
116  Modes::cleanup();
@@ -261,12 +261,12 @@

static void cleanup()
Definition: Leds.cpp:52

static void cleanup()
Definition: Menus.cpp:77
static void cleanup()
Definition: Modes.cpp:53
-
static void cleanup()
Definition: Storage.cpp:55
-
static void cleanup()
Definition: TimeControl.cpp:75
+
static void cleanup()
Definition: Storage.cpp:56
+
static void cleanup()
Definition: TimeControl.cpp:87
static void cleanup()
Definition: VLReceiver.cpp:62
static void cleanup()
Definition: VLSender.cpp:38
-

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), Storage::cleanup(), Time::cleanup(), VLReceiver::cleanup(), and VLSender::cleanup().

+

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), Storage::cleanup(), Time::cleanup(), VLReceiver::cleanup(), and VLSender::cleanup().

Referenced by wakeup().

@@ -588,12 +588,12 @@

static bool init()
Definition: Menus.cpp:70
static bool init()
Definition: Modes.cpp:30
static bool locked()
Definition: Modes.h:126
-
static bool init()
Definition: Storage.cpp:45
+
static bool init()
Definition: Storage.cpp:46
static bool init()
Definition: TimeControl.cpp:51
static bool init()
Definition: VLReceiver.cpp:52
static bool init()
Definition: VLSender.cpp:33
-

References clearOutputPins(), DEBUG_LOG, enableMOSFET(), Buttons::init(), Leds::init(), Menus::init(), Modes::init(), Storage::init(), Time::init(), VLReceiver::init(), VLSender::init(), Modes::locked(), and m_sleeping.

+

References clearOutputPins(), DEBUG_LOG, enableMOSFET(), Buttons::init(), Leds::init(), Menus::init(), Modes::init(), Storage::init(), Time::init(), VLReceiver::init(), VLSender::init(), Modes::locked(), and m_sleeping.

Referenced by wakeup().

@@ -954,11 +954,11 @@

#define ERROR_NONE
Definition: ErrorBlinker.h:12
bool check()
Definition: Button.cpp:93
static void update()
Definition: Buttons.cpp:35
-
static void tickClock()
Definition: TimeControl.cpp:79
+
static void tickClock()
Definition: TimeControl.cpp:91
static void wakeup(bool reset=true)
static void runMainLogic()
-

References Button::check(), DEVICE_LOCK_CLICKS, ERROR_NONE, g_pButton, Modes::locked(), m_sleeping, Button::onConsecutivePresses(), Button::onRelease(), runMainLogic(), Modes::setLocked(), Time::tickClock(), Buttons::update(), Leds::update(), and wakeup().

+

References Button::check(), DEVICE_LOCK_CLICKS, ERROR_NONE, g_pButton, Modes::locked(), m_sleeping, Button::onConsecutivePresses(), Button::onRelease(), runMainLogic(), Modes::setLocked(), Time::tickClock(), Buttons::update(), Leds::update(), and wakeup().

Referenced by ISR().

diff --git a/docs/duo/dir_000016_000004.html b/docs/duo/dir_000016_000004.html deleted file mode 100644 index 429298560d..0000000000 --- a/docs/duo/dir_000016_000004.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -Vortex Duo: VortexEngine/src/Storage -> Leds Relation - - - - - - - - - - - - - - - -
-
-

void Time::initMCUTime static void Time::initMCUTime ( )
- - - - - -
-
Vortex Duo -
-
-

- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-

Storage → Leds Relation

File in VortexEngine/src/StorageIncludes file in VortexEngine/src/Leds
Storage.cppLeds.h
-
- - - - diff --git a/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.md5 b/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.md5 index b564f3674a..f9ef6d0b97 100644 --- a/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.md5 +++ b/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.md5 @@ -1 +1 @@ -8bfee92d7e164df7c6c7f189ac546664 \ No newline at end of file +54e71cbe3f11baaa859373beae2becef \ No newline at end of file diff --git a/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.svg b/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.svg index 7d2aad1118..5d0c17bbe6 100644 --- a/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.svg +++ b/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep.svg @@ -66,8 +66,8 @@ var sectionId = 'dynsection-0'; dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds @@ -75,18 +75,18 @@ var sectionId = 'dynsection-0'; dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 @@ -94,18 +94,18 @@ var sectionId = 'dynsection-0'; dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 + + + +2 @@ -113,18 +113,18 @@ var sectionId = 'dynsection-0'; dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 @@ -132,18 +132,8 @@ var sectionId = 'dynsection-0'; dir_61b212e579fd471c490a116dc3a4c8cf - -Storage - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + +Storage @@ -151,18 +141,18 @@ var sectionId = 'dynsection-0'; dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 @@ -170,18 +160,18 @@ var sectionId = 'dynsection-0'; dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -189,138 +179,138 @@ var sectionId = 'dynsection-0'; dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 +2 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 @@ -328,68 +318,68 @@ var sectionId = 'dynsection-0'; dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 @@ -397,118 +387,118 @@ var sectionId = 'dynsection-0'; dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 diff --git a/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep_org.svg b/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep_org.svg index 34494ee100..0f6821c140 100644 --- a/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep_org.svg +++ b/docs/duo/dir_4d7f8bf987ecca6ad9438e8e8937cf95_dep_org.svg @@ -20,8 +20,8 @@ dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds @@ -29,18 +29,18 @@ dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 @@ -48,18 +48,18 @@ dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 + + + +2 @@ -67,18 +67,18 @@ dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 @@ -86,18 +86,8 @@ dir_61b212e579fd471c490a116dc3a4c8cf - -Storage - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + +Storage @@ -105,18 +95,18 @@ dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 @@ -124,18 +114,18 @@ dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -143,138 +133,138 @@ dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 +2 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 @@ -282,68 +272,68 @@ dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 @@ -351,118 +341,118 @@ dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 diff --git a/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf.html b/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf.html index 8f7b1d94dc..829ac7c2b0 100644 --- a/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf.html +++ b/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf.html @@ -90,7 +90,7 @@
Directory dependency graph for Storage:
-
+
diff --git a/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.md5 b/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.md5 index 4ac36d7bd5..9682fc723a 100644 --- a/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.md5 +++ b/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.md5 @@ -1 +1 @@ -5b5ee9477d6b328e74a860c931cbdee8 \ No newline at end of file +b72c790095b4f58e23a5c8f6dc092e67 \ No newline at end of file diff --git a/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.svg b/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.svg index 5ad793efbd..0f52cba303 100644 --- a/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.svg +++ b/docs/duo/dir_61b212e579fd471c490a116dc3a4c8cf_dep.svg @@ -4,140 +4,121 @@ - + VortexEngine/src/Storage clusterdir_df02266255841645c523fab960c9ed1d - -src - - - - - -dir_60d51ee7315d72413f26211ac43a217e - - -Leds + +src - + dir_7e29431de6169dbb5f5ee7a990ed2b16 - - -Memory + + +Memory - + dir_9a5c88f87170865d940dc95c76676edb - - -Log + + +Log - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_cabf3d63e98569a74ecb960b83c4a15b - - -Serial + + +Serial - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_61b212e579fd471c490a116dc3a4c8cf - - -Storage - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + + +Storage - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 diff --git a/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.md5 b/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.md5 index df2fef02c0..cac32abad4 100644 --- a/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.md5 +++ b/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.md5 @@ -1 +1 @@ -efaf6898d0f24288be48c31a9a69e886 \ No newline at end of file +c1f319682b7a3963156e2a3e03d3a63b \ No newline at end of file diff --git a/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.svg b/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.svg index cdb9430860..3da2349ed2 100644 --- a/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.svg +++ b/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -57,8 +57,8 @@ var sectionId = 'dynsection-0'; clusterdir_7e4d93e079ad601e0006c23ac3d37255 - -Menus + +Menus @@ -66,8 +66,8 @@ var sectionId = 'dynsection-0'; dir_64b4510cba155c652ac883383ddf0b92 - -MenuList + +MenuList @@ -75,18 +75,18 @@ var sectionId = 'dynsection-0'; dir_1d79b4615f725ce6e1b38311d89b4d4f - -Wireless + +Wireless - + dir_64b4510cba155c652ac883383ddf0b92->dir_1d79b4615f725ce6e1b38311d89b4d4f - - - -2 + + + +2 @@ -94,18 +94,18 @@ var sectionId = 'dynsection-0'; dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes - + dir_64b4510cba155c652ac883383ddf0b92->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -16 + + + +16 @@ -113,18 +113,18 @@ var sectionId = 'dynsection-0'; dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds - + dir_64b4510cba155c652ac883383ddf0b92->dir_60d51ee7315d72413f26211ac43a217e - - - -7 + + + +7 @@ -132,18 +132,18 @@ var sectionId = 'dynsection-0'; dir_61b212e579fd471c490a116dc3a4c8cf - -Storage + +Storage - + dir_64b4510cba155c652ac883383ddf0b92->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 @@ -151,18 +151,18 @@ var sectionId = 'dynsection-0'; dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time - + dir_64b4510cba155c652ac883383ddf0b92->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -13 + + + +13 @@ -170,18 +170,18 @@ var sectionId = 'dynsection-0'; dir_77968f70279e8f688919023f4af8a16f - -Random + +Random - + dir_64b4510cba155c652ac883383ddf0b92->dir_77968f70279e8f688919023f4af8a16f - - - -4 + + + +4 @@ -189,18 +189,18 @@ var sectionId = 'dynsection-0'; dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_64b4510cba155c652ac883383ddf0b92->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 @@ -208,18 +208,18 @@ var sectionId = 'dynsection-0'; dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log - + dir_64b4510cba155c652ac883383ddf0b92->dir_9a5c88f87170865d940dc95c76676edb - - - -7 + + + +7 @@ -227,18 +227,18 @@ var sectionId = 'dynsection-0'; dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial - + dir_64b4510cba155c652ac883383ddf0b92->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -6 + + + +6 @@ -246,18 +246,18 @@ var sectionId = 'dynsection-0'; dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_64b4510cba155c652ac883383ddf0b92->dir_ce91f970b513fb5ff406625265505b14 - - - -6 + + + +6 @@ -265,18 +265,18 @@ var sectionId = 'dynsection-0'; dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns - + dir_64b4510cba155c652ac883383ddf0b92->dir_d3731d706719beb3d6001df5dcff2644 - - - -11 + + + +11 @@ -284,448 +284,438 @@ var sectionId = 'dynsection-0'; dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons - + dir_64b4510cba155c652ac883383ddf0b92->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -6 + + + +6 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_60d51ee7315d72413f26211ac43a217e - - + + -2 +2 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -10 +10 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + + + +2 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 +2 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_ce91f970b513fb5ff406625265505b14->dir_77968f70279e8f688919023f4af8a16f - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_d3731d706719beb3d6001df5dcff2644->dir_77968f70279e8f688919023f4af8a16f - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 diff --git a/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep_org.svg b/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep_org.svg index 06aa8d9d5d..4be519b47e 100644 --- a/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep_org.svg +++ b/docs/duo/dir_64b4510cba155c652ac883383ddf0b92_dep_org.svg @@ -4,15 +4,15 @@ - + VortexEngine/src/Menus/MenuList clusterdir_7e4d93e079ad601e0006c23ac3d37255 - -Menus + +Menus @@ -20,8 +20,8 @@ dir_64b4510cba155c652ac883383ddf0b92 - -MenuList + +MenuList @@ -29,18 +29,18 @@ dir_1d79b4615f725ce6e1b38311d89b4d4f - -Wireless + +Wireless - + dir_64b4510cba155c652ac883383ddf0b92->dir_1d79b4615f725ce6e1b38311d89b4d4f - - - -2 + + + +2 @@ -48,18 +48,18 @@ dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes - + dir_64b4510cba155c652ac883383ddf0b92->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -16 + + + +16 @@ -67,18 +67,18 @@ dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds - + dir_64b4510cba155c652ac883383ddf0b92->dir_60d51ee7315d72413f26211ac43a217e - - - -7 + + + +7 @@ -86,18 +86,18 @@ dir_61b212e579fd471c490a116dc3a4c8cf - -Storage + +Storage - + dir_64b4510cba155c652ac883383ddf0b92->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 @@ -105,18 +105,18 @@ dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time - + dir_64b4510cba155c652ac883383ddf0b92->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -13 + + + +13 @@ -124,18 +124,18 @@ dir_77968f70279e8f688919023f4af8a16f - -Random + +Random - + dir_64b4510cba155c652ac883383ddf0b92->dir_77968f70279e8f688919023f4af8a16f - - - -4 + + + +4 @@ -143,18 +143,18 @@ dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_64b4510cba155c652ac883383ddf0b92->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 @@ -162,18 +162,18 @@ dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log - + dir_64b4510cba155c652ac883383ddf0b92->dir_9a5c88f87170865d940dc95c76676edb - - - -7 + + + +7 @@ -181,18 +181,18 @@ dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial - + dir_64b4510cba155c652ac883383ddf0b92->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -6 + + + +6 @@ -200,18 +200,18 @@ dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_64b4510cba155c652ac883383ddf0b92->dir_ce91f970b513fb5ff406625265505b14 - - - -6 + + + +6 @@ -219,18 +219,18 @@ dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns - + dir_64b4510cba155c652ac883383ddf0b92->dir_d3731d706719beb3d6001df5dcff2644 - - - -11 + + + +11 @@ -238,448 +238,438 @@ dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons - + dir_64b4510cba155c652ac883383ddf0b92->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -6 + + + +6 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_60d51ee7315d72413f26211ac43a217e - - + + -2 +2 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -10 +10 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + + + +2 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 +2 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_ce91f970b513fb5ff406625265505b14->dir_77968f70279e8f688919023f4af8a16f - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_d3731d706719beb3d6001df5dcff2644->dir_77968f70279e8f688919023f4af8a16f - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 diff --git a/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.md5 b/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.md5 index 4a82bb6e2c..17aa68efb9 100644 --- a/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.md5 +++ b/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.md5 @@ -1 +1 @@ -a3eda82cd71c4766e4f05515a6c9ef58 \ No newline at end of file +7c6a08adc6b40dcb8ee8fef0599a0544 \ No newline at end of file diff --git a/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.svg b/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.svg index b798c67b99..21a9174cda 100644 --- a/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.svg +++ b/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -57,15 +57,15 @@ var sectionId = 'dynsection-0'; clusterdir_df02266255841645c523fab960c9ed1d - -src + +src clusterdir_7e4d93e079ad601e0006c23ac3d37255 - + @@ -73,8 +73,8 @@ var sectionId = 'dynsection-0'; dir_1d79b4615f725ce6e1b38311d89b4d4f - -Wireless + +Wireless @@ -82,18 +82,18 @@ var sectionId = 'dynsection-0'; dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - + + -4 +4 @@ -101,18 +101,18 @@ var sectionId = 'dynsection-0'; dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_60d51ee7315d72413f26211ac43a217e - - + + -2 +2 @@ -120,18 +120,18 @@ var sectionId = 'dynsection-0'; dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -4 +4 @@ -139,18 +139,18 @@ var sectionId = 'dynsection-0'; dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 @@ -158,28 +158,28 @@ var sectionId = 'dynsection-0'; dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -10 +10 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 @@ -187,28 +187,28 @@ var sectionId = 'dynsection-0'; dir_61b212e579fd471c490a116dc3a4c8cf - -Storage + +Storage - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 @@ -216,38 +216,38 @@ var sectionId = 'dynsection-0'; dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 @@ -255,18 +255,18 @@ var sectionId = 'dynsection-0'; dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 @@ -274,18 +274,18 @@ var sectionId = 'dynsection-0'; dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 @@ -293,118 +293,108 @@ var sectionId = 'dynsection-0'; dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + + + +2 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 @@ -412,342 +402,342 @@ var sectionId = 'dynsection-0'; dir_77968f70279e8f688919023f4af8a16f - -Random + +Random - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 +2 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_ce91f970b513fb5ff406625265505b14->dir_77968f70279e8f688919023f4af8a16f - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_d3731d706719beb3d6001df5dcff2644->dir_77968f70279e8f688919023f4af8a16f - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 dir_7e4d93e079ad601e0006c23ac3d37255 -Menus +Menus dir_64b4510cba155c652ac883383ddf0b92 - -MenuList + +MenuList - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_64b4510cba155c652ac883383ddf0b92 - - - -7 + + + +7 - + dir_64b4510cba155c652ac883383ddf0b92->dir_1d79b4615f725ce6e1b38311d89b4d4f - - - -2 + + + +2 - + dir_64b4510cba155c652ac883383ddf0b92->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -16 + + + +16 - + dir_64b4510cba155c652ac883383ddf0b92->dir_60d51ee7315d72413f26211ac43a217e - - - -7 + + + +7 - + dir_64b4510cba155c652ac883383ddf0b92->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_64b4510cba155c652ac883383ddf0b92->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -13 + + + +13 - + dir_64b4510cba155c652ac883383ddf0b92->dir_77968f70279e8f688919023f4af8a16f - - - -4 + + + +4 - + dir_64b4510cba155c652ac883383ddf0b92->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_64b4510cba155c652ac883383ddf0b92->dir_9a5c88f87170865d940dc95c76676edb - - - -7 + + + +7 - + dir_64b4510cba155c652ac883383ddf0b92->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -6 + + + +6 - + dir_64b4510cba155c652ac883383ddf0b92->dir_ce91f970b513fb5ff406625265505b14 - - - -6 + + + +6 - + dir_64b4510cba155c652ac883383ddf0b92->dir_d3731d706719beb3d6001df5dcff2644 - - - -11 + + + +11 - + dir_64b4510cba155c652ac883383ddf0b92->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -6 + + + +6 diff --git a/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep_org.svg b/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep_org.svg index 42d77dd487..f9a03551fe 100644 --- a/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep_org.svg +++ b/docs/duo/dir_7e4d93e079ad601e0006c23ac3d37255_dep_org.svg @@ -4,22 +4,22 @@ - + VortexEngine/src/Menus clusterdir_df02266255841645c523fab960c9ed1d - -src + +src clusterdir_7e4d93e079ad601e0006c23ac3d37255 - + @@ -27,8 +27,8 @@ dir_1d79b4615f725ce6e1b38311d89b4d4f - -Wireless + +Wireless @@ -36,18 +36,18 @@ dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - + + -4 +4 @@ -55,18 +55,18 @@ dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_60d51ee7315d72413f26211ac43a217e - - + + -2 +2 @@ -74,18 +74,18 @@ dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -4 +4 @@ -93,18 +93,18 @@ dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 @@ -112,28 +112,28 @@ dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -10 +10 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 @@ -141,28 +141,28 @@ dir_61b212e579fd471c490a116dc3a4c8cf - -Storage + +Storage - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 @@ -170,38 +170,38 @@ dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 @@ -209,18 +209,18 @@ dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 @@ -228,18 +228,18 @@ dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 @@ -247,118 +247,108 @@ dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 + + + +2 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 @@ -366,342 +356,342 @@ dir_77968f70279e8f688919023f4af8a16f - -Random + +Random - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 +2 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 - + dir_ce91f970b513fb5ff406625265505b14->dir_77968f70279e8f688919023f4af8a16f - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_d3731d706719beb3d6001df5dcff2644->dir_77968f70279e8f688919023f4af8a16f - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 dir_7e4d93e079ad601e0006c23ac3d37255 -Menus +Menus dir_64b4510cba155c652ac883383ddf0b92 - -MenuList + +MenuList - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_64b4510cba155c652ac883383ddf0b92 - - - -7 + + + +7 - + dir_64b4510cba155c652ac883383ddf0b92->dir_1d79b4615f725ce6e1b38311d89b4d4f - - - -2 + + + +2 - + dir_64b4510cba155c652ac883383ddf0b92->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -16 + + + +16 - + dir_64b4510cba155c652ac883383ddf0b92->dir_60d51ee7315d72413f26211ac43a217e - - - -7 + + + +7 - + dir_64b4510cba155c652ac883383ddf0b92->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_64b4510cba155c652ac883383ddf0b92->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -13 + + + +13 - + dir_64b4510cba155c652ac883383ddf0b92->dir_77968f70279e8f688919023f4af8a16f - - - -4 + + + +4 - + dir_64b4510cba155c652ac883383ddf0b92->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_64b4510cba155c652ac883383ddf0b92->dir_9a5c88f87170865d940dc95c76676edb - - - -7 + + + +7 - + dir_64b4510cba155c652ac883383ddf0b92->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -6 + + + +6 - + dir_64b4510cba155c652ac883383ddf0b92->dir_ce91f970b513fb5ff406625265505b14 - - - -6 + + + +6 - + dir_64b4510cba155c652ac883383ddf0b92->dir_d3731d706719beb3d6001df5dcff2644 - - - -11 + + + +11 - + dir_64b4510cba155c652ac883383ddf0b92->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -6 + + + +6 diff --git a/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.md5 b/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.md5 index 5f06b71aad..d1d1314366 100644 --- a/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.md5 +++ b/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.md5 @@ -1 +1 @@ -4a7d50f66f6080dda7334f3e6c5c03a2 \ No newline at end of file +7a5028e0aec320c83f59f35387c1782a \ No newline at end of file diff --git a/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.svg b/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.svg index dd158e3f06..66b1fe6e0b 100644 --- a/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.svg +++ b/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep.svg @@ -72,14 +72,14 @@ var sectionId = 'dynsection-0'; dir_df02266255841645c523fab960c9ed1d -src +src dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons @@ -87,18 +87,18 @@ var sectionId = 'dynsection-0'; dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -106,18 +106,18 @@ var sectionId = 'dynsection-0'; dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 @@ -125,18 +125,18 @@ var sectionId = 'dynsection-0'; dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -144,18 +144,18 @@ var sectionId = 'dynsection-0'; dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 @@ -163,18 +163,18 @@ var sectionId = 'dynsection-0'; dir_77968f70279e8f688919023f4af8a16f - -Random + +Random - + dir_ce91f970b513fb5ff406625265505b14->dir_77968f70279e8f688919023f4af8a16f - - - -1 + + + +1 @@ -182,18 +182,18 @@ var sectionId = 'dynsection-0'; dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 @@ -201,18 +201,18 @@ var sectionId = 'dynsection-0'; dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 + + + +2 @@ -220,58 +220,58 @@ var sectionId = 'dynsection-0'; dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -279,68 +279,68 @@ var sectionId = 'dynsection-0'; dir_7e4d93e079ad601e0006c23ac3d37255 - -Menus + +Menus - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -8 + + + +8 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_ce91f970b513fb5ff406625265505b14 - - - -8 + + + +8 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_60d51ee7315d72413f26211ac43a217e - - - -11 + + + +11 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_9a5c88f87170865d940dc95c76676edb - - - -9 + + + +9 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -21 + + + +21 @@ -348,38 +348,38 @@ var sectionId = 'dynsection-0'; dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_d3731d706719beb3d6001df5dcff2644 - - - -11 + + + +11 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_77968f70279e8f688919023f4af8a16f - - - -4 + + + +4 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -7 + + + +7 @@ -387,28 +387,28 @@ var sectionId = 'dynsection-0'; dir_61b212e579fd471c490a116dc3a4c8cf - -Storage + +Storage - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -17 + + + +17 @@ -416,328 +416,318 @@ var sectionId = 'dynsection-0'; dir_1d79b4615f725ce6e1b38311d89b4d4f - -Wireless + +Wireless - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_1d79b4615f725ce6e1b38311d89b4d4f - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_77968f70279e8f688919023f4af8a16f - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 +2 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_60d51ee7315d72413f26211ac43a217e - - + + -2 +2 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -10 +10 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -4 +4 diff --git a/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep_org.svg b/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep_org.svg index 8006efe7f5..584bb9961d 100644 --- a/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep_org.svg +++ b/docs/duo/dir_df02266255841645c523fab960c9ed1d_dep_org.svg @@ -26,14 +26,14 @@ dir_df02266255841645c523fab960c9ed1d -src +src dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - -Buttons + +Buttons @@ -41,18 +41,18 @@ dir_9a5c88f87170865d940dc95c76676edb - -Log + +Log - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -60,18 +60,18 @@ dir_63ce3ba067bdf35a8f7c780ac03d51a3 - -Time + +Time - + dir_ff5a4dc0324506fcdfb8f8f681f9dae7->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -4 + + + +4 @@ -79,18 +79,18 @@ dir_ce91f970b513fb5ff406625265505b14 - -Colors + +Colors - + dir_ce91f970b513fb5ff406625265505b14->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -98,18 +98,18 @@ dir_7e29431de6169dbb5f5ee7a990ed2b16 - -Memory + +Memory - + dir_ce91f970b513fb5ff406625265505b14->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 @@ -117,18 +117,18 @@ dir_77968f70279e8f688919023f4af8a16f - -Random + +Random - + dir_ce91f970b513fb5ff406625265505b14->dir_77968f70279e8f688919023f4af8a16f - - - -1 + + + +1 @@ -136,18 +136,18 @@ dir_cabf3d63e98569a74ecb960b83c4a15b - -Serial + +Serial - + dir_ce91f970b513fb5ff406625265505b14->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -2 + + + +2 @@ -155,18 +155,18 @@ dir_60d51ee7315d72413f26211ac43a217e - -Leds + +Leds - + dir_60d51ee7315d72413f26211ac43a217e->dir_ce91f970b513fb5ff406625265505b14 - - - -2 + + + +2 @@ -174,58 +174,58 @@ dir_4d7f8bf987ecca6ad9438e8e8937cf95 - -Modes + +Modes - + dir_60d51ee7315d72413f26211ac43a217e->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -1 + + + +1 - + dir_60d51ee7315d72413f26211ac43a217e->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_9a5c88f87170865d940dc95c76676edb->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -1 + + + +1 - + dir_7e29431de6169dbb5f5ee7a990ed2b16->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 @@ -233,68 +233,68 @@ dir_7e4d93e079ad601e0006c23ac3d37255 - -Menus + +Menus - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -8 + + + +8 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_ce91f970b513fb5ff406625265505b14 - - - -8 + + + +8 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_60d51ee7315d72413f26211ac43a217e - - - -11 + + + +11 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_9a5c88f87170865d940dc95c76676edb - - - -9 + + + +9 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - - -21 + + + +21 @@ -302,38 +302,38 @@ dir_d3731d706719beb3d6001df5dcff2644 - -Patterns + +Patterns - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_d3731d706719beb3d6001df5dcff2644 - - - -11 + + + +11 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_77968f70279e8f688919023f4af8a16f - - - -4 + + + +4 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -7 + + + +7 @@ -341,28 +341,28 @@ dir_61b212e579fd471c490a116dc3a4c8cf - -Storage + +Storage - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -17 + + + +17 @@ -370,328 +370,318 @@ dir_1d79b4615f725ce6e1b38311d89b4d4f - -Wireless + +Wireless - + dir_7e4d93e079ad601e0006c23ac3d37255->dir_1d79b4615f725ce6e1b38311d89b4d4f - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ff5a4dc0324506fcdfb8f8f681f9dae7 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_ce91f970b513fb5ff406625265505b14 - - - -4 + + + +4 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_60d51ee7315d72413f26211ac43a217e - - - -5 + + + +5 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_d3731d706719beb3d6001df5dcff2644 - - - -8 + + + +8 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -3 + + + +3 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_61b212e579fd471c490a116dc3a4c8cf - - - -1 + + + +1 - + dir_4d7f8bf987ecca6ad9438e8e8937cf95->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - - -3 + + + +3 dir_d3731d706719beb3d6001df5dcff2644->dir_ce91f970b513fb5ff406625265505b14 - - + + -6 +6 dir_d3731d706719beb3d6001df5dcff2644->dir_60d51ee7315d72413f26211ac43a217e - - + + -30 +30 dir_d3731d706719beb3d6001df5dcff2644->dir_9a5c88f87170865d940dc95c76676edb - - + + -17 +17 dir_d3731d706719beb3d6001df5dcff2644->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_77968f70279e8f688919023f4af8a16f - - + + -2 +2 dir_d3731d706719beb3d6001df5dcff2644->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -16 +16 dir_d3731d706719beb3d6001df5dcff2644->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -50 +50 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - + + -3 +3 dir_cabf3d63e98569a74ecb960b83c4a15b->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -2 - - - - - -dir_61b212e579fd471c490a116dc3a4c8cf->dir_60d51ee7315d72413f26211ac43a217e - - - -1 +2 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_9a5c88f87170865d940dc95c76676edb - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -1 + + + +1 - + dir_61b212e579fd471c490a116dc3a4c8cf->dir_cabf3d63e98569a74ecb960b83c4a15b - - - -1 + + + +1 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_60d51ee7315d72413f26211ac43a217e - - - -3 + + + +3 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_9a5c88f87170865d940dc95c76676edb - - - -2 + + + +2 - + dir_63ce3ba067bdf35a8f7c780ac03d51a3->dir_7e29431de6169dbb5f5ee7a990ed2b16 - - - -2 + + + +2 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_60d51ee7315d72413f26211ac43a217e - - + + -2 +2 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_9a5c88f87170865d940dc95c76676edb - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_4d7f8bf987ecca6ad9438e8e8937cf95 - - + + -4 +4 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_cabf3d63e98569a74ecb960b83c4a15b - - + + -10 +10 dir_1d79b4615f725ce6e1b38311d89b4d4f->dir_63ce3ba067bdf35a8f7c780ac03d51a3 - - + + -4 +4 diff --git a/docs/duo/functions_func_i.html b/docs/duo/functions_func_i.html index e26084724f..0f90d1a0c1 100644 --- a/docs/duo/functions_func_i.html +++ b/docs/duo/functions_func_i.html @@ -144,7 +144,7 @@

- i -

- - - + + +

Variables

const default_mode_entry default_modes []
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

- +
const default_mode_entry default_modes[]const default_mode_entry default_modes[MAX_MODES]

Definition at line 7 of file DefaultModes.cpp.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -133,14 +133,14 @@

- +
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))

diff --git a/docs/gloves/DefaultModes_8cpp.js b/docs/gloves/DefaultModes_8cpp.js index 6fa5e6eaa9..d71b7f5f31 100644 --- a/docs/gloves/DefaultModes_8cpp.js +++ b/docs/gloves/DefaultModes_8cpp.js @@ -1,5 +1,5 @@ var DefaultModes_8cpp = [ - [ "default_modes", "DefaultModes_8cpp.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8cpp.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8cpp.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/gloves/DefaultModes_8cpp_source.html b/docs/gloves/DefaultModes_8cpp_source.html index d8925da70e..a78995aefb 100644 --- a/docs/gloves/DefaultModes_8cpp_source.html +++ b/docs/gloves/DefaultModes_8cpp_source.html @@ -93,7 +93,7 @@
4 
5 // Here is the array of 'default modes' that are assigned to
6 // the gloveset upon factory reset
- +
8  {
9  PATTERN_DOPS, 5, {
10  RGB_RED,
@@ -237,14 +237,14 @@
148 };
149 
150 // exposed size of the default modes array
-
151 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
+
151 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
#define RGB_BLUE
#define RGB_OFF
#define RGB_RED
#define RGB_GREEN
#define RGB_WHITE
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ PATTERN_ZIGZAG
Definition: Patterns.h:74
@ PATTERN_STROBE
Definition: Patterns.h:25
@@ -258,6 +258,7 @@
@ PATTERN_WARPWORM
Definition: Patterns.h:84
@ PATTERN_BLINKIE
Definition: Patterns.h:37
@ PATTERN_SNOWBALL
Definition: Patterns.h:85
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
diff --git a/docs/gloves/DefaultModes_8h.html b/docs/gloves/DefaultModes_8h.html index 411d05039b..7104e1fc57 100644 --- a/docs/gloves/DefaultModes_8h.html +++ b/docs/gloves/DefaultModes_8h.html @@ -114,14 +114,14 @@ - - + +

Variables

const default_mode_entry default_modes []
 
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

@@ -168,7 +168,7 @@

Definition at line 151 of file DefaultModes.cpp.

-

Referenced by Modes::setDefaults().

+

Referenced by Modes::setDefaults().

diff --git a/docs/gloves/DefaultModes_8h.js b/docs/gloves/DefaultModes_8h.js index 19b3bcd9a1..471875a243 100644 --- a/docs/gloves/DefaultModes_8h.js +++ b/docs/gloves/DefaultModes_8h.js @@ -1,6 +1,6 @@ var DefaultModes_8h = [ [ "default_mode_entry", "structdefault__mode__entry.html", "structdefault__mode__entry" ], - [ "default_modes", "DefaultModes_8h.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8h.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8h.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/gloves/DefaultModes_8h_source.html b/docs/gloves/DefaultModes_8h_source.html index 774e911449..925ed0a422 100644 --- a/docs/gloves/DefaultModes_8h_source.html +++ b/docs/gloves/DefaultModes_8h_source.html @@ -102,16 +102,17 @@
13 };
14 
15 // exposed global array of default modes
-
16 extern const default_mode_entry default_modes[];
+
17 
18 // exposed size of the default modes array
19 extern const uint8_t num_default_modes;
20 
21 #endif
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
PatternID
Definition: Patterns.h:12
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
uint32_t cols[MAX_COLOR_SLOTS]
Definition: DefaultModes.h:12
PatternID patternID
Definition: DefaultModes.h:10
diff --git a/docs/gloves/EditorConnection_8cpp_source.html b/docs/gloves/EditorConnection_8cpp_source.html index 063cd552db..7ada0d23db 100644 --- a/docs/gloves/EditorConnection_8cpp_source.html +++ b/docs/gloves/EditorConnection_8cpp_source.html @@ -392,18 +392,18 @@
@ LED_ALL
Definition: LedTypes.h:45
#define DEBUG_LOG(msg)
Definition: Log.h:40
@ PATTERN_STROBE
Definition: Patterns.h:25
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:474
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:497
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:462
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:491
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:481
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:493
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:478
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:496
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:461
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:490
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:480
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:492
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:477
const uint8_t * data() const
Definition: ByteStream.h:120
void * rawData() const
Definition: ByteStream.h:121
@@ -461,9 +461,9 @@
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static bool checkSerial()
Definition: Serial.cpp:40
diff --git a/docs/gloves/FactoryReset_8cpp_source.html b/docs/gloves/FactoryReset_8cpp_source.html index 002e5949fd..039e0283b3 100644 --- a/docs/gloves/FactoryReset_8cpp_source.html +++ b/docs/gloves/FactoryReset_8cpp_source.html @@ -186,7 +186,7 @@
97  if (m_advanced) {
98  uint8_t curModeIndex = Modes::curModeIndex();
99  // reset the target mode slot on the target led
-
100  const default_mode_entry &def = default_modes[curModeIndex];
+
100  const default_mode_entry &def = default_modes[curModeIndex];
101  Colorset set(def.numColors, def.cols);
102  Mode *cur = Modes::curMode();
103  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -251,7 +251,7 @@
Button * g_pButton
Definition: Buttons.cpp:16
#define RGB_WHITE0
#define RGB_WHITE6
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
#define FINGER_THUMB
Definition: LedTypes.h:117
LedPos
Definition: LedTypes.h:11
@@ -294,10 +294,10 @@
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static void resetFlags()
Definition: Modes.cpp:590
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static void resetFlags()
Definition: Modes.cpp:659
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
diff --git a/docs/gloves/GlobalBrightness_8h_source.html b/docs/gloves/GlobalBrightness_8h_source.html index da84d61141..2c82919db3 100644 --- a/docs/gloves/GlobalBrightness_8h_source.html +++ b/docs/gloves/GlobalBrightness_8h_source.html @@ -118,10 +118,10 @@
29 };
30 
31 #endif
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279
MenuAction run() override
const uint8_t m_brightnessOptions[4]
diff --git a/docs/gloves/Log_8h_source.html b/docs/gloves/Log_8h_source.html index ed40bff067..7023951306 100644 --- a/docs/gloves/Log_8h_source.html +++ b/docs/gloves/Log_8h_source.html @@ -120,7 +120,7 @@
31 #endif
32 
33 #if LOGGING_LEVEL > 2
-
34 // arduino compiler won't allow for ellipsis macro that's passed no args...
+
34 // some compilers won't allow for ellipsis macro that's passed no args...
35 #define DEBUG_LOG(msg) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg)
36 #define DEBUG_LOGF(msg, ...) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg, __VA_ARGS__)
37 // debug messages are only in debug builds so they have full file + func + line info
diff --git a/docs/gloves/Memory_8cpp_source.html b/docs/gloves/Memory_8cpp_source.html index d213173b12..306e42537f 100644 --- a/docs/gloves/Memory_8cpp_source.html +++ b/docs/gloves/Memory_8cpp_source.html @@ -235,7 +235,7 @@
#define vfree(ptr)
Definition: Memory.h:35
#define vmalloc(size)
Definition: Memory.h:32
-
#define MAX_MEMORY
Definition: VortexConfig.h:207
+
#define MAX_MEMORY
Definition: VortexConfig.h:206
diff --git a/docs/gloves/Menu_8cpp_source.html b/docs/gloves/Menu_8cpp_source.html index 335b493410..c980e5b5ca 100644 --- a/docs/gloves/Menu_8cpp_source.html +++ b/docs/gloves/Menu_8cpp_source.html @@ -360,9 +360,9 @@
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static uint8_t numModes()
Definition: Modes.h:92
uint8_t blue
Definition: ColorTypes.h:90
diff --git a/docs/gloves/Menus_8cpp.html b/docs/gloves/Menus_8cpp.html index 6fe79fc9c9..dfb0bd6fe6 100644 --- a/docs/gloves/Menus_8cpp.html +++ b/docs/gloves/Menus_8cpp.html @@ -270,19 +270,19 @@

ENTRY(FactoryReset, RGB_MENU_FACTORY_RESET),
}
#define ENTRY(classname, color)
Definition: Menus.cpp:49
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:439
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:445
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:448
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:433
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:442
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:430
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:436
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:438
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:444
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:447
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:432
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:441
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:429
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:435
- +

Definition at line 53 of file Menus.cpp.

diff --git a/docs/gloves/Menus_8cpp__incl.md5 b/docs/gloves/Menus_8cpp__incl.md5 index 45e17c4a80..3c10dd2b4d 100644 --- a/docs/gloves/Menus_8cpp__incl.md5 +++ b/docs/gloves/Menus_8cpp__incl.md5 @@ -1 +1 @@ -16d49a51ce4fc26c1df4bd46bcc50f3d \ No newline at end of file +ef94412480825982f4c518ea91add3f9 \ No newline at end of file diff --git a/docs/gloves/Menus_8cpp__incl.svg b/docs/gloves/Menus_8cpp__incl.svg index 576c270bc9..99ffde2282 100644 --- a/docs/gloves/Menus_8cpp__incl.svg +++ b/docs/gloves/Menus_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -68,151 +68,151 @@ var sectionId = 'dynsection-0'; Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -224,583 +224,577 @@ var sectionId = 'dynsection-0'; - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/gloves/Menus_8cpp__incl_org.svg b/docs/gloves/Menus_8cpp__incl_org.svg index 95ad42186f..4e90fd3e8b 100644 --- a/docs/gloves/Menus_8cpp__incl_org.svg +++ b/docs/gloves/Menus_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/Menus.cpp Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -22,151 +22,151 @@ Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -178,583 +178,577 @@ - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/gloves/Menus_8cpp_source.html b/docs/gloves/Menus_8cpp_source.html index f7921bf199..86fa218a1e 100644 --- a/docs/gloves/Menus_8cpp_source.html +++ b/docs/gloves/Menus_8cpp_source.html @@ -406,13 +406,13 @@
#define HYPERSTROBE_OFF_DURATION
Definition: Timings.h:36
#define ADV_MENU_DURATION_TICKS
Definition: Timings.h:22
#define ADVANCED_MENU_CLICKS
Definition: VortexConfig.h:71
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:439
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:445
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:448
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:433
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:442
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:430
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:436
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:438
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:444
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:447
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:432
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:441
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:429
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:435
uint32_t holdDuration() const
Definition: Button.h:47
uint32_t pressTime() const
Definition: Button.h:42
bool onShortClick() const
Definition: Button.h:34
@@ -461,7 +461,7 @@
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
static bool advancedMenusEnabled()
Definition: Modes.h:132
- +
uint8_t blue
Definition: ColorTypes.h:90
uint8_t green
Definition: ColorTypes.h:89
diff --git a/docs/gloves/ModeSharing_8cpp_source.html b/docs/gloves/ModeSharing_8cpp_source.html index c1e0309690..66913871bd 100644 --- a/docs/gloves/ModeSharing_8cpp_source.html +++ b/docs/gloves/ModeSharing_8cpp_source.html @@ -330,8 +330,8 @@
MenuAction run() override
Definition: ModeSharing.cpp:42
void onLongClick() override
Definition: ModeSharing.cpp:93
void showReceiveMode()
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
static uint32_t getCurtime()
Definition: TimeControl.h:40
diff --git a/docs/gloves/Modes_8cpp_source.html b/docs/gloves/Modes_8cpp_source.html index 2406a3a040..ba58f8a919 100644 --- a/docs/gloves/Modes_8cpp_source.html +++ b/docs/gloves/Modes_8cpp_source.html @@ -164,900 +164,969 @@
76 }
77 
-
78 // full save/load to/from buffer
-
79 bool Modes::saveToBuffer(ByteStream &modesBuffer)
-
80 {
-
81  // serialize the engine version into the modes buffer
-
82  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
83  return false;
-
84  }
-
85  // NOTE: instead of global brightness the duo uses this to store the
-
86  // startup mode ID. The duo doesn't offer a global brightness option
-
87  if (!modesBuffer.serialize(m_globalFlags)) {
-
88  return false;
-
89  }
-
90  // serialize the global brightness
-
91  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
92  return false;
-
93  }
-
94  // serialize all modes data into the modesBuffer
-
95  if (!serialize(modesBuffer)) {
-
96  return false;
-
97  }
-
98  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
99  if (!modesBuffer.compress()) {
-
100  return false;
-
101  }
-
102  return true;
-
103 }
-
104 
-
105 // load modes from a save buffer
- -
107 {
-
108  if (!modesBuffer.decompress()) {
-
109  // failed to decompress?
+ +
79 {
+
80  // serialize the engine version into the modes buffer
+
81  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
82  return false;
+
83  }
+
84  // NOTE: instead of global brightness the duo uses this to store the
+
85  // startup mode ID. The duo doesn't offer a global brightness option
+
86  if (!saveBuffer.serialize(m_globalFlags)) {
+
87  return false;
+
88  }
+
89  // serialize the global brightness
+
90  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
91  return false;
+
92  }
+
93  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
94  return true;
+
95 }
+
96 
+ +
98 {
+
99  // reset the unserializer index before unserializing anything
+
100  saveHeader.resetUnserializer();
+
101  uint8_t major = 0;
+
102  uint8_t minor = 0;
+
103  // unserialize the vortex version
+
104  saveHeader.unserialize(&major);
+
105  saveHeader.unserialize(&minor);
+
106  // check the version for incompatibility
+
107  if (!VortexEngine::checkVersion(major, minor)) {
+
108  // incompatible version
+
109  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
110  return false;
111  }
-
112  // reset the unserializer index before unserializing anything
-
113  modesBuffer.resetUnserializer();
-
114  uint8_t major = 0;
-
115  uint8_t minor = 0;
-
116  // unserialize the vortex version
-
117  modesBuffer.unserialize(&major);
-
118  modesBuffer.unserialize(&minor);
-
119  // check the version for incompatibility
-
120  if (!VortexEngine::checkVersion(major, minor)) {
-
121  // incompatible version
-
122  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
123  return false;
-
124  }
-
125  // NOTE: instead of global brightness the duo uses this to store the
-
126  // startup mode ID. The duo doesn't offer a global brightness option
-
127  // unserialize the global brightness
-
128  modesBuffer.unserialize(&m_globalFlags);
-
129  // unserialize the global brightness
-
130  uint8_t brightness = 0;
-
131  modesBuffer.unserialize(&brightness);
-
132  if (brightness) {
-
133  Leds::setBrightness(brightness);
-
134  }
-
135  // now just unserialize the list of modes
-
136  if (!unserialize(modesBuffer)) {
-
137  return false;
-
138  }
-
139  // startupMode is 1-based offset that encodes both the index to start at and
-
140  // whether the system is enabled, hence why 0 cannot be used as an offset
-
141  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
142  if (oneClickModeEnabled() && startupMode > 0) {
-
143  // set the current mode to the startup mode
- -
145  }
-
146  return true;
-
147 }
-
148 
- -
150 {
-
151  // this is good on memory, but it erases what they have stored
-
152  // before we know whether there is something actually saved
-
153  clearModes();
-
154  ByteStream modesBuffer;
-
155  // only read storage if the modebuffer isn't filled
-
156  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
157  DEBUG_LOG("Empty buffer read from storage");
-
158  // this kinda sucks whatever they had loaded is gone
-
159  return false;
-
160  }
-
161  return loadFromBuffer(modesBuffer);
-
162 }
-
163 
-
164 // NOTE: Flash storage is limited to about 10,000 writes so
-
165 // use this function sparingly!
- -
167 {
-
168  DEBUG_LOG("Saving modes...");
-
169  // A ByteStream to hold all the serialized data
-
170  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
171  // save data to the buffer
-
172  if (!saveToBuffer(modesBuffer)) {
-
173  return false;
-
174  }
-
175  // write the serial buffer to flash storage, this
-
176  // will compress the buffer and include crc/flags
-
177  if (!Storage::write(modesBuffer)) {
-
178  DEBUG_LOG("Failed to write storage");
-
179  return false;
-
180  }
-
181  DEBUG_LOG("Success saving modes to storage");
-
182  return true;
-
183 }
-
184 
-
185 // Save all of the modes to a serial buffer
-
186 bool Modes::serialize(ByteStream &modesBuffer)
-
187 {
-
188  // serialize the number of modes
-
189  if (!modesBuffer.serialize(m_numModes)) {
+
112  // NOTE: instead of global brightness the duo uses this to store the
+
113  // startup mode ID. The duo doesn't offer a global brightness option
+
114  // unserialize the global brightness
+
115  saveHeader.unserialize(&m_globalFlags);
+
116  // unserialize the global brightness
+
117  uint8_t brightness = 0;
+
118  saveHeader.unserialize(&brightness);
+
119  if (brightness) {
+
120  Leds::setBrightness(brightness);
+
121  }
+
122  return true;
+
123 }
+
124 
+
125 // full save/load to/from buffer
+
126 bool Modes::saveToBuffer(ByteStream &modesBuffer)
+
127 {
+
128  // first write out the header
+
129  if (!serializeSaveHeader(modesBuffer)) {
+
130  return false;
+
131  }
+
132  // serialize all modes data into the modesBuffer
+
133  if (!serialize(modesBuffer)) {
+
134  return false;
+
135  }
+
136  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
137  if (!modesBuffer.compress()) {
+
138  return false;
+
139  }
+
140  return true;
+
141 }
+
142 
+
143 // load modes from a save buffer
+ +
145 {
+
146  if (!modesBuffer.decompress()) {
+
147  // failed to decompress?
+
148  return false;
+
149  }
+
150  // read out the header first
+
151  if (!unserializeSaveHeader(modesBuffer)) {
+
152  return false;
+
153  }
+
154  // now just unserialize the list of modes
+
155  if (!unserialize(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // startupMode is 1-based offset that encodes both the index to start at and
+
159  // whether the system is enabled, hence why 0 cannot be used as an offset
+
160  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
161  if (oneClickModeEnabled() && startupMode > 0) {
+
162  // set the current mode to the startup mode
+ +
164  }
+
165  return true;
+
166 }
+
167 
+ +
169 {
+
170  ByteStream headerBuffer;
+
171  // only read storage if the modebuffer isn't filled
+
172  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
173  DEBUG_LOG("Empty buffer read from storage");
+
174  // this kinda sucks whatever they had loaded is gone
+
175  return false;
+
176  }
+
177  // this erases what is stored before we know whether there is data
+
178  // but it's the easiest way to just re-load new data from storage
+
179  clearModes();
+
180  // read the header and load the data
+
181  if (!unserializeSaveHeader(headerBuffer)) {
+
182  return false;
+
183  }
+
184  // unserialize the number of modes next
+
185  uint8_t numModes = 0;
+
186  headerBuffer.unserialize(&numModes);
+
187  if (!numModes) {
+
188  DEBUG_LOG("Did not find any modes");
+
189  // this kinda sucks whatever they had loaded is gone
190  return false;
191  }
-
192  // make sure the current mode is saved in case it has changed somehow
-
193  saveCurMode();
-
194  // uninstantiate cur mode so we have stack space to serialize
-
195  if (m_pCurModeLink) {
- -
197  }
-
198  ModeLink *ptr = m_storedModes;
-
199  while (ptr) {
-
200  // instantiate the mode temporarily
-
201  Mode *mode = ptr->instantiate();
-
202  if (!mode) {
- -
204  return false;
-
205  }
-
206  // serialize it into the target modes buffer
-
207  mode->serialize(modesBuffer);
-
208  // just uninstansiate the mode after serializing
-
209  ptr->uninstantiate();
-
210  // next mode
-
211  ptr = ptr->next();
-
212  }
-
213  // reinstanstiate the current mode
- -
215  return false;
-
216  }
-
217  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
218  return true;
-
219 }
-
220 
-
221 // load all modes from a serial buffer
-
222 bool Modes::unserialize(ByteStream &modesBuffer)
-
223 {
-
224  DEBUG_LOG("Loading modes...");
-
225  // this is good on memory, but it erases what they have stored before we
-
226  // know whether there is something actually saved in the serial buffer
-
227  clearModes();
-
228  // unserialize the number of modes next
-
229  uint8_t numModes = 0;
-
230  modesBuffer.unserialize(&numModes);
-
231  if (!numModes) {
-
232  DEBUG_LOG("Did not find any modes");
-
233  // this kinda sucks whatever they had loaded is gone
-
234  return false;
-
235  }
-
236  // foreach expected mode
-
237  for (uint8_t i = 0; i < numModes; ++i) {
-
238  // just copy the serialized mode into the internal storage because
-
239  // we store the modes in a serialized manner so that they are smaller
-
240  // then we unpack them when we instantiate the mode
-
241  if (!addSerializedMode(modesBuffer)) {
-
242  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
243  // clear work so far?
-
244  clearModes();
-
245  return false;
-
246  }
-
247  }
-
248  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
249  return (m_numModes == numModes);
-
250 }
-
251 
- -
253 {
-
254  clearModes();
-
255 #if DEMO_ALL_PATTERNS == 1
-
256  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
257  PatternID default_start = PATTERN_FIRST;
-
258  PatternID default_end = PATTERN_LAST;
-
259  // add 65 randomized modes
-
260  for (int i = 0; i < 65; ++i) {
-
261  Mode tmpMode;
-
262  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
263  // create a random pattern ID from all patterns
- -
265  Colorset randSet;
-
266  randSet.randomize(8);
-
267  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
268  }
-
269  // add another mode with the given pattern and colorset
-
270  if (!addMode(&tmpMode)) {
-
271  ERROR_LOG("Failed to add mode");
-
272  // return false?
-
273  }
-
274  }
-
275  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
276 #else
-
277  // add each default mode with each of the given colors
-
278  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
279  const default_mode_entry &def = default_modes[i];
-
280  Colorset set(def.numColors, def.cols);
-
281  addMode(def.patternID, nullptr, &set);
-
282  }
-
283 #endif
-
284  return true;
-
285 }
-
286 
- -
288 {
-
289 #if MAX_MODES != 0
-
290  if (m_numModes >= MAX_MODES) {
-
291  return false;
-
292  }
-
293 #endif
-
294  // we must unserialize then re-serialize here because the
-
295  // input argument may contain other patterns in the buffer
-
296  // so we cannot just append the input arg to m_storedModes
-
297  Mode tmpMode;
-
298  if (!tmpMode.unserialize(serializedMode)) {
-
299  return false;
-
300  }
-
301  // initialize the mode because a pattern could theoretically serialize
-
302  // differently after it has initialized
-
303  tmpMode.init();
-
304  return addMode(&tmpMode);
-
305 }
-
306 
- -
308 {
-
309 #if MAX_MODES != 0
-
310  if (m_numModes >= MAX_MODES) {
-
311  return false;
-
312  }
-
313 #endif
-
314  if (!m_storedModes->append(serializedMode)) {
- -
316  return false;
-
317  }
-
318  // increment mode counter
-
319  m_numModes++;
-
320  return true;
-
321 }
-
322 
-
323 // shift the current mode to a different position relative to current position
-
324 // negative values for up, positive values for down, 0 for no move
-
325 bool Modes::shiftCurMode(int32_t offset)
-
326 {
-
327  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
328  if (newPos >= m_numModes) {
-
329  return false;
-
330  }
-
331  if (newPos == m_curMode) {
-
332  return true;
-
333  }
-
334  // get the target mode at the position of the shift
-
335  ModeLink *target = getModeLink(newPos);
-
336  if (!target) {
-
337  // invalid new position?
-
338  return false;
-
339  }
-
340  // special case for moving first in list forward
-
341  if (!m_curMode && offset > 0) {
-
342  // update main list ptr
- -
344  }
-
345  // unlink the current link
- -
347  // update the current position to reflect our new pos
-
348  m_curMode = newPos;
-
349  // then re-link the mode at the new spot
-
350  if (offset < 0) {
-
351  // link the link before our target link
-
352  target->linkBefore(m_pCurModeLink);
-
353  // special case for moving into first in list
-
354  if (!m_curMode) {
- -
356  }
-
357  } else {
-
358  // link the link after our target link
-
359  target->linkAfter(m_pCurModeLink);
-
360  }
-
361  return true;
-
362 }
-
363 
- -
365  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
-
366 {
-
367  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
368  return addMode(id, nullptr, &set);
-
369 }
-
370 
-
371 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
-
372 {
-
373  // max modes
-
374 #if MAX_MODES != 0
-
375  if (m_numModes >= MAX_MODES) {
-
376  return false;
-
377  }
-
378 #endif
-
379  if (id >= PATTERN_COUNT) {
+
192  // iterate each mode and read it out of it's storage slot then add it
+
193  for (uint8_t i = 0; i < numModes; ++i) {
+
194  ByteStream modeBuffer(MAX_MODE_SIZE);
+
195  // read each mode from a storage slot and load it
+
196  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
197  return false;
+
198  }
+
199  }
+
200  return true;
+
201 }
+
202 
+
203 // NOTE: Flash storage is limited to about 10,000 writes so
+
204 // use this function sparingly!
+ +
206 {
+
207  DEBUG_LOG("Saving modes...");
+
208  ByteStream headerBuffer(MAX_MODE_SIZE);
+
209  if (!serializeSaveHeader(headerBuffer)) {
+
210  return false;
+
211  }
+
212  // serialize the number of modes
+
213  if (!headerBuffer.serialize(m_numModes)) {
+
214  return false;
+
215  }
+
216  if (!Storage::write(0, headerBuffer)) {
+
217  return false;
+
218  }
+
219  // make sure the current mode is saved in case it has changed somehow
+
220  saveCurMode();
+
221  // uninstantiate cur mode so we have stack space to serialize
+
222  if (m_pCurModeLink) {
+ +
224  }
+
225  uint16_t i = 0;
+
226  ModeLink *ptr = m_storedModes;
+
227  while (ptr && i < MAX_MODES) {
+
228  ByteStream modeBuffer(MAX_MODE_SIZE);
+
229  // instantiate the mode temporarily
+
230  Mode *mode = ptr->instantiate();
+
231  if (!mode) {
+ +
233  return false;
+
234  }
+
235  // serialize it into the target modes buffer
+
236  mode->serialize(modeBuffer);
+
237  // just uninstansiate the mode after serializing
+
238  ptr->uninstantiate();
+
239  // next mode
+
240  ptr = ptr->next();
+
241  // now write this mode into a storage slot (skip first slot, that's header)
+
242  if (!Storage::write(++i, modeBuffer)) {
+
243  return false;
+
244  }
+
245  }
+
246  // reinstanstiate the current mode
+ +
248  return false;
+
249  }
+
250  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
251  return true;
+
252 }
+
253 
+
254 // Save all of the modes to a serial buffer
+
255 bool Modes::serialize(ByteStream &modesBuffer)
+
256 {
+
257  // serialize the number of modes
+
258  if (!modesBuffer.serialize(m_numModes)) {
+
259  return false;
+
260  }
+
261  // make sure the current mode is saved in case it has changed somehow
+
262  saveCurMode();
+
263  // uninstantiate cur mode so we have stack space to serialize
+
264  if (m_pCurModeLink) {
+ +
266  }
+
267  ModeLink *ptr = m_storedModes;
+
268  while (ptr) {
+
269  // instantiate the mode temporarily
+
270  Mode *mode = ptr->instantiate();
+
271  if (!mode) {
+ +
273  return false;
+
274  }
+
275  // serialize it into the target modes buffer
+
276  mode->serialize(modesBuffer);
+
277  // just uninstansiate the mode after serializing
+
278  ptr->uninstantiate();
+
279  // next mode
+
280  ptr = ptr->next();
+
281  }
+
282  // reinstanstiate the current mode
+ +
284  return false;
+
285  }
+
286  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
287  return true;
+
288 }
+
289 
+
290 // load all modes from a serial buffer
+
291 bool Modes::unserialize(ByteStream &modesBuffer)
+
292 {
+
293  DEBUG_LOG("Loading modes...");
+
294  // this is good on memory, but it erases what they have stored before we
+
295  // know whether there is something actually saved in the serial buffer
+
296  clearModes();
+
297  // unserialize the number of modes next
+
298  uint8_t numModes = 0;
+
299  modesBuffer.unserialize(&numModes);
+
300  if (!numModes) {
+
301  DEBUG_LOG("Did not find any modes");
+
302  // this kinda sucks whatever they had loaded is gone
+
303  return false;
+
304  }
+
305  // foreach expected mode
+
306  for (uint8_t i = 0; i < numModes; ++i) {
+
307  // just copy the serialized mode into the internal storage because
+
308  // we store the modes in a serialized manner so that they are smaller
+
309  // then we unpack them when we instantiate the mode
+
310  if (!addSerializedMode(modesBuffer)) {
+
311  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
312  // clear work so far?
+
313  clearModes();
+
314  return false;
+
315  }
+
316  }
+
317  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
318  return (m_numModes == numModes);
+
319 }
+
320 
+ +
322 {
+
323  clearModes();
+
324 #if DEMO_ALL_PATTERNS == 1
+
325  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
326  PatternID default_start = PATTERN_FIRST;
+
327  PatternID default_end = PATTERN_LAST;
+
328  // add 65 randomized modes
+
329  for (int i = 0; i < 65; ++i) {
+
330  Mode tmpMode;
+
331  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
332  // create a random pattern ID from all patterns
+ +
334  Colorset randSet;
+
335  randSet.randomize(8);
+
336  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
337  }
+
338  // add another mode with the given pattern and colorset
+
339  if (!addMode(&tmpMode)) {
+
340  ERROR_LOG("Failed to add mode");
+
341  // return false?
+
342  }
+
343  }
+
344  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
345 #else
+
346  // add each default mode with each of the given colors
+
347  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
348  const default_mode_entry &def = default_modes[i];
+
349  Colorset set(def.numColors, def.cols);
+
350  addMode(def.patternID, nullptr, &set);
+
351  }
+
352 #endif
+
353  return true;
+
354 }
+
355 
+ +
357 {
+
358 #if MAX_MODES != 0
+
359  if (m_numModes >= MAX_MODES) {
+
360  return false;
+
361  }
+
362 #endif
+
363  // we must unserialize then re-serialize here because the
+
364  // input argument may contain other patterns in the buffer
+
365  // so we cannot just append the input arg to m_storedModes
+
366  Mode tmpMode;
+
367  if (!tmpMode.unserialize(serializedMode)) {
+
368  return false;
+
369  }
+
370  // initialize the mode because a pattern could theoretically serialize
+
371  // differently after it has initialized
+
372  tmpMode.init();
+
373  return addMode(&tmpMode);
+
374 }
+
375 
+ +
377 {
+
378 #if MAX_MODES != 0
+
379  if (m_numModes >= MAX_MODES) {
380  return false;
381  }
-
382  Mode tmpMode(id, args, set);
-
383  // must init the mode so that it can be serialized
-
384  tmpMode.init();
-
385  // not a very good way to do this but it ensures the mode is
-
386  // added in the same way
-
387  return addMode(&tmpMode);
-
388 }
-
389 
-
390 bool Modes::addMode(const Mode *mode)
-
391 {
-
392 #if MAX_MODES != 0
-
393  // max modes
-
394  if (m_numModes >= MAX_MODES) {
-
395  return false;
-
396  }
-
397 #endif
-
398  if (!m_storedModes) {
-
399  m_storedModes = new ModeLink(mode);
-
400  if (!m_storedModes) {
- -
402  return false;
-
403  }
-
404  } else {
-
405  if (!m_storedModes->append(mode)) {
- -
407  return false;
-
408  }
-
409  }
-
410  m_numModes++;
-
411  return true;
-
412 }
-
413 
-
414 bool Modes::updateCurMode(const Mode *mode)
-
415 {
-
416  if (!mode) {
-
417  return false;
-
418  }
-
419  Mode *pCur = curMode();
-
420  if (!pCur) {
-
421  return false;
-
422  }
-
423  // utilize copy operator
-
424  *pCur = *mode;
-
425  // immediately save this mode to the internal mode storage
-
426  if (!saveCurMode()) {
-
427  return false;
-
428  }
-
429  // initialize the new mode
-
430  return initCurMode();
+
382 #endif
+
383  if (!m_storedModes->append(serializedMode)) {
+ +
385  return false;
+
386  }
+
387  // increment mode counter
+
388  m_numModes++;
+
389  return true;
+
390 }
+
391 
+
392 // shift the current mode to a different position relative to current position
+
393 // negative values for up, positive values for down, 0 for no move
+
394 bool Modes::shiftCurMode(int32_t offset)
+
395 {
+
396  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
397  if (newPos >= m_numModes) {
+
398  return false;
+
399  }
+
400  if (newPos == m_curMode) {
+
401  return true;
+
402  }
+
403  // get the target mode at the position of the shift
+
404  ModeLink *target = getModeLink(newPos);
+
405  if (!target) {
+
406  // invalid new position?
+
407  return false;
+
408  }
+
409  // special case for moving first in list forward
+
410  if (!m_curMode && offset > 0) {
+
411  // update main list ptr
+ +
413  }
+
414  // unlink the current link
+ +
416  // update the current position to reflect our new pos
+
417  m_curMode = newPos;
+
418  // then re-link the mode at the new spot
+
419  if (offset < 0) {
+
420  // link the link before our target link
+
421  target->linkBefore(m_pCurModeLink);
+
422  // special case for moving into first in list
+
423  if (!m_curMode) {
+ +
425  }
+
426  } else {
+
427  // link the link after our target link
+
428  target->linkAfter(m_pCurModeLink);
+
429  }
+
430  return true;
431 }
432 
-
433 // set the current active mode by index
-
434 Mode *Modes::setCurMode(uint8_t index)
+ +
434  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
435 {
-
436  if (!m_numModes) {
-
437  return nullptr;
-
438  }
-
439  // clear the LEDs when switching modes
-
440  Leds::clearAll();
-
441  // if we have a current mode open, close it
-
442  if (m_pCurModeLink) {
- -
444  }
-
445  int8_t newModeIdx = index % m_numModes;
-
446  // lookup the new mode link
-
447  ModeLink *newCurLink = getModeLink(newModeIdx);
-
448  if (!newCurLink) {
-
449  // what
-
450  return nullptr;
-
451  }
-
452  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
453  Mode *newCur = newCurLink->instantiate();
-
454  if (!newCur) {
- -
456  return nullptr;
-
457  }
-
458  // update to the new mode
-
459  m_curMode = newModeIdx;
-
460  m_pCurModeLink = newCurLink;
-
461  // record the current time as the last switch time
- -
463  // update the global startup mode to be this mode, if we turn off
-
464  // and turn back on into one click mode it will select this one
-
465  Modes::setStartupMode(newModeIdx);
-
466  // log the change
-
467  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
468  m_curMode, m_numModes - 1, newCur->getPatternID());
-
469  // return the new current mode
-
470  return newCur;
-
471 }
-
472 
-
473 // the current mode
- -
475 {
-
476  // empty mode list
-
477  if (!m_numModes) {
-
478  return nullptr;
-
479  }
-
480  if (!m_pCurModeLink) {
-
481  if (!initCurMode()) {
-
482  ERROR_LOG("Failed to initialize current mode");
-
483  return nullptr;
-
484  }
-
485  }
-
486  // get current mode, instantiate it if necessary
-
487  return m_pCurModeLink->instantiate();
-
488 }
-
489 
-
490 // iterate to next mode and return it
- -
492 {
-
493  if (!m_numModes) {
-
494  return nullptr;
-
495  }
-
496  // iterate the cur mode forward
-
497  return setCurMode(m_curMode + 1);
-
498 }
-
499 
-
500 // iterate to previous mode and return it
- -
502 {
-
503  if (!m_numModes) {
-
504  return nullptr;
-
505  }
-
506  // iterate the cur mode backwards
-
507  if (!m_curMode) {
-
508  return setCurMode(numModes() - 1);
-
509  }
-
510  return setCurMode(m_curMode - 1);
-
511 }
-
512 
- -
514 {
-
515  do {
-
516  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
517  break;
-
518  }
-
519  } while (m_curMode != 0);
-
520  return curMode();
-
521 }
-
522 
- -
524 {
-
525  if (!m_numModes || !m_pCurModeLink) {
-
526  return;
-
527  }
-
528  // unlink the current mode so it can be deleted and
-
529  // update the current mode link accordingly
-
530  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
531  delete m_pCurModeLink;
-
532  m_pCurModeLink = newCur;
-
533  if (m_curMode) {
-
534  m_curMode--;
-
535  } else {
- -
537  }
-
538  m_numModes--;
-
539  if (!m_numModes) {
-
540  m_storedModes = nullptr;
-
541  }
-
542 }
-
543 
- -
545 {
-
546  if (!m_numModes || !m_storedModes) {
-
547  return;
+
436  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
437  return addMode(id, nullptr, &set);
+
438 }
+
439 
+
440 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
+
441 {
+
442  // max modes
+
443 #if MAX_MODES != 0
+
444  if (m_numModes >= MAX_MODES) {
+
445  return false;
+
446  }
+
447 #endif
+
448  if (id >= PATTERN_COUNT) {
+
449  return false;
+
450  }
+
451  Mode tmpMode(id, args, set);
+
452  // must init the mode so that it can be serialized
+
453  tmpMode.init();
+
454  // not a very good way to do this but it ensures the mode is
+
455  // added in the same way
+
456  return addMode(&tmpMode);
+
457 }
+
458 
+
459 bool Modes::addMode(const Mode *mode)
+
460 {
+
461 #if MAX_MODES != 0
+
462  // max modes
+
463  if (m_numModes >= MAX_MODES) {
+
464  return false;
+
465  }
+
466 #endif
+
467  if (!m_storedModes) {
+
468  m_storedModes = new ModeLink(mode);
+
469  if (!m_storedModes) {
+ +
471  return false;
+
472  }
+
473  } else {
+
474  if (!m_storedModes->append(mode)) {
+ +
476  return false;
+
477  }
+
478  }
+
479  m_numModes++;
+
480  return true;
+
481 }
+
482 
+
483 bool Modes::updateCurMode(const Mode *mode)
+
484 {
+
485  if (!mode) {
+
486  return false;
+
487  }
+
488  Mode *pCur = curMode();
+
489  if (!pCur) {
+
490  return false;
+
491  }
+
492  // utilize copy operator
+
493  *pCur = *mode;
+
494  // immediately save this mode to the internal mode storage
+
495  if (!saveCurMode()) {
+
496  return false;
+
497  }
+
498  // initialize the new mode
+
499  return initCurMode();
+
500 }
+
501 
+
502 // set the current active mode by index
+
503 Mode *Modes::setCurMode(uint8_t index)
+
504 {
+
505  if (!m_numModes) {
+
506  return nullptr;
+
507  }
+
508  // clear the LEDs when switching modes
+
509  Leds::clearAll();
+
510  // if we have a current mode open, close it
+
511  if (m_pCurModeLink) {
+ +
513  }
+
514  int8_t newModeIdx = index % m_numModes;
+
515  // lookup the new mode link
+
516  ModeLink *newCurLink = getModeLink(newModeIdx);
+
517  if (!newCurLink) {
+
518  // what
+
519  return nullptr;
+
520  }
+
521  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
522  Mode *newCur = newCurLink->instantiate();
+
523  if (!newCur) {
+ +
525  return nullptr;
+
526  }
+
527  // update to the new mode
+
528  m_curMode = newModeIdx;
+
529  m_pCurModeLink = newCurLink;
+
530  // record the current time as the last switch time
+ +
532  // update the global startup mode to be this mode, if we turn off
+
533  // and turn back on into one click mode it will select this one
+
534  Modes::setStartupMode(newModeIdx);
+
535  // log the change
+
536  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
537  m_curMode, m_numModes - 1, newCur->getPatternID());
+
538  // return the new current mode
+
539  return newCur;
+
540 }
+
541 
+
542 // the current mode
+ +
544 {
+
545  // empty mode list
+
546  if (!m_numModes) {
+
547  return nullptr;
548  }
-
549  // delete the first node and it will delete the entire chain
-
550  delete m_storedModes;
-
551  m_pCurModeLink = nullptr;
-
552  m_storedModes = nullptr;
-
553  m_numModes = 0;
-
554  // might as well clear the leds
-
555  Leds::clearAll();
-
556 }
-
557 
-
558 void Modes::setStartupMode(uint8_t index)
-
559 {
-
560  // zero out the upper nibble to disable
-
561  m_globalFlags &= 0x0F;
-
562  // or in the index value shifted into the upper nibble
-
563  m_globalFlags |= (index << 4) & 0xF0;
-
564 }
-
565 
- -
567 {
-
568  // zero out the upper nibble to disable
-
569  return (m_globalFlags & 0xF0) >> 4;
-
570 }
-
571 
-
572 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
-
573 {
-
574  // then actually if it's enabled ensure the upper nibble is set
-
575  if (enable) {
-
576  // set the cur mode index as the upper nibble
-
577  m_globalFlags |= flag;
-
578  } else {
-
579  m_globalFlags &= ~flag;
-
580  }
-
581  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
582  return !save || saveStorage();
-
583 }
-
584 
-
585 bool Modes::getFlag(uint8_t flag)
-
586 {
-
587  return ((m_globalFlags & flag) != 0);
-
588 }
-
589 
- -
591 {
-
592  m_globalFlags = 0;
-
593 }
-
594 
-
595 #ifdef VORTEX_LIB
-
596 #include "Patterns/PatternBuilder.h"
-
597 // get the maximum size a mode can occupy
-
598 uint32_t Modes::maxModeSize()
-
599 {
-
600  Mode maxMode;
-
601  uint8_t x = 0;
-
602  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
603  // blend takes up 8 params
-
604  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
-
605  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
-
606  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
-
607  Colorset maxSet;
-
608  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
609  // different color in each slot
-
610  RGBColor col;
-
611  col.red = ++x;
-
612  col.green = ++x;
-
613  col.blue = ++x;
-
614  maxSet.addColor(col);
-
615  }
-
616  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
549  if (!m_pCurModeLink) {
+
550  if (!initCurMode()) {
+
551  ERROR_LOG("Failed to initialize current mode");
+
552  return nullptr;
+
553  }
+
554  }
+
555  // get current mode, instantiate it if necessary
+
556  return m_pCurModeLink->instantiate();
+
557 }
+
558 
+
559 // iterate to next mode and return it
+ +
561 {
+
562  if (!m_numModes) {
+
563  return nullptr;
+
564  }
+
565  // iterate the cur mode forward
+
566  return setCurMode(m_curMode + 1);
+
567 }
+
568 
+
569 // iterate to previous mode and return it
+ +
571 {
+
572  if (!m_numModes) {
+
573  return nullptr;
+
574  }
+
575  // iterate the cur mode backwards
+
576  if (!m_curMode) {
+
577  return setCurMode(numModes() - 1);
+
578  }
+
579  return setCurMode(m_curMode - 1);
+
580 }
+
581 
+ +
583 {
+
584  do {
+
585  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
586  break;
+
587  }
+
588  } while (m_curMode != 0);
+
589  return curMode();
+
590 }
+
591 
+ +
593 {
+
594  if (!m_numModes || !m_pCurModeLink) {
+
595  return;
+
596  }
+
597  // unlink the current mode so it can be deleted and
+
598  // update the current mode link accordingly
+
599  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
600  delete m_pCurModeLink;
+
601  m_pCurModeLink = newCur;
+
602  if (m_curMode) {
+
603  m_curMode--;
+
604  } else {
+ +
606  }
+
607  m_numModes--;
+
608  if (!m_numModes) {
+
609  m_storedModes = nullptr;
+
610  }
+
611 }
+
612 
+ +
614 {
+
615  if (!m_numModes || !m_storedModes) {
+
616  return;
617  }
-
618  ByteStream stream;
-
619  maxMode.saveToBuffer(stream);
-
620  return stream.size();
-
621 }
-
622 
-
623 // get the maximum size a savefile can occupy
-
624 uint32_t Modes::maxSaveSize()
-
625 {
-
626 #if MAX_MODES == 0
-
627  // unbounded
-
628  return 0;
-
629 #else
-
630  ByteStream backupModes;
-
631  saveToBuffer(backupModes);
-
632  for (uint32_t i = 0; i < MAX_MODES; ++i) {
-
633  Mode maxMode;
-
634  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
635  // blend takes up 8 params
-
636  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
-
637  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
-
638  Colorset maxSet;
-
639  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
640  // different color in each slot
-
641  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
-
642  }
-
643  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
-
644  }
-
645  addMode(&maxMode);
-
646  }
-
647  // grab the size of the new buffer
-
648  ByteStream stream;
-
649  saveToBuffer(stream);
-
650  uint32_t size = stream.size();
-
651  // restore backed up modes
-
652  loadFromBuffer(backupModes);
-
653  return size;
-
654 #endif
-
655 }
-
656 #endif
-
657 
-
658 // fetch a link from the chain by index
- +
618  // delete the first node and it will delete the entire chain
+
619  delete m_storedModes;
+
620  m_pCurModeLink = nullptr;
+
621  m_storedModes = nullptr;
+
622  m_numModes = 0;
+
623  // might as well clear the leds
+
624  Leds::clearAll();
+
625 }
+
626 
+
627 void Modes::setStartupMode(uint8_t index)
+
628 {
+
629  // zero out the upper nibble to disable
+
630  m_globalFlags &= 0x0F;
+
631  // or in the index value shifted into the upper nibble
+
632  m_globalFlags |= (index << 4) & 0xF0;
+
633 }
+
634 
+ +
636 {
+
637  // zero out the upper nibble to disable
+
638  return (m_globalFlags & 0xF0) >> 4;
+
639 }
+
640 
+
641 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
+
642 {
+
643  // then actually if it's enabled ensure the upper nibble is set
+
644  if (enable) {
+
645  // set the cur mode index as the upper nibble
+
646  m_globalFlags |= flag;
+
647  } else {
+
648  m_globalFlags &= ~flag;
+
649  }
+
650  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
651  return !save || saveStorage();
+
652 }
+
653 
+
654 bool Modes::getFlag(uint8_t flag)
+
655 {
+
656  return ((m_globalFlags & flag) != 0);
+
657 }
+
658 
+
660 {
-
661  if (index >= m_numModes) {
-
662  return nullptr;
-
663  }
-
664  ModeLink *ptr = m_storedModes;
-
665  while (index > 0 && ptr) {
-
666  ptr = ptr->next();
-
667  index--;
-
668  }
-
669  return ptr;
-
670 }
-
671 
- -
673 {
-
674  if (!m_numModes) {
-
675  return nullptr;
-
676  }
-
677  // cleanup the current mode link
-
678  if (m_pCurModeLink) {
- -
680  }
-
681  // update the current mode link based on the curmode index
- -
683  if (!m_pCurModeLink) {
-
684  return nullptr;
-
685  }
-
686  if (force) {
- -
688  }
-
689  return m_pCurModeLink->instantiate();
+
661  m_globalFlags = 0;
+
662 }
+
663 
+
664 #ifdef VORTEX_LIB
+
665 #include "Patterns/PatternBuilder.h"
+
666 // get the maximum size a mode can occupy
+
667 uint32_t Modes::maxModeSize()
+
668 {
+
669  Mode maxMode;
+
670  uint8_t x = 0;
+
671  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
672  // blend takes up 8 params
+
673  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
+
674  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
+
675  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
+
676  Colorset maxSet;
+
677  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
678  // different color in each slot
+
679  RGBColor col;
+
680  col.red = ++x;
+
681  col.green = ++x;
+
682  col.blue = ++x;
+
683  maxSet.addColor(col);
+
684  }
+
685  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
686  }
+
687  ByteStream stream;
+
688  maxMode.saveToBuffer(stream);
+
689  return stream.size();
690 }
691 
- -
693 {
-
694  if (!m_pCurModeLink) {
-
695  // if there's no loaded mode currently then there's nothing
-
696  // to save so there's no error
-
697  return false;
-
698  }
-
699  // force the current mode to save back to serial to catch changes
-
700  return m_pCurModeLink->save();
-
701 }
-
702 
-
703 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
-
704  m_pInstantiatedMode(nullptr),
-
705  m_storedMode(),
-
706  m_next(nullptr),
-
707  m_prev(nullptr)
-
708 {
-
709  if (src) {
-
710  init(src);
-
711  }
-
712  if (src && inst) {
-
713  instantiate();
-
714  }
-
715 }
-
716 
-
717 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
-
718  m_pInstantiatedMode(nullptr),
-
719  m_storedMode(src),
-
720  m_next(nullptr),
-
721  m_prev(nullptr)
-
722 {
-
723  if (src.size() && inst) {
-
724  instantiate();
-
725  }
-
726 }
-
727 
- +
692 // get the maximum size a savefile can occupy
+
693 uint32_t Modes::maxSaveSize()
+
694 {
+
695 #if MAX_MODES == 0
+
696  // unbounded
+
697  return 0;
+
698 #else
+
699  ByteStream backupModes;
+
700  saveToBuffer(backupModes);
+
701  for (uint32_t i = 0; i < MAX_MODES; ++i) {
+
702  Mode maxMode;
+
703  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
704  // blend takes up 8 params
+
705  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
+
706  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
+
707  Colorset maxSet;
+
708  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
709  // different color in each slot
+
710  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
+
711  }
+
712  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
713  }
+
714  addMode(&maxMode);
+
715  }
+
716  // grab the size of the new buffer
+
717  ByteStream stream;
+
718  saveToBuffer(stream);
+
719  uint32_t size = stream.size();
+
720  // restore backed up modes
+
721  loadFromBuffer(backupModes);
+
722  return size;
+
723 #endif
+
724 }
+
725 #endif
+
726 
+
727 // fetch a link from the chain by index
+
729 {
-
730  if (m_next) {
-
731  delete m_next;
+
730  if (index >= m_numModes) {
+
731  return nullptr;
732  }
-
733  if (m_pInstantiatedMode) {
-
734  delete m_pInstantiatedMode;
-
735  }
-
736 }
-
737 
-
738 bool Modes::ModeLink::init(const Mode *mode)
-
739 {
-
740  if (!mode) {
-
741  return false;
-
742  }
-
743  m_storedMode.clear();
-
744  // serialize the mode so it can be instantiated anytime
-
745  if (!mode->saveToBuffer(m_storedMode)) {
-
746  return false;
-
747  }
-
748  return true;
-
749 }
-
750 
-
751 bool Modes::ModeLink::append(const Mode *next)
-
752 {
-
753  if (!next) {
-
754  return false;
-
755  }
-
756  // if not end of chain, recurse on next link
-
757  if (m_next) {
-
758  return m_next->append(next);
-
759  }
-
760  m_next = new ModeLink(next);
-
761  if (!m_next) {
- -
763  return false;
-
764  }
-
765  m_next->m_prev = this;
-
766  return true;
-
767 }
-
768 
- -
770 {
-
771  if (!next.size()) {
-
772  return false;
-
773  }
-
774  // if not end of chain, recurse on next link
-
775  if (m_next) {
-
776  return m_next->append(next);
-
777  }
-
778  m_next = new ModeLink(next);
-
779  if (!m_next) {
- -
781  return false;
-
782  }
-
783  m_next->m_prev = this;
-
784  return true;
-
785 }
-
786 
- -
788 {
-
789  if (!m_pInstantiatedMode) {
-
790  return;
-
791  }
-
792  m_pInstantiatedMode->play();
-
793 }
-
794 
- -
796 {
-
797  // unlink this node from the chain
-
798  if (m_prev) {
-
799  m_prev->m_next = m_next;
-
800  }
-
801  if (m_next) {
-
802  m_next->m_prev = m_prev;
-
803  }
-
804  // grab the new link that will take this place
-
805  ModeLink *newLink = m_prev ? m_prev : m_next;
-
806  // clear the links of this node
-
807  m_prev = nullptr;
-
808  m_next = nullptr;
-
809  return newLink;
-
810 }
-
811 
- -
813 {
-
814  if (!link) {
-
815  return;
+
733  ModeLink *ptr = m_storedModes;
+
734  while (index > 0 && ptr) {
+
735  ptr = ptr->next();
+
736  index--;
+
737  }
+
738  return ptr;
+
739 }
+
740 
+ +
742 {
+
743  if (!m_numModes) {
+
744  return nullptr;
+
745  }
+
746  // cleanup the current mode link
+
747  if (m_pCurModeLink) {
+ +
749  }
+
750  // update the current mode link based on the curmode index
+ +
752  if (!m_pCurModeLink) {
+
753  return nullptr;
+
754  }
+
755  if (force) {
+ +
757  }
+
758  return m_pCurModeLink->instantiate();
+
759 }
+
760 
+ +
762 {
+
763  if (!m_pCurModeLink) {
+
764  // if there's no loaded mode currently then there's nothing
+
765  // to save so there's no error
+
766  return false;
+
767  }
+
768  // force the current mode to save back to serial to catch changes
+
769  return m_pCurModeLink->save();
+
770 }
+
771 
+
772 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
+
773  m_pInstantiatedMode(nullptr),
+
774  m_storedMode(),
+
775  m_next(nullptr),
+
776  m_prev(nullptr)
+
777 {
+
778  if (src) {
+
779  init(src);
+
780  }
+
781  if (src && inst) {
+
782  instantiate();
+
783  }
+
784 }
+
785 
+
786 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
+
787  m_pInstantiatedMode(nullptr),
+
788  m_storedMode(src),
+
789  m_next(nullptr),
+
790  m_prev(nullptr)
+
791 {
+
792  if (src.size() && inst) {
+
793  instantiate();
+
794  }
+
795 }
+
796 
+ +
798 {
+
799  if (m_next) {
+
800  delete m_next;
+
801  }
+
802  if (m_pInstantiatedMode) {
+
803  delete m_pInstantiatedMode;
+
804  }
+
805 }
+
806 
+
807 bool Modes::ModeLink::init(const Mode *mode)
+
808 {
+
809  if (!mode) {
+
810  return false;
+
811  }
+
812  m_storedMode.clear();
+
813  // serialize the mode so it can be instantiated anytime
+
814  if (!mode->saveToBuffer(m_storedMode)) {
+
815  return false;
816  }
-
817  if (m_next) {
-
818  m_next->m_prev = link;
-
819  link->m_next = m_next;
-
820  }
-
821  m_next = link;
-
822  link->m_prev = this;
-
823 }
-
824 
- -
826 {
-
827  if (!link) {
-
828  return;
-
829  }
-
830  if (m_prev) {
-
831  m_prev->m_next = link;
-
832  link->m_prev = m_prev;
+
817  return true;
+
818 }
+
819 
+
820 bool Modes::ModeLink::append(const Mode *next)
+
821 {
+
822  if (!next) {
+
823  return false;
+
824  }
+
825  // if not end of chain, recurse on next link
+
826  if (m_next) {
+
827  return m_next->append(next);
+
828  }
+
829  m_next = new ModeLink(next);
+
830  if (!m_next) {
+ +
832  return false;
833  }
-
834  m_prev = link;
-
835  link->m_next = this;
+
834  m_next->m_prev = this;
+
835  return true;
836 }
837 
- +
839 {
-
840  if (m_pInstantiatedMode) {
-
841  return m_pInstantiatedMode;
+
840  if (!next.size()) {
+
841  return false;
842  }
-
843  Mode *newMode = new Mode();
-
844  if (!newMode) {
- -
846  return nullptr;
-
847  }
-
848  m_storedMode.resetUnserializer();
-
849  if (!newMode->loadFromBuffer(m_storedMode)) {
-
850  return nullptr;
+
843  // if not end of chain, recurse on next link
+
844  if (m_next) {
+
845  return m_next->append(next);
+
846  }
+
847  m_next = new ModeLink(next);
+
848  if (!m_next) {
+ +
850  return false;
851  }
-
852  m_pInstantiatedMode = newMode;
-
853  return m_pInstantiatedMode;
+
852  m_next->m_prev = this;
+
853  return true;
854 }
855 
- +
857 {
-
858  if (m_pInstantiatedMode) {
-
859  delete m_pInstantiatedMode;
-
860  m_pInstantiatedMode = nullptr;
-
861  }
+
858  if (!m_pInstantiatedMode) {
+
859  return;
+
860  }
+
861  m_pInstantiatedMode->play();
862 }
863 
- +
865 {
-
866  if (!m_pInstantiatedMode) {
-
867  return false;
-
868  }
-
869  m_storedMode.clear();
-
870  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
-
871 }
-
872 
-
873 #if MODES_TEST == 1
-
874 #include <assert.h>
-
875 #include <stdio.h>
-
876 
-
877 #include "../Patterns/PatternBuilder.h"
-
878 
-
879 void Modes::test()
-
880 {
-
881  INFO_LOG("== Beginning Modes Test ==\n");
-
882 
-
883  RGBColor col = RGB_RED;
-
884  assert(!addMode(PATTERN_COUNT, col));
-
885  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
886  assert(addMode(pat, col));
-
887  }
- -
889  clearModes();
-
890  assert(numModes() == 0);
-
891 
- -
893  assert(!addMode(PATTERN_COUNT, nullptr, &set));
-
894  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
895  assert(addMode(pat, nullptr, &set));
-
896  }
- -
898  clearModes();
-
899  assert(numModes() == 0);
-
900 
-
901  // add a new mode in various different ways
-
902  assert(!addMode(PATTERN_COUNT, col));
- -
904  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
905  Mode tmpMode(pat, nullptr, &set2);
-
906  assert(addMode(&tmpMode));
-
907  }
- -
909  clearModes();
-
910  assert(numModes() == 0);
-
911 
-
912  INFO_LOG("addMode(): success\n");
-
913 
-
914  ByteStream modebuf;
-
915  ByteStream modesave;
-
916  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
-
917  Mode tmpMode(PATTERN_BASIC, &args, &set);
-
918  tmpMode.serialize(modebuf);
-
919  tmpMode.saveToBuffer(modesave);
-
920  assert(addSerializedMode(modebuf));
-
921  assert(numModes() == 1);
-
922  assert(addModeFromBuffer(modesave));
-
923  assert(numModes() == 2);
-
924  assert(getModeLink(0) != nullptr);
-
925  Mode *mode1 = getModeLink(0)->instantiate();
-
926  assert(mode1 != nullptr);
-
927  Mode *mode2 = getModeLink(1)->instantiate();
-
928  assert(mode2 != nullptr);
-
929  assert(mode1->equals(mode2));
-
930 
-
931  INFO_LOG("addSerializedMode(): success\n");
+
866  // unlink this node from the chain
+
867  if (m_prev) {
+
868  m_prev->m_next = m_next;
+
869  }
+
870  if (m_next) {
+
871  m_next->m_prev = m_prev;
+
872  }
+
873  // grab the new link that will take this place
+
874  ModeLink *newLink = m_prev ? m_prev : m_next;
+
875  // clear the links of this node
+
876  m_prev = nullptr;
+
877  m_next = nullptr;
+
878  return newLink;
+
879 }
+
880 
+ +
882 {
+
883  if (!link) {
+
884  return;
+
885  }
+
886  if (m_next) {
+
887  m_next->m_prev = link;
+
888  link->m_next = m_next;
+
889  }
+
890  m_next = link;
+
891  link->m_prev = this;
+
892 }
+
893 
+ +
895 {
+
896  if (!link) {
+
897  return;
+
898  }
+
899  if (m_prev) {
+
900  m_prev->m_next = link;
+
901  link->m_prev = m_prev;
+
902  }
+
903  m_prev = link;
+
904  link->m_next = this;
+
905 }
+
906 
+ +
908 {
+
909  if (m_pInstantiatedMode) {
+
910  return m_pInstantiatedMode;
+
911  }
+
912  Mode *newMode = new Mode();
+
913  if (!newMode) {
+ +
915  return nullptr;
+
916  }
+
917  m_storedMode.resetUnserializer();
+
918  if (!newMode->loadFromBuffer(m_storedMode)) {
+
919  return nullptr;
+
920  }
+
921  m_pInstantiatedMode = newMode;
+
922  return m_pInstantiatedMode;
+
923 }
+
924 
+ +
926 {
+
927  if (m_pInstantiatedMode) {
+
928  delete m_pInstantiatedMode;
+
929  m_pInstantiatedMode = nullptr;
+
930  }
+
931 }
932 
- - -
935  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
-
936  assert(setCurMode(1));
-
937  // update the current mode to match the given mode
-
938  assert(updateCurMode(PATTERN_DOPS, &newset));
-
939  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
- - -
942 
-
943  INFO_LOG("updateCurMode(): success\n");
-
944 
-
945  assert(shiftCurMode(-1));
-
946  assert(m_curMode == 0);
-
947  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
948  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
949  assert(shiftCurMode(0));
-
950  assert(m_curMode == 0);
-
951  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
952  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
953  assert(shiftCurMode(1));
-
954  assert(m_curMode == 1);
-
955  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
956  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
-
957 
-
958  INFO_LOG("shiftCurMode(): success\n");
-
959 
-
960  deleteCurMode();
-
961  assert(m_numModes == 1);
-
962  assert(m_curMode == 0);
-
963  deleteCurMode();
-
964  assert(m_numModes == 0);
-
965  assert(m_curMode == 0);
-
966 
-
967  INFO_LOG("deleteCurMode(): success\n");
-
968 
-
969  INFO_LOG("== Success Running Modes Test ==\n");
-
970 }
-
971 #endif
+ +
934 {
+
935  if (!m_pInstantiatedMode) {
+
936  return false;
+
937  }
+
938  m_storedMode.clear();
+
939  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
+
940 }
+
941 
+
942 #if MODES_TEST == 1
+
943 #include <assert.h>
+
944 #include <stdio.h>
+
945 
+
946 #include "../Patterns/PatternBuilder.h"
+
947 
+
948 void Modes::test()
+
949 {
+
950  INFO_LOG("== Beginning Modes Test ==\n");
+
951 
+
952  RGBColor col = RGB_RED;
+
953  assert(!addMode(PATTERN_COUNT, col));
+
954  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
955  assert(addMode(pat, col));
+
956  }
+ +
958  clearModes();
+
959  assert(numModes() == 0);
+
960 
+ +
962  assert(!addMode(PATTERN_COUNT, nullptr, &set));
+
963  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
964  assert(addMode(pat, nullptr, &set));
+
965  }
+ +
967  clearModes();
+
968  assert(numModes() == 0);
+
969 
+
970  // add a new mode in various different ways
+
971  assert(!addMode(PATTERN_COUNT, col));
+ +
973  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
974  Mode tmpMode(pat, nullptr, &set2);
+
975  assert(addMode(&tmpMode));
+
976  }
+ +
978  clearModes();
+
979  assert(numModes() == 0);
+
980 
+
981  INFO_LOG("addMode(): success\n");
+
982 
+
983  ByteStream modebuf;
+
984  ByteStream modesave;
+
985  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
+
986  Mode tmpMode(PATTERN_BASIC, &args, &set);
+
987  tmpMode.serialize(modebuf);
+
988  tmpMode.saveToBuffer(modesave);
+
989  assert(addSerializedMode(modebuf));
+
990  assert(numModes() == 1);
+
991  assert(addModeFromBuffer(modesave));
+
992  assert(numModes() == 2);
+
993  assert(getModeLink(0) != nullptr);
+
994  Mode *mode1 = getModeLink(0)->instantiate();
+
995  assert(mode1 != nullptr);
+
996  Mode *mode2 = getModeLink(1)->instantiate();
+
997  assert(mode2 != nullptr);
+
998  assert(mode1->equals(mode2));
+
999 
+
1000  INFO_LOG("addSerializedMode(): success\n");
+
1001 
+
1002  Colorset newset(RGB_BLUE, RGB_RED, RGB_GREEN);
+ +
1004  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
+
1005  assert(setCurMode(1));
+
1006  // update the current mode to match the given mode
+
1007  assert(updateCurMode(PATTERN_DOPS, &newset));
+
1008  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
+ + +
1011 
+
1012  INFO_LOG("updateCurMode(): success\n");
+
1013 
+
1014  assert(shiftCurMode(-1));
+
1015  assert(m_curMode == 0);
+
1016  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1017  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1018  assert(shiftCurMode(0));
+
1019  assert(m_curMode == 0);
+
1020  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1021  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1022  assert(shiftCurMode(1));
+
1023  assert(m_curMode == 1);
+
1024  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1025  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1026 
+
1027  INFO_LOG("shiftCurMode(): success\n");
+
1028 
+
1029  deleteCurMode();
+
1030  assert(m_numModes == 1);
+
1031  assert(m_curMode == 0);
+
1032  deleteCurMode();
+
1033  assert(m_numModes == 0);
+
1034  assert(m_curMode == 0);
+
1035 
+
1036  INFO_LOG("deleteCurMode(): success\n");
+
1037 
+
1038  INFO_LOG("== Success Running Modes Test ==\n");
+
1039 }
+
1040 #endif
Button * g_pButton
Definition: Buttons.cpp:16
#define RGB_ORANGE
#define RGB_BLUE
@@ -1067,8 +1136,8 @@
#define RGB_WHITE
#define RGB_YELLOW
#define assert(condition)
Definition: Compression.cpp:68
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:37
@@ -1092,8 +1161,8 @@
@ PATTERN_FIRST
Definition: Patterns.h:18
@ PATTERN_LAST
Definition: Patterns.h:100
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
-
#define STORAGE_SIZE
Definition: VortexConfig.h:506
-
#define MAX_MODES
Definition: VortexConfig.h:168
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:504
+
#define MAX_MODES
Definition: VortexConfig.h:167
bool onShortClick() const
Definition: Button.h:34
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
@@ -1117,67 +1186,69 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
- - - - - - - - - - - - - - - -
static ModeLink * m_storedModes
Definition: Modes.h:220
+ + + + + + + + + + + + + + + +
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:523
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool saveCurMode()
Definition: Modes.cpp:692
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:307
-
static uint8_t startupMode()
Definition: Modes.cpp:566
-
static void resetFlags()
Definition: Modes.cpp:590
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
-
static bool setDefaults()
Definition: Modes.cpp:252
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:325
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void deleteCurMode()
Definition: Modes.cpp:592
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:376
+
static uint8_t startupMode()
Definition: Modes.cpp:635
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static void resetFlags()
Definition: Modes.cpp:659
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
+
static bool setDefaults()
Definition: Modes.cpp:321
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:394
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
-
static void clearModes()
Definition: Modes.cpp:544
-
static Mode * nextMode()
Definition: Modes.cpp:491
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
+
static void clearModes()
Definition: Modes.cpp:613
+
static Mode * nextMode()
Definition: Modes.cpp:560
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:149
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static uint8_t m_curMode
Definition: Modes.h:211
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static Mode * previousMode()
Definition: Modes.cpp:501
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:168
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static uint8_t m_curMode
Definition: Modes.h:214
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
+
static Mode * previousMode()
Definition: Modes.cpp:570
static PatternArgs getDefaultArgs(PatternID id)
uint8_t blue
Definition: ColorTypes.h:90
uint8_t red
Definition: ColorTypes.h:88
uint8_t green
Definition: ColorTypes.h:89
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool serializeVersion(ByteStream &stream)
static bool checkVersion(uint8_t major, uint8_t minor)
diff --git a/docs/gloves/Modes_8h_source.html b/docs/gloves/Modes_8h_source.html index b565cdfe77..d09840e421 100644 --- a/docs/gloves/Modes_8h_source.html +++ b/docs/gloves/Modes_8h_source.html @@ -241,81 +241,84 @@
152 #endif
153 
154 private:
-
155  // linked list of internal mode storage
-
156  class ModeLink {
-
157  public:
-
158  // construct a link and optionally instantiate the link
-
159  ModeLink(const Mode *src = nullptr, bool inst = false);
-
160  ModeLink(const ByteStream &src, bool inst = false);
-
161  ~ModeLink();
-
162 
-
163  // init the link and append another link
-
164  bool init(const Mode *mode = nullptr);
-
165  bool append(const Mode *next);
-
166  bool append(const ByteStream &next);
-
167 
-
168  // play the instantiated mode inside
-
169  void play();
+
155  static bool serializeSaveHeader(ByteStream &saveBuffer);
+
156  static bool unserializeSaveHeader(ByteStream &saveBuffer);
+
157 
+
158  // linked list of internal mode storage
+
159  class ModeLink {
+
160  public:
+
161  // construct a link and optionally instantiate the link
+
162  ModeLink(const Mode *src = nullptr, bool inst = false);
+
163  ModeLink(const ByteStream &src, bool inst = false);
+
164  ~ModeLink();
+
165 
+
166  // init the link and append another link
+
167  bool init(const Mode *mode = nullptr);
+
168  bool append(const Mode *next);
+
169  bool append(const ByteStream &next);
170 
-
171  // unlink self from the chain, returns link that takes position
-
172  ModeLink *unlinkSelf();
+
171  // play the instantiated mode inside
+
172  void play();
173 
-
174  // link in a node before or after self
-
175  void linkAfter(ModeLink *link);
-
176  void linkBefore(ModeLink *link);
-
177 
-
178  // instantiate/destroy the mode
-
179  Mode *instantiate();
-
180  void uninstantiate();
-
181 
-
182  // if the mode is instantiated and the instantiated version
-
183  // has changed at all then save will re-save it to the buffer
-
184  bool save();
-
185 
-
186  // accessors
- - -
189  ModeLink *next() { return m_next; }
-
190  ModeLink *prev() { return m_prev; }
-
191 
-
192  operator ByteStream &() { return m_storedMode; }
-
193  operator ByteStream() { return m_storedMode; }
-
194  operator Mode *() { return m_pInstantiatedMode; }
-
195  private:
- - - - -
200  };
-
201 
-
202  // fetch a link from the chain by index
-
203  static ModeLink *getModeLink(uint32_t index);
+
174  // unlink self from the chain, returns link that takes position
+
175  ModeLink *unlinkSelf();
+
176 
+
177  // link in a node before or after self
+
178  void linkAfter(ModeLink *link);
+
179  void linkBefore(ModeLink *link);
+
180 
+
181  // instantiate/destroy the mode
+
182  Mode *instantiate();
+
183  void uninstantiate();
+
184 
+
185  // if the mode is instantiated and the instantiated version
+
186  // has changed at all then save will re-save it to the buffer
+
187  bool save();
+
188 
+
189  // accessors
+ + +
192  ModeLink *next() { return m_next; }
+
193  ModeLink *prev() { return m_prev; }
+
194 
+
195  operator ByteStream &() { return m_storedMode; }
+
196  operator ByteStream() { return m_storedMode; }
+
197  operator Mode *() { return m_pInstantiatedMode; }
+
198  private:
+ + + + +
203  };
204 
-
205  // initialize current mode from ByteStream, optionally force re-init which
-
206  // will destroy the current instantiated mode and re-load it from serial
-
207  static Mode *initCurMode(bool force = false);
-
208  static bool saveCurMode();
-
209 
-
210  // the current mode we're on
-
211  static uint8_t m_curMode;
+
205  // fetch a link from the chain by index
+
206  static ModeLink *getModeLink(uint32_t index);
+
207 
+
208  // initialize current mode from ByteStream, optionally force re-init which
+
209  // will destroy the current instantiated mode and re-load it from serial
+
210  static Mode *initCurMode(bool force = false);
+
211  static bool saveCurMode();
212 
-
213  // the number of modes loaded
-
214  static uint8_t m_numModes;
+
213  // the current mode we're on
+
214  static uint8_t m_curMode;
215 
-
216  // the current instantiated mode and it's respective link
- +
216  // the number of modes loaded
+
217  static uint8_t m_numModes;
218 
-
219  // list of serialized version of bufers
- +
219  // the current instantiated mode and it's respective link
+
221 
-
222  // global flags for all modes
-
223  static uint8_t m_globalFlags;
+
222  // list of serialized version of bufers
+
224 
-
225  // the last switch time of the modes
-
226  static uint32_t m_lastSwitchTime;
-
227 };
-
228 
-
229 #endif
+
225  // global flags for all modes
+
226  static uint8_t m_globalFlags;
+
227 
+
228  // the last switch time of the modes
+
229  static uint32_t m_lastSwitchTime;
+
230 };
+
231 
+
232 #endif
#define RGB_OFF
#define MODES_FLAG_LOCKED
Definition: Modes.h:18
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
@@ -325,75 +328,77 @@
Definition: Mode.h:38
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
Definition: Modes.h:29
-
static ModeLink * m_storedModes
Definition: Modes.h:220
+
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:523
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static void deleteCurMode()
Definition: Modes.cpp:592
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static bool saveStorage()
Definition: Modes.cpp:205
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static bool saveCurMode()
Definition: Modes.cpp:692
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:307
-
static uint8_t startupMode()
Definition: Modes.cpp:566
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:376
+
static uint8_t startupMode()
Definition: Modes.cpp:635
static bool setOneClickMode(bool enable, bool save=true)
Definition: Modes.h:115
-
static void resetFlags()
Definition: Modes.cpp:590
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static void resetFlags()
Definition: Modes.cpp:659
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static bool keychainModeEnabled()
Definition: Modes.h:139
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:325
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:394
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static Mode * nextMode()
Definition: Modes.cpp:491
+
static Mode * nextMode()
Definition: Modes.cpp:560
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:149
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:168
static bool advancedMenusEnabled()
Definition: Modes.h:132
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static uint8_t m_curMode
Definition: Modes.h:214
static bool setKeychainMode(bool active, bool save=true)
Definition: Modes.h:136
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static Mode * previousMode()
Definition: Modes.cpp:501
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
+
static Mode * previousMode()
Definition: Modes.cpp:570
diff --git a/docs/gloves/PatternBuilder_8cpp_source.html b/docs/gloves/PatternBuilder_8cpp_source.html index 49b70cdc26..f3e267d66e 100644 --- a/docs/gloves/PatternBuilder_8cpp_source.html +++ b/docs/gloves/PatternBuilder_8cpp_source.html @@ -242,12 +242,12 @@
153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/gloves/PatternSelect_8cpp__incl.md5 b/docs/gloves/PatternSelect_8cpp__incl.md5 index 2b1afa67c8..d7853e90a5 100644 --- a/docs/gloves/PatternSelect_8cpp__incl.md5 +++ b/docs/gloves/PatternSelect_8cpp__incl.md5 @@ -1 +1 @@ -1f320b8ee0cf19c8e8e72ba706dd9da5 \ No newline at end of file +f9f4e2f9af5c8f17049a6c4e87e36e85 \ No newline at end of file diff --git a/docs/gloves/PatternSelect_8cpp__incl.svg b/docs/gloves/PatternSelect_8cpp__incl.svg index 48b3080336..b8b41d60a6 100644 --- a/docs/gloves/PatternSelect_8cpp__incl.svg +++ b/docs/gloves/PatternSelect_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -68,592 +68,586 @@ var sectionId = 'dynsection-0'; Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - + Node1->Node10 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node14 - - + + Node16 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node16 - - + + Node17 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node17 - - + + Node18 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node18 - - + + Node19 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node19 - - + + Node20 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node20 - - + + Node22 - -../Log/Log.h + +../Log/Log.h - + Node1->Node22 - - + + Node24 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node24 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node8 - - + + - + Node14->Node11 - - + + - + Node14->Node12 - - + + Node15 - -PatternArgs.h + +PatternArgs.h - + Node14->Node15 - - + + - + Node15->Node4 - - + + - + Node16->Node4 - - + + - + Node16->Node6 - - + + - + Node16->Node8 - - + + - + Node17->Node6 - - + + - + Node17->Node16 - - + + - + Node18->Node4 - - + + - + Node19->Node4 - - + + - + Node19->Node5 - - + + - + Node19->Node8 - - + + - + Node19->Node10 - - + + - + Node20->Node4 - - + + - + Node20->Node5 - - + + - + Node20->Node6 - - + + - + Node20->Node11 - - + + Node21 - -../Serial/ByteStream.h + +../Serial/ByteStream.h - + Node20->Node21 - - + + - + Node20->Node24 - - + + - + Node21->Node4 - - + + - + Node21->Node22 - - + + - + Node22->Node6 - - + + - + Node22->Node9 - - + + Node23 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node22->Node23 - - + + - + Node23->Node4 - - + + - + Node23->Node6 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node8 - - + + diff --git a/docs/gloves/PatternSelect_8cpp__incl_org.svg b/docs/gloves/PatternSelect_8cpp__incl_org.svg index acb0117a09..2e16ccaf09 100644 --- a/docs/gloves/PatternSelect_8cpp__incl_org.svg +++ b/docs/gloves/PatternSelect_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.cpp Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -22,592 +22,586 @@ Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - + Node1->Node10 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node14 - - + + Node16 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node16 - - + + Node17 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node17 - - + + Node18 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node18 - - + + Node19 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node19 - - + + Node20 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node20 - - + + Node22 - -../Log/Log.h + +../Log/Log.h - + Node1->Node22 - - + + Node24 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node24 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node8 - - + + - + Node14->Node11 - - + + - + Node14->Node12 - - + + Node15 - -PatternArgs.h + +PatternArgs.h - + Node14->Node15 - - + + - + Node15->Node4 - - + + - + Node16->Node4 - - + + - + Node16->Node6 - - + + - + Node16->Node8 - - + + - + Node17->Node6 - - + + - + Node17->Node16 - - + + - + Node18->Node4 - - + + - + Node19->Node4 - - + + - + Node19->Node5 - - + + - + Node19->Node8 - - + + - + Node19->Node10 - - + + - + Node20->Node4 - - + + - + Node20->Node5 - - + + - + Node20->Node6 - - + + - + Node20->Node11 - - + + Node21 - -../Serial/ByteStream.h + +../Serial/ByteStream.h - + Node20->Node21 - - + + - + Node20->Node24 - - + + - + Node21->Node4 - - + + - + Node21->Node22 - - + + - + Node22->Node6 - - + + - + Node22->Node9 - - + + Node23 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node22->Node23 - - + + - + Node23->Node4 - - + + - + Node23->Node6 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node8 - - + + diff --git a/docs/gloves/PatternSelect_8cpp_source.html b/docs/gloves/PatternSelect_8cpp_source.html index 61b5f888f1..6fdab2a175 100644 --- a/docs/gloves/PatternSelect_8cpp_source.html +++ b/docs/gloves/PatternSelect_8cpp_source.html @@ -280,12 +280,12 @@
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
void showExit() override
- - - + + +
void showPatternSelection()
void onLongClick() override
@@ -294,9 +294,9 @@
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
void onShortClick() override
-
PatternSelectState m_state
Definition: PatternSelect.h:43
+
PatternSelectState m_state
Definition: PatternSelect.h:42
void showListSelection()
-
PatternID m_newPatternID
Definition: PatternSelect.h:49
+
PatternID m_newPatternID
Definition: PatternSelect.h:48
static uint32_t getCurtime()
Definition: TimeControl.h:40
diff --git a/docs/gloves/PatternSelect_8h.html b/docs/gloves/PatternSelect_8h.html index d9d8dc8ea8..35ee3e209a 100644 --- a/docs/gloves/PatternSelect_8h.html +++ b/docs/gloves/PatternSelect_8h.html @@ -91,12 +91,11 @@
Include dependency graph for PatternSelect.h:
-
+
diff --git a/docs/gloves/PatternSelect_8h__incl.md5 b/docs/gloves/PatternSelect_8h__incl.md5 index 785c554411..0a715a9133 100644 --- a/docs/gloves/PatternSelect_8h__incl.md5 +++ b/docs/gloves/PatternSelect_8h__incl.md5 @@ -1 +1 @@ -b134790e4ecb9b5af9f544529d10b884 \ No newline at end of file +e80755631e50a604a644cc59be4f4b24 \ No newline at end of file diff --git a/docs/gloves/PatternSelect_8h__incl.svg b/docs/gloves/PatternSelect_8h__incl.svg index d1c16b1a1c..c492a03cdc 100644 --- a/docs/gloves/PatternSelect_8h__incl.svg +++ b/docs/gloves/PatternSelect_8h__incl.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.h Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h @@ -22,217 +22,211 @@ Node2 - -../Menu.h + +../Menu.h Node1->Node2 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h - -Node1->Node9 - - - - - -Node10 - - -../Patterns/Patterns.h - - - - -Node1->Node10 - - +Node1->Node9 + + Node11 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node1->Node11 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + + + + +Node10 + + +../Patterns/Patterns.h + + Node9->Node10 - - + + Node10->Node3 - - + + Node11->Node4 - - + + Node11->Node5 - - + + diff --git a/docs/gloves/PatternSelect_8h_source.html b/docs/gloves/PatternSelect_8h_source.html index e256980f46..cea840b684 100644 --- a/docs/gloves/PatternSelect_8h_source.html +++ b/docs/gloves/PatternSelect_8h_source.html @@ -93,67 +93,66 @@
4 #include "../Menu.h"
5 
6 #include "../../Colors/Colorset.h"
-
7 #include "../../Patterns/Patterns.h"
-
8 #include "../../Modes/Mode.h"
-
9 
-
10 class PatternSelect : public Menu
-
11 {
-
12 public:
-
13  PatternSelect(const RGBColor &col, bool advanced);
- -
15 
-
16  bool init() override;
-
17  MenuAction run() override;
-
18 
-
19  // callback after the user selects the target led
-
20  void onLedSelected() override;
-
21 
-
22  // handlers for clicks
-
23  void onShortClick() override;
-
24  void onLongClick() override;
-
25 
-
26 private:
-
27  void showListSelection();
-
28  void showPatternSelection();
-
29  void nextPattern();
-
30 
-
31  void showExit() override;
-
32 
-
33  // private enumeration for internal state of pattern selection
-
34  enum PatternSelectState : uint32_t
-
35  {
-
36  // currently picking the list of patterns
- -
38  // currently picking a pattern in the list
- -
40  };
-
41 
-
42  // the current state of the pattern selection menu
- -
44 
-
45  // an internal mode used for demoing patterns
- -
47 
-
48  // the patternid of the current demo
- -
50 
-
51  // the pat select starts by showing the current pattern
-
52  // then the first click begin cycling the list of pats
-
53  bool m_started;
-
54 };
-
55 
-
56 #endif
+
7 #include "../../Modes/Mode.h"
+
8 
+
9 class PatternSelect : public Menu
+
10 {
+
11 public:
+
12  PatternSelect(const RGBColor &col, bool advanced);
+ +
14 
+
15  bool init() override;
+
16  MenuAction run() override;
+
17 
+
18  // callback after the user selects the target led
+
19  void onLedSelected() override;
+
20 
+
21  // handlers for clicks
+
22  void onShortClick() override;
+
23  void onLongClick() override;
+
24 
+
25 private:
+
26  void showListSelection();
+
27  void showPatternSelection();
+
28  void nextPattern();
+
29 
+
30  void showExit() override;
+
31 
+
32  // private enumeration for internal state of pattern selection
+
33  enum PatternSelectState : uint32_t
+
34  {
+
35  // currently picking the list of patterns
+ +
37  // currently picking a pattern in the list
+ +
39  };
+
40 
+
41  // the current state of the pattern selection menu
+ +
43 
+
44  // an internal mode used for demoing patterns
+ +
46 
+
47  // the patternid of the current demo
+ +
49 
+
50  // the pat select starts by showing the current pattern
+
51  // then the first click begin cycling the list of pats
+
52  bool m_started;
+
53 };
+
54 
+
55 #endif
PatternID
Definition: Patterns.h:12
Definition: Menu.h:11
MenuAction
Definition: Menu.h:19
Definition: Mode.h:38
- +
void showExit() override
- - - - + + + +
void showPatternSelection()
void onLongClick() override
@@ -162,10 +161,10 @@
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
void onShortClick() override
-
PatternSelectState m_state
Definition: PatternSelect.h:43
+
PatternSelectState m_state
Definition: PatternSelect.h:42
void showListSelection()
-
PatternID m_newPatternID
Definition: PatternSelect.h:49
- +
PatternID m_newPatternID
Definition: PatternSelect.h:48
+
diff --git a/docs/gloves/Patterns_8h__dep__incl.md5 b/docs/gloves/Patterns_8h__dep__incl.md5 index c2c90afb98..f30b2bfff5 100644 --- a/docs/gloves/Patterns_8h__dep__incl.md5 +++ b/docs/gloves/Patterns_8h__dep__incl.md5 @@ -1 +1 @@ -545f5fd606f3282cd24c9cb4e62f8840 \ No newline at end of file +e1a74af72fc3744eedc8bbaffc733090 \ No newline at end of file diff --git a/docs/gloves/Patterns_8h__dep__incl.svg b/docs/gloves/Patterns_8h__dep__incl.svg index d0fb7f1795..5274ee68ee 100644 --- a/docs/gloves/Patterns_8h__dep__incl.svg +++ b/docs/gloves/Patterns_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,1154 +58,1148 @@ var sectionId = 'dynsection-1'; Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node3 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - +Node6->Node13 + + - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node14 - - + + +Node6->Node18 + + - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - - -Node9->Node15 - - + + +Node6->Node19 + + Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp - + -Node9->Node20 - - +Node6->Node20 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + + + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + - + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + + + + +Node14->Node11 + + - + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + - + + +Node23->Node11 + + + + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - - -Node39->Node3 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/gloves/Patterns_8h__dep__incl_org.svg b/docs/gloves/Patterns_8h__dep__incl_org.svg index 5a6b56ea64..144c8d8c4f 100644 --- a/docs/gloves/Patterns_8h__dep__incl_org.svg +++ b/docs/gloves/Patterns_8h__dep__incl_org.svg @@ -4,1162 +4,1156 @@ - + VortexEngine/src/Patterns/Patterns.h Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node3 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - +Node6->Node13 + + - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node14 - - + + +Node6->Node18 + + - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - - -Node9->Node15 - - + + +Node6->Node19 + + Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp - + -Node9->Node20 - - +Node6->Node20 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + + + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + - + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + + + + +Node14->Node11 + + - + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + - + + +Node23->Node11 + + + + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - - -Node39->Node3 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/gloves/Randomizer_8cpp_source.html b/docs/gloves/Randomizer_8cpp_source.html index c7f4e0d378..ee7e9efa08 100644 --- a/docs/gloves/Randomizer_8cpp_source.html +++ b/docs/gloves/Randomizer_8cpp_source.html @@ -458,8 +458,8 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
uint8_t arg7
Definition: PatternArgs.h:89
diff --git a/docs/gloves/Storage_8cpp.html b/docs/gloves/Storage_8cpp.html index 79b2b07ffc..ebd97faf0a 100644 --- a/docs/gloves/Storage_8cpp.html +++ b/docs/gloves/Storage_8cpp.html @@ -97,7 +97,6 @@ #include "../Memory/Memory.h"
#include "../Serial/ByteStream.h"
#include "../Log/Log.h"
-#include <unistd.h>
#include <Arduino.h>
Include dependency graph for Storage.cpp:
@@ -135,7 +134,7 @@

-

Definition at line 21 of file Storage.cpp.

+

Definition at line 23 of file Storage.cpp.

@@ -151,7 +150,7 @@

-

Definition at line 32 of file Storage.cpp.

+

Definition at line 34 of file Storage.cpp.

@@ -167,7 +166,7 @@

-

Definition at line 27 of file Storage.cpp.

+

Definition at line 29 of file Storage.cpp.

diff --git a/docs/gloves/Storage_8cpp__incl.md5 b/docs/gloves/Storage_8cpp__incl.md5 index ce4e21bebd..82c57d4023 100644 --- a/docs/gloves/Storage_8cpp__incl.md5 +++ b/docs/gloves/Storage_8cpp__incl.md5 @@ -1 +1 @@ -30abeadf33f54ab158fcaf6708aa72a4 \ No newline at end of file +34956bc2a5d1f8bb2547797f76a8714a \ No newline at end of file diff --git a/docs/gloves/Storage_8cpp__incl.svg b/docs/gloves/Storage_8cpp__incl.svg index 038012fc7c..b907c73d89 100644 --- a/docs/gloves/Storage_8cpp__incl.svg +++ b/docs/gloves/Storage_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -76,236 +76,221 @@ var sectionId = 'dynsection-0'; Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - -unistd.h + +Arduino.h Node1->Node13 - - - - - -Node14 - - -Arduino.h - - - - - -Node1->Node14 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/gloves/Storage_8cpp__incl_org.svg b/docs/gloves/Storage_8cpp__incl_org.svg index 9d42d41281..f9bca53760 100644 --- a/docs/gloves/Storage_8cpp__incl_org.svg +++ b/docs/gloves/Storage_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Storage/Storage.cpp Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -30,236 +30,221 @@ Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - -unistd.h + +Arduino.h Node1->Node13 - - - - - -Node14 - - -Arduino.h - - - - - -Node1->Node14 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/gloves/Storage_8cpp_source.html b/docs/gloves/Storage_8cpp_source.html index 16dd191d72..679e76d5e2 100644 --- a/docs/gloves/Storage_8cpp_source.html +++ b/docs/gloves/Storage_8cpp_source.html @@ -101,208 +101,236 @@
12 #include "VortexLib.h"
13 #endif
14 
-
15 #ifdef _WIN32
-
16 #include <Windows.h>
-
17 #else
-
18 #include <unistd.h>
-
19 #endif
-
20 
-
21 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
15 #ifndef VORTEX_EMBEDDED
+
16 #ifdef _WIN32
+
17 #include <Windows.h>
+
18 #else
+
19 #include <unistd.h>
+
20 #endif
+
21 #endif
22 
-
23 #ifdef VORTEX_LIB
-
24 std::string Storage::m_storageFilename;
-
25 #define STORAGE_FILENAME m_storageFilename.c_str()
-
26 #else
-
27 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
-
28 #endif
-
29 
-
30 #ifdef VORTEX_EMBEDDED
-
31 #include <Arduino.h>
-
32 #define PAGE_SIZE 64
-
33 __attribute__((__aligned__(256)))
-
34 const uint8_t _storagedata[(STORAGE_SIZE+255)/256*256] = { };
-
35 #endif
-
36 
-
37 uint32_t Storage::m_lastSaveSize = 0;
+
23 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
24 
+
25 #ifdef VORTEX_LIB
+
26 std::string Storage::m_storageFilename;
+
27 #define STORAGE_FILENAME m_storageFilename.c_str()
+
28 #else
+
29 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
+
30 #endif
+
31 
+
32 #ifdef VORTEX_EMBEDDED
+
33 #include <Arduino.h>
+
34 #define PAGE_SIZE 64
+
35 __attribute__((__aligned__(256)))
+
36 const uint8_t _storagedata[(STORAGE_SIZE+255)/256*256] = { };
+
37 #endif
38 
- -
40 {
-
41 }
-
42 
- -
44 {
-
45 #ifdef VORTEX_LIB
-
46  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
47  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
48  }
-
49 #endif
-
50  return true;
-
51 }
-
52 
- -
54 {
-
55 }
-
56 
-
57 // store a serial buffer to storage
- -
59 {
-
60 #ifdef VORTEX_LIB
-
61  if (!Vortex::storageEnabled()) {
-
62  // success so the system thinks it all worked
-
63  return true;
-
64  }
-
65 #endif
-
66  // check size
-
67  if (buffer.rawSize() > STORAGE_SIZE) {
-
68  ERROR_LOG("Buffer too big for storage space");
-
69  return false;
-
70  }
-
71 #ifdef VORTEX_EMBEDDED
-
72  // clear existing storage
-
73  NVMCTRL->ADDR.reg = ((uint32_t)_storagedata) / 2;
-
74  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
-
75  while (!NVMCTRL->INTFLAG.bit.READY) {}
-
76 
-
77  // set the last save size
-
78  m_lastSaveSize = buffer.size();
-
79 
-
80  // write out the buffer to storage
-
81  // Calculate data boundaries
-
82  uint32_t size = (buffer.rawSize() + 3) / 4;
-
83  volatile uint32_t *dst_addr = (volatile uint32_t *)_storagedata;
-
84  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
-
85 
-
86  // Disable automatic page write
-
87  NVMCTRL->CTRLB.bit.MANW = 1;
-
88 
-
89  // Do writes in pages
-
90  while (size) {
-
91  // Execute "PBC" Page Buffer Clear
-
92  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
-
93  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
94 
-
95  // Fill page buffer
-
96  uint32_t i;
-
97  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
-
98  *dst_addr = *(uint32_t *)(src_addr);
-
99  src_addr += sizeof(uint32_t);
-
100  dst_addr++;
-
101  size--;
-
102  }
-
103 
-
104  // Execute "WP" Write Page
-
105  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
-
106  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
107  }
-
108 #elif defined(_WIN32)
-
109  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
110  if (hFile == INVALID_HANDLE_VALUE) {
-
111  // error
-
112  return false;
-
113  }
-
114  DWORD written = 0;
-
115  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
116  // error
-
117  return false;
-
118  }
-
119  CloseHandle(hFile);
-
120 #else
-
121  FILE *f = fopen(STORAGE_FILENAME, "w");
-
122  if (!f) {
-
123  return false;
+
39 uint32_t Storage::m_lastSaveSize = 0;
+
40 
+ +
42 {
+
43 }
+
44 
+ +
46 {
+
47 #ifdef VORTEX_LIB
+
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
50  }
+
51 #endif
+
52  return true;
+
53 }
+
54 
+ +
56 {
+
57 }
+
58 
+
59 // store a serial buffer to storage
+
60 bool Storage::write(uint16_t slot, ByteStream &buffer)
+
61 {
+
62 #ifdef VORTEX_LIB
+
63  if (!Vortex::storageEnabled()) {
+
64  // success so the system thinks it all worked
+
65  return true;
+
66  }
+
67 #endif
+
68  // check size
+
69  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
70  ERROR_LOG("Buffer too big for storage space");
+
71  return false;
+
72  }
+
73  if (slot >= NUM_MODE_SLOTS) {
+
74  return false;
+
75  }
+
76  // just in case
+
77  buffer.recalcCRC();
+
78 #ifdef VORTEX_EMBEDDED
+
79  // the target slot to store in
+
80  uint32_t storage_slot = (uint32_t)_storagedata + (slot * MAX_MODE_SIZE);
+
81 
+
82  // Number of rows to erase for one slot
+
83  uint16_t rows_to_erase = MAX_MODE_SIZE / (PAGE_SIZE * 4);
+
84  // Erase only the rows containing the slot
+
85  for (uint16_t i = 0; i < rows_to_erase; ++i) {
+
86  // Set the address for the row to erase
+
87  NVMCTRL->ADDR.reg = (uint32_t)(storage_slot + (i * PAGE_SIZE * 4)) / 2;
+
88  // Execute the erase command
+
89  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
+
90  // Wait for the erase operation to complete
+
91  while (!NVMCTRL->INTFLAG.bit.READY) {}
+
92  }
+
93 
+
94  // set the last save size
+
95  m_lastSaveSize = buffer.size();
+
96 
+
97  // write out the buffer to storage
+
98  // Calculate data boundaries
+
99  uint32_t size = (buffer.rawSize() + 3) / 4;
+
100  volatile uint32_t *dst_addr = (volatile uint32_t *)storage_slot;
+
101  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
+
102 
+
103  // Disable automatic page write
+
104  NVMCTRL->CTRLB.bit.MANW = 1;
+
105 
+
106  // Do writes in pages
+
107  while (size) {
+
108  // Execute "PBC" Page Buffer Clear
+
109  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
+
110  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
+
111 
+
112  // Fill page buffer
+
113  uint32_t i;
+
114  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
+
115  *dst_addr = *(uint32_t *)(src_addr);
+
116  src_addr += sizeof(uint32_t);
+
117  dst_addr++;
+
118  size--;
+
119  }
+
120 
+
121  // Execute "WP" Write Page
+
122  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
+
123  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
124  }
-
125  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
-
126  return false;
-
127  }
-
128  fclose(f);
-
129 #endif // VORTEX_EMBEDDED
-
130  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
131  return true;
-
132 }
-
133 
-
134 // read a serial buffer from storage
- -
136 {
-
137 #ifdef VORTEX_LIB
-
138  if (!Vortex::storageEnabled()) {
-
139  // return false here, but true in write because we don't want to return
-
140  // an empty buffer after returning true
-
141  return false;
-
142  }
-
143 #endif
-
144  uint32_t size = STORAGE_SIZE;
-
145  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
146  return false;
-
147  }
-
148  if (!buffer.init(size)) {
-
149  return false;
-
150  }
-
151 #ifdef VORTEX_EMBEDDED
-
152  // read directly into the raw data of the byte array
-
153  memcpy(buffer.rawData(), (const void *)_storagedata, size);
-
154 #elif defined(_WIN32)
-
155  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
156  if (hFile == INVALID_HANDLE_VALUE) {
-
157  // error
-
158  return false;
-
159  }
-
160  DWORD bytesRead = 0;
-
161  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
162  // error
-
163  return false;
-
164  }
-
165  CloseHandle(hFile);
-
166 #else
-
167  FILE *f = fopen(STORAGE_FILENAME, "r");
-
168  if (!f) {
-
169  return false;
-
170  }
-
171  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
172  return false;
-
173  }
-
174  fclose(f);
-
175 #endif
-
176  // ensure the internal buffer is sane after reading it out, this
-
177  // prevents segfaults if the internal size reports larger than capacity
-
178  buffer.sanity();
-
179  // check crc immediately since we read into raw data copying the
-
180  // array could be dangerous
-
181  if (!buffer.checkCRC()) {
-
182  buffer.clear();
-
183  ERROR_LOG("Could not verify buffer");
-
184  return false;
-
185  }
-
186  m_lastSaveSize = size;
-
187  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
188  return true;
-
189 }
-
190 
- -
192 {
-
193  return m_lastSaveSize;
-
194 }
+
125 #elif defined(_WIN32)
+
126  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
127  if (hFile == INVALID_HANDLE_VALUE) {
+
128  // error
+
129  return false;
+
130  }
+
131  DWORD written = 0;
+
132  DWORD offset = slot * MAX_MODE_SIZE;
+
133  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
134  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
135  // error
+
136  return false;
+
137  }
+
138  CloseHandle(hFile);
+
139 #else
+
140  FILE *f = fopen(STORAGE_FILENAME, "w");
+
141  if (!f) {
+
142  return false;
+
143  }
+
144  long offset = slot * MAX_MODE_SIZE;
+
145  fseek(f, offset, SEEK_SET);
+
146  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
147  return false;
+
148  }
+
149  fclose(f);
+
150 #endif // VORTEX_EMBEDDED
+
151  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
152  return true;
+
153 }
+
154 
+
155 // read a serial buffer from storage
+
156 bool Storage::read(uint16_t slot, ByteStream &buffer)
+
157 {
+
158 #ifdef VORTEX_LIB
+
159  if (!Vortex::storageEnabled()) {
+
160  // return false here, but true in write because we don't want to return
+
161  // an empty buffer after returning true
+
162  return false;
+
163  }
+
164 #endif
+
165  uint32_t size = MAX_MODE_SIZE;
+
166  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
+
167  return false;
+
168  }
+
169  if (!buffer.init(size)) {
+
170  return false;
+
171  }
+
172 #ifdef VORTEX_EMBEDDED
+
173  // read directly into the raw data of the byte array
+
174  memcpy(buffer.rawData(), (const void *)(_storagedata + (slot * MAX_MODE_SIZE)), size);
+
175 #elif defined(_WIN32)
+
176  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
177  if (hFile == INVALID_HANDLE_VALUE) {
+
178  // error
+
179  return false;
+
180  }
+
181  DWORD bytesRead = 0;
+
182  DWORD offset = slot * MAX_MODE_SIZE;
+
183  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
184  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
185  // error
+
186  return false;
+
187  }
+
188  CloseHandle(hFile);
+
189 #else
+
190  FILE *f = fopen(STORAGE_FILENAME, "r");
+
191  if (!f) {
+
192  return false;
+
193  }
+
194  long offset = slot * MAX_MODE_SIZE;
+
195  fseek(f, offset, SEEK_SET);
+
196  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
197  return false;
+
198  }
+
199  fclose(f);
+
200 #endif
+
201  // ensure the internal buffer is sane after reading it out, this
+
202  // prevents segfaults if the internal size reports larger than capacity
+
203  buffer.sanity();
+
204  // check crc immediately since we read into raw data copying the
+
205  // array could be dangerous
+
206  if (!buffer.checkCRC()) {
+
207  buffer.clear();
+
208  ERROR_LOG("Could not verify buffer");
+
209  return false;
+
210  }
+
211  m_lastSaveSize = size;
+
212  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
213  return true;
+
214 }
+
215 
+ +
217 {
+
218  return m_lastSaveSize;
+
219 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define PAGE_SIZE
Definition: Storage.cpp:32
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define PAGE_SIZE
Definition: Storage.cpp:34
__attribute__((__aligned__(256))) const uint8_t _storagedata[(STORAGE_SIZE+255)/256 *256]
-
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:504
+
#define STORAGE_SIZE
Definition: VortexConfig.h:511
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:507
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
void * rawData() const
Definition: ByteStream.h:121
uint32_t rawSize() const
Definition: ByteStream.h:122
void clear()
Definition: ByteStream.cpp:107
uint32_t size() const
Definition: ByteStream.h:123
bool checkCRC() const
Definition: ByteStream.cpp:327
void sanity()
Definition: ByteStream.cpp:319
-
static bool init()
Definition: Storage.cpp:43
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static void cleanup()
Definition: Storage.cpp:53
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
-
Storage()
Definition: Storage.cpp:39
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
+
Storage()
Definition: Storage.cpp:41
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/gloves/Storage_8h_source.html b/docs/gloves/Storage_8h_source.html index e735334741..5891ba68f2 100644 --- a/docs/gloves/Storage_8h_source.html +++ b/docs/gloves/Storage_8h_source.html @@ -108,9 +108,9 @@
19  static void cleanup();
20 
21  // store a serial buffer to storage
-
22  static bool write(ByteStream &buffer);
+
22  static bool write(uint16_t slot, ByteStream &buffer);
23  // read a serial buffer from storage
-
24  static bool read(ByteStream &buffer);
+
24  static bool read(uint16_t slot, ByteStream &buffer);
25 
26  // the last save size (use STORAGE_SIZE For total space)
27  static uint32_t lastSaveSize();
@@ -132,12 +132,12 @@
43 #endif
-
static bool init()
Definition: Storage.cpp:43
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static void cleanup()
Definition: Storage.cpp:53
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
-
Storage()
Definition: Storage.cpp:39
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
+
Storage()
Definition: Storage.cpp:41
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/gloves/TimeControl_8cpp_source.html b/docs/gloves/TimeControl_8cpp_source.html index d2c4bc9b0d..1cd8a79fda 100644 --- a/docs/gloves/TimeControl_8cpp_source.html +++ b/docs/gloves/TimeControl_8cpp_source.html @@ -199,7 +199,7 @@
110  uint32_t sleepTime = 0;
111  if (required > elapsed_us) {
112  // in vortex lib on linux we can just sleep instead of spinning
-
113  // but on arduino we must spin and on windows it actually ends
+
113  // but on embedded we must spin and on windows it actually ends
114  // up being more accurate to poll QPF + QPC via microseconds()
115  sleepTime = required - elapsed_us;
116  }
@@ -423,7 +423,7 @@
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static bool init()
Definition: TimeControl.cpp:50
static void delayMicroseconds(uint32_t us)
static uint32_t getRealCurtime()
diff --git a/docs/gloves/Timings_8h_source.html b/docs/gloves/Timings_8h_source.html index c679178eb7..51f72a452c 100644 --- a/docs/gloves/Timings_8h_source.html +++ b/docs/gloves/Timings_8h_source.html @@ -98,17 +98,17 @@
9 // through the MS_TO_TICKS macro which calculates the corresponding number of ticks for
10 // the given duration at the current tickrate, on embedded this is 1 to 1 but in vortexlib
11 // the tickrate can be adjusted so these will expand out to function calls to millisecondsToTicks()
-
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
-
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
-
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
-
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
-
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
-
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
-
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
-
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
-
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
-
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
-
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
+
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
+
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
+
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
+
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
+
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
+
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
+
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
+
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
+
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
+
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
+
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
23 
24 // Strobe Timings
25 //
diff --git a/docs/gloves/VortexConfig_8h.html b/docs/gloves/VortexConfig_8h.html index 51ea7c635a..d320b2709d 100644 --- a/docs/gloves/VortexConfig_8h.html +++ b/docs/gloves/VortexConfig_8h.html @@ -155,7 +155,7 @@   #define DEFAULT_BRIGHTNESS   185   -#define MAX_MODES   0 +#define MAX_MODES   15   #define DEFAULT_TICKRATE   1000   @@ -271,7 +271,11 @@   #define EDITOR_VERB_GOODBYE   "l"   -#define STORAGE_SIZE   4096 +#define MAX_MODE_SIZE   512 +  +#define NUM_MODE_SLOTS   (MAX_MODES + 1) +  +#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)   #define VORTEX_EMBEDDED   1   @@ -325,7 +329,7 @@

-

Definition at line 274 of file VortexConfig.h.

+

Definition at line 273 of file VortexConfig.h.

@@ -389,7 +393,7 @@

-

Definition at line 280 of file VortexConfig.h.

+

Definition at line 279 of file VortexConfig.h.

@@ -405,7 +409,7 @@

-

Definition at line 281 of file VortexConfig.h.

+

Definition at line 280 of file VortexConfig.h.

@@ -421,7 +425,7 @@

-

Definition at line 282 of file VortexConfig.h.

+

Definition at line 281 of file VortexConfig.h.

@@ -437,7 +441,7 @@

-

Definition at line 283 of file VortexConfig.h.

+

Definition at line 282 of file VortexConfig.h.

@@ -501,7 +505,7 @@

-

Definition at line 396 of file VortexConfig.h.

+

Definition at line 395 of file VortexConfig.h.

@@ -533,7 +537,7 @@

-

Definition at line 337 of file VortexConfig.h.

+

Definition at line 336 of file VortexConfig.h.

@@ -565,7 +569,7 @@

-

Definition at line 199 of file VortexConfig.h.

+

Definition at line 198 of file VortexConfig.h.

@@ -581,7 +585,7 @@

-

Definition at line 189 of file VortexConfig.h.

+

Definition at line 188 of file VortexConfig.h.

@@ -597,7 +601,7 @@

-

Definition at line 326 of file VortexConfig.h.

+

Definition at line 325 of file VortexConfig.h.

@@ -629,7 +633,7 @@

-

Definition at line 491 of file VortexConfig.h.

+

Definition at line 490 of file VortexConfig.h.

@@ -645,7 +649,7 @@

-

Definition at line 493 of file VortexConfig.h.

+

Definition at line 492 of file VortexConfig.h.

@@ -661,7 +665,7 @@

-

Definition at line 486 of file VortexConfig.h.

+

Definition at line 485 of file VortexConfig.h.

@@ -677,7 +681,7 @@

-

Definition at line 488 of file VortexConfig.h.

+

Definition at line 487 of file VortexConfig.h.

@@ -693,7 +697,7 @@

-

Definition at line 497 of file VortexConfig.h.

+

Definition at line 496 of file VortexConfig.h.

@@ -709,7 +713,7 @@

-

Definition at line 462 of file VortexConfig.h.

+

Definition at line 461 of file VortexConfig.h.

@@ -725,7 +729,7 @@

-

Definition at line 461 of file VortexConfig.h.

+

Definition at line 460 of file VortexConfig.h.

@@ -741,7 +745,7 @@

-

Definition at line 460 of file VortexConfig.h.

+

Definition at line 459 of file VortexConfig.h.

@@ -757,7 +761,7 @@

-

Definition at line 465 of file VortexConfig.h.

+

Definition at line 464 of file VortexConfig.h.

@@ -773,7 +777,7 @@

-

Definition at line 474 of file VortexConfig.h.

+

Definition at line 473 of file VortexConfig.h.

@@ -789,7 +793,7 @@

-

Definition at line 478 of file VortexConfig.h.

+

Definition at line 477 of file VortexConfig.h.

@@ -805,7 +809,7 @@

-

Definition at line 476 of file VortexConfig.h.

+

Definition at line 475 of file VortexConfig.h.

@@ -821,7 +825,7 @@

-

Definition at line 481 of file VortexConfig.h.

+

Definition at line 480 of file VortexConfig.h.

@@ -837,7 +841,7 @@

-

Definition at line 483 of file VortexConfig.h.

+

Definition at line 482 of file VortexConfig.h.

@@ -853,7 +857,7 @@

-

Definition at line 471 of file VortexConfig.h.

+

Definition at line 470 of file VortexConfig.h.

@@ -869,7 +873,7 @@

-

Definition at line 389 of file VortexConfig.h.

+

Definition at line 388 of file VortexConfig.h.

@@ -905,7 +909,7 @@

-

Definition at line 312 of file VortexConfig.h.

+

Definition at line 311 of file VortexConfig.h.

@@ -921,7 +925,7 @@

-

Definition at line 382 of file VortexConfig.h.

+

Definition at line 381 of file VortexConfig.h.

@@ -937,7 +941,7 @@

-

Definition at line 254 of file VortexConfig.h.

+

Definition at line 253 of file VortexConfig.h.

@@ -953,7 +957,7 @@

-

Definition at line 261 of file VortexConfig.h.

+

Definition at line 260 of file VortexConfig.h.

@@ -969,7 +973,7 @@

-

Definition at line 268 of file VortexConfig.h.

+

Definition at line 267 of file VortexConfig.h.

@@ -1001,7 +1005,7 @@

-

Definition at line 225 of file VortexConfig.h.

+

Definition at line 224 of file VortexConfig.h.

@@ -1017,7 +1021,7 @@

-

Definition at line 230 of file VortexConfig.h.

+

Definition at line 229 of file VortexConfig.h.

@@ -1033,7 +1037,7 @@

-

Definition at line 219 of file VortexConfig.h.

+

Definition at line 218 of file VortexConfig.h.

@@ -1065,7 +1069,23 @@

-

Definition at line 207 of file VortexConfig.h.

+

Definition at line 206 of file VortexConfig.h.

+ + + + +

◆ MAX_MODE_SIZE

+ +
+
+ + + + +
#define MAX_MODE_SIZE   512
+
+ +

Definition at line 504 of file VortexConfig.h.

@@ -1076,12 +1096,12 @@

- +
#define MAX_MODES   0#define MAX_MODES   15
-

Definition at line 168 of file VortexConfig.h.

+

Definition at line 167 of file VortexConfig.h.

@@ -1113,7 +1133,23 @@

-

Definition at line 410 of file VortexConfig.h.

+

Definition at line 409 of file VortexConfig.h.

+ + + + +

◆ NUM_MODE_SLOTS

+ +
+
+ + + + +
#define NUM_MODE_SLOTS   (MAX_MODES + 1)
+
+ +

Definition at line 507 of file VortexConfig.h.

@@ -1145,7 +1181,7 @@

-

Definition at line 445 of file VortexConfig.h.

+

Definition at line 444 of file VortexConfig.h.

@@ -1161,7 +1197,7 @@

-

Definition at line 439 of file VortexConfig.h.

+

Definition at line 438 of file VortexConfig.h.

@@ -1177,7 +1213,7 @@

-

Definition at line 436 of file VortexConfig.h.

+

Definition at line 435 of file VortexConfig.h.

@@ -1193,7 +1229,7 @@

-

Definition at line 448 of file VortexConfig.h.

+

Definition at line 447 of file VortexConfig.h.

@@ -1209,7 +1245,7 @@

-

Definition at line 433 of file VortexConfig.h.

+

Definition at line 432 of file VortexConfig.h.

@@ -1225,7 +1261,7 @@

-

Definition at line 442 of file VortexConfig.h.

+

Definition at line 441 of file VortexConfig.h.

@@ -1241,7 +1277,7 @@

-

Definition at line 430 of file VortexConfig.h.

+

Definition at line 429 of file VortexConfig.h.

@@ -1257,7 +1293,7 @@

-

Definition at line 289 of file VortexConfig.h.

+

Definition at line 288 of file VortexConfig.h.

@@ -1273,7 +1309,7 @@

-

Definition at line 290 of file VortexConfig.h.

+

Definition at line 289 of file VortexConfig.h.

@@ -1289,7 +1325,7 @@

-

Definition at line 291 of file VortexConfig.h.

+

Definition at line 290 of file VortexConfig.h.

@@ -1305,7 +1341,7 @@

-

Definition at line 292 of file VortexConfig.h.

+

Definition at line 291 of file VortexConfig.h.

@@ -1337,7 +1373,7 @@

-

Definition at line 402 of file VortexConfig.h.

+

Definition at line 401 of file VortexConfig.h.

@@ -1348,12 +1384,12 @@

- +
#define STORAGE_SIZE   4096#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)
-

Definition at line 506 of file VortexConfig.h.

+

Definition at line 511 of file VortexConfig.h.

@@ -1369,7 +1405,7 @@

-

Definition at line 416 of file VortexConfig.h.

+

Definition at line 415 of file VortexConfig.h.

@@ -1385,7 +1421,7 @@

-

Definition at line 317 of file VortexConfig.h.

+

Definition at line 316 of file VortexConfig.h.

@@ -1401,7 +1437,7 @@

-

Definition at line 298 of file VortexConfig.h.

+

Definition at line 297 of file VortexConfig.h.

@@ -1417,7 +1453,7 @@

-

Definition at line 299 of file VortexConfig.h.

+

Definition at line 298 of file VortexConfig.h.

@@ -1433,7 +1469,7 @@

-

Definition at line 300 of file VortexConfig.h.

+

Definition at line 299 of file VortexConfig.h.

@@ -1449,7 +1485,7 @@

-

Definition at line 301 of file VortexConfig.h.

+

Definition at line 300 of file VortexConfig.h.

@@ -1465,7 +1501,7 @@

-

Definition at line 351 of file VortexConfig.h.

+

Definition at line 350 of file VortexConfig.h.

@@ -1481,7 +1517,7 @@

-

Definition at line 517 of file VortexConfig.h.

+

Definition at line 522 of file VortexConfig.h.

@@ -1497,7 +1533,7 @@

-

Definition at line 370 of file VortexConfig.h.

+

Definition at line 369 of file VortexConfig.h.

@@ -1529,7 +1565,7 @@

-

Definition at line 235 of file VortexConfig.h.

+

Definition at line 234 of file VortexConfig.h.

diff --git a/docs/gloves/VortexConfig_8h.js b/docs/gloves/VortexConfig_8h.js index ea7c267931..3271260e6c 100644 --- a/docs/gloves/VortexConfig_8h.js +++ b/docs/gloves/VortexConfig_8h.js @@ -49,9 +49,11 @@ var VortexConfig_8h = [ "LOGGING_LEVEL", "VortexConfig_8h.html#aaff29f732338b733b8d1fee0e8df32ab", null ], [ "MAX_COLOR_SLOTS", "VortexConfig_8h.html#a1a0b694e2871554a4066f8d61f577c4c", null ], [ "MAX_MEMORY", "VortexConfig_8h.html#add0367147bdc878651ddf447424b50d5", null ], + [ "MAX_MODE_SIZE", "VortexConfig_8h.html#a4d5f0e0392f00d31715ddf81eb87434a", null ], [ "MAX_MODES", "VortexConfig_8h.html#a95b270e9c99aea216b47fd1e95b2cf34", null ], [ "MENU_TRIGGER_TIME", "VortexConfig_8h.html#adda1b08b81d68fa6a4a6109701f9dd57", null ], [ "MODES_TEST", "VortexConfig_8h.html#a9c95eccf51317b46e19269c6dbc7628e", null ], + [ "NUM_MODE_SLOTS", "VortexConfig_8h.html#ab0c5cc9223512ec01c405592b6741898", null ], [ "RESET_HOLD_TIME", "VortexConfig_8h.html#a18f22a5b8ac9dfe404fd4b83e502eda2", null ], [ "RGB_MENU_BRIGHTNESS_SELECT", "VortexConfig_8h.html#a3fd5d16a2fea0175b3b34083c6dfb42f", null ], [ "RGB_MENU_COLOR_SELECT", "VortexConfig_8h.html#a3b335e17dcc12be29e18e3373e5352cb", null ], diff --git a/docs/gloves/VortexConfig_8h_source.html b/docs/gloves/VortexConfig_8h_source.html index a53313a19f..6e789a3000 100644 --- a/docs/gloves/VortexConfig_8h_source.html +++ b/docs/gloves/VortexConfig_8h_source.html @@ -250,439 +250,444 @@
161 // two fold the issues with space because they are already limited
162 // and the lack of compression makes their save files bigger
163 //
-
164 // This is set to 0 by default which allows for any number of modes
-
165 // to be stored, however this is not recommended for production and
-
166 // a specific maximum should be chosen for each device
-
167 //
-
168 #define MAX_MODES 0
-
169 
-
170 // Default Tickrate in Ticks Per Second (TPS)
-
171 //
-
172 // The valid range for this is 1 <= x <= 1000000 (default 1000)
-
173 //
-
174 // Any value near or above 10000 will most likely be too fast for
-
175 // the processor to handle.
-
176 //
-
177 // Any value less than 100 and you risk a single tick taking longer
-
178 // than some pattern timings which results in very weird behaviour
-
179 //
-
180 // It's probably best that you leave this at 1000
-
181 //
-
182 // WARNING:
-
183 //
-
184 // The timer system was not designed to handle ticks that are not
-
185 // exactly 1 ms. This means that if you change the tickrate to any
-
186 // value other than 1000 the timer system will miss alarms, patterns
-
187 // will not look correct and there is no fix at the moment.
-
188 //
-
189 #define DEFAULT_TICKRATE 1000
-
190 
-
191 // Pair time offset in ticks
-
192 //
-
193 // This changes how many ticks out of sync each finger will run.
-
194 // So 33 means each finger runs 33 ticks out of sync with the
-
195 // previous finger.
-
196 //
-
197 // This was an early feature that fell into disrepair, I don't
-
198 // think it works anymore and really hasn't proven to be useful
-
199 #define DEFAULT_TICK_OFFSET 0
-
200 
-
201 // Max Memory Usage
-
202 //
-
203 // The maximum memory usage allowed by the memory tracker.
-
204 // The memory tracker isn't present in final builds, only debug
-
205 // so this number doesn't actually do anything in production.
-
206 // Mostly for catching leaks or high memory usage in development.
-
207 #define MAX_MEMORY 8000
-
208 
-
209 // Log Level
-
210 //
-
211 // Set the logging level to control info/error/debug logs accordingly
-
212 // The available logging levels are:
-
213 //
-
214 // 0 Off All logging is disabled
-
215 // 1 Info Only info logs are present
-
216 // 2 Errors Info and error logs are present
-
217 // 3 Debug All logs are present, info, error, and debug
-
218 //
-
219 #define LOGGING_LEVEL 0
-
220 
-
221 // Log to Console
-
222 //
-
223 // Enable logging to console, still need to change LOGGING_LEVEL
-
224 // this only enables the console output connection
-
225 #define LOG_TO_CONSOLE 0
-
226 
-
227 // Log to File
-
228 //
-
229 // Enable this configuration to enable logging to the file
-
230 #define LOG_TO_FILE 0
-
231 
-
232 // Log Name
-
233 //
-
234 // The name of the file on disk that will receive the log info
-
235 #define VORTEX_LOG_NAME "vortexlog"
-
236 
-
237 // HSV to RGB Conversion Algorithm
-
238 //
-
239 // Here you can choose the HSV to RGB conversion algorithm, this will
-
240 // control the overall appearance of all colours produced with HSV.
-
241 // The available options are:
-
242 //
-
243 // 1 FastLED 'hsv to rgb rainbow'
-
244 // 2 FastLED 'hsv to rgb raw C'
-
245 // 3 generic hsv to rgb 'pastel'
-
246 //
-
247 // Option 1 is the default and legacy choice, also looks best because
-
248 // it puts even weight into every color of the rainbow which involves
-
249 // stretching some segments like yellow to take up more hue space.
-
250 //
-
251 // Note you can still call the other routines from your pattern code,
-
252 // for example blend and complementary blend use hsv to rgb 'pastel'
-
253 // because it looks better than hsv to rgb rainbow
-
254 #define HSV_TO_RGB_ALGORITHM 3
-
255 
-
256 // IR Receiver Time-out Duration (ms)
-
257 //
-
258 // This is the amount of time in ms for the IR receiver to wait
-
259 // before reseting itself in the case that communication gets
-
260 // interrupted.
-
261 #define IR_RECEIVER_TIMEOUT_DURATION 2000
-
262 
-
263 // IR Sender Wait Duration (ms)
-
264 //
-
265 // This is the amount of time in ms for the IR sender to wait
-
266 // between IR sends. This duration allows the user to give input
-
267 // as it is not possible to give input during a send.
-
268 #define IR_SENDER_WAIT_DURATION 2000
-
269 
-
270 // Enter Advanced Menus Click Duration (ms)
-
271 //
-
272 // How long the user must long click on the menu item to enter the
-
273 // 'advanced' version of the menu
-
274 #define ADVANCED_MENU_ENTER_DURATION 1500
-
275 
-
276 // Brightness Options
-
277 //
-
278 // These are the four options available in the global brightness menu
-
279 // There is only four options, be careful not to go too low
-
280 #define BRIGHTNESS_OPTION_1 40
-
281 #define BRIGHTNESS_OPTION_2 120
-
282 #define BRIGHTNESS_OPTION_3 185
-
283 #define BRIGHTNESS_OPTION_4 255
-
284 
-
285 // Saturation Options
-
286 //
-
287 // These are the four saturations available in the color selection menu
-
288 // Any color can be picked with any of these 4 saturations
-
289 #define SAT_OPTION_1 0
-
290 #define SAT_OPTION_2 85
-
291 #define SAT_OPTION_3 170
-
292 #define SAT_OPTION_4 255
-
293 
-
294 // Value/Luminance Options
-
295 //
-
296 // These are the four values/luminance options in the color selection menu
-
297 // Any color can be picked with any of these 4 values
-
298 #define VAL_OPTION_1 0
-
299 #define VAL_OPTION_2 85
-
300 #define VAL_OPTION_3 170
-
301 #define VAL_OPTION_4 255
-
302 
-
303 // ===================================================================
-
304 // Boolean Configurations (0 or 1)
-
305 
-
306 // Fill From Thumb
-
307 //
-
308 // The ring menu will fill from the thumb if this is present, otherwise
-
309 // it will fill from the pinkie.
-
310 //
-
311 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
-
312 #define FILL_FROM_THUMB 1
-
313 
-
314 // Use Palm Lights
-
315 //
-
316 // Adjust the engine to account for palm lights
-
317 #define USE_PALM_LIGHTS 0
-
318 
-
319 // Demo All Patterns
-
320 //
-
321 // The default modes that are set on the gloveset will be dynamically
-
322 // generated with one mode per pattern in the patterns list
-
323 //
-
324 // This can be used to quickly demo all possible patterns, mostly useful
-
325 // for testing and development
-
326 #define DEMO_ALL_PATTERNS 0
-
327 
-
328 // Debug Allocations
-
329 //
-
330 // Tracks all memory allocations and logs them, useful for finding leaks
-
331 //
-
332 // Note tracking allocations while using the test framework will be inaccurate
-
333 // because the test framework allocations will be caught as well.
-
334 //
-
335 // When the test framework does things like display a color for the first time
-
336 // it will allocate space permanently for the new brush and never free it
-
337 #define DEBUG_ALLOCATIONS 0
-
338 
-
339 // Variable Tickrate
-
340 //
-
341 // This controls whether the setTickrate function is available and
-
342 // whether changing the tickrate is allowed. This goes hand-in-hand
-
343 // with the Default Tickrate configuration above
-
344 //
-
345 // The tickrate should always be fixed in final builds because this
-
346 // functionality induces extra performance costs and the intended
-
347 // tickrate for the final build should already be known.
-
348 //
-
349 // However there may be some clever uses for variable tickrate in
-
350 // the final build? I'm not sure.
-
351 #define VARIABLE_TICKRATE 0
-
352 
-
353 // Error Blinker System
-
354 //
-
355 // This toggles the vortex error blinker system, this system reports
-
356 // fatal errors as a series of blinks. If an error is encountered the
-
357 // chip will only blink out the error code from there forward.
-
358 //
-
359 // Note that enabling this system takes a non-negligible amount
-
360 // of space for all of the code, it really should only be used
-
361 // for debug settings or given tiers like logging level.
-
362 //
-
363 // This is mainly useful for tracking down issues on devices that don't
-
364 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
-
365 // set the error code and then the device will blink out the error
-
366 //
-
367 // for ex: red red green blue blue blue is code 213
-
368 //
-
369 // See Log/ErrorBlinker.h for details on the error codes
-
370 #define VORTEX_ERROR_BLINK 0
-
371 
-
372 // Fixed LED Count
-
373 //
-
374 // Do not allow the Mode loader to dynamically load however many modes
-
375 // are saved in the savefile. This should be enabled for arduino or vortex
-
376 // device builds because they cannot change their number of LEDs. However
-
377 // other tools like the editor or vortex emulator may be able to make use
-
378 // of this to dynamically adjust the number of leds that a mode can handle
-
379 //
-
380 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
-
381 // a mode will stretch it's list of patterns to match the number of leds
-
382 #define FIXED_LED_COUNT 1
-
383 
-
384 // Enable Editor Connection
-
385 //
-
386 // Turn on the editor connection, some devices are capable of connecting to
-
387 // the pc-based editor, this controls whether the engine exposes the purple
-
388 // editor connection menu or not
-
389 #define ENABLE_EDITOR_CONNECTION 1
-
390 
-
391 // Compression Test
-
392 //
-
393 // Run the built-in compression test that will find any faults
-
394 // in the compressor or decompressor. This is useful if you install
-
395 // a new compressor or want to test any changes to the compressor
-
396 #define COMPRESSION_TEST 0
-
397 
-
398 // Serialization Test
-
399 //
-
400 // Run the serializer/unserializer test which will find any objects
-
401 // which don't serialize and unserialize cleanly
-
402 #define SERIALIZATION_TEST 0
-
403 
-
404 // Modes Test
-
405 //
-
406 // Run unit tests on the Modes class which manages the list of Modes.
-
407 // If any patterns fail to instantiate or perform basic operations
-
408 // it should show up in the modes test. Also if the Modes api has been
-
409 // updated then this will test for any issues
-
410 #define MODES_TEST 0
-
411 
-
412 // Timer Test
-
413 //
-
414 // Tests the timers, time control, and timestep system to ensure they
-
415 // are all working as expected and behaving properly
-
416 #define TIMER_TEST 0
+
164 // This should not be set to 0, it should be a specific maximum for
+
165 // each separate device
+
166 //
+
167 #define MAX_MODES 15
+
168 
+
169 // Default Tickrate in Ticks Per Second (TPS)
+
170 //
+
171 // The valid range for this is 1 <= x <= 1000000 (default 1000)
+
172 //
+
173 // Any value near or above 10000 will most likely be too fast for
+
174 // the processor to handle.
+
175 //
+
176 // Any value less than 100 and you risk a single tick taking longer
+
177 // than some pattern timings which results in very weird behaviour
+
178 //
+
179 // It's probably best that you leave this at 1000
+
180 //
+
181 // WARNING:
+
182 //
+
183 // The timer system was not designed to handle ticks that are not
+
184 // exactly 1 ms. This means that if you change the tickrate to any
+
185 // value other than 1000 the timer system will miss alarms, patterns
+
186 // will not look correct and there is no fix at the moment.
+
187 //
+
188 #define DEFAULT_TICKRATE 1000
+
189 
+
190 // Pair time offset in ticks
+
191 //
+
192 // This changes how many ticks out of sync each finger will run.
+
193 // So 33 means each finger runs 33 ticks out of sync with the
+
194 // previous finger.
+
195 //
+
196 // This was an early feature that fell into disrepair, I don't
+
197 // think it works anymore and really hasn't proven to be useful
+
198 #define DEFAULT_TICK_OFFSET 0
+
199 
+
200 // Max Memory Usage
+
201 //
+
202 // The maximum memory usage allowed by the memory tracker.
+
203 // The memory tracker isn't present in final builds, only debug
+
204 // so this number doesn't actually do anything in production.
+
205 // Mostly for catching leaks or high memory usage in development.
+
206 #define MAX_MEMORY 8000
+
207 
+
208 // Log Level
+
209 //
+
210 // Set the logging level to control info/error/debug logs accordingly
+
211 // The available logging levels are:
+
212 //
+
213 // 0 Off All logging is disabled
+
214 // 1 Info Only info logs are present
+
215 // 2 Errors Info and error logs are present
+
216 // 3 Debug All logs are present, info, error, and debug
+
217 //
+
218 #define LOGGING_LEVEL 0
+
219 
+
220 // Log to Console
+
221 //
+
222 // Enable logging to console, still need to change LOGGING_LEVEL
+
223 // this only enables the console output connection
+
224 #define LOG_TO_CONSOLE 0
+
225 
+
226 // Log to File
+
227 //
+
228 // Enable this configuration to enable logging to the file
+
229 #define LOG_TO_FILE 0
+
230 
+
231 // Log Name
+
232 //
+
233 // The name of the file on disk that will receive the log info
+
234 #define VORTEX_LOG_NAME "vortexlog"
+
235 
+
236 // HSV to RGB Conversion Algorithm
+
237 //
+
238 // Here you can choose the HSV to RGB conversion algorithm, this will
+
239 // control the overall appearance of all colours produced with HSV.
+
240 // The available options are:
+
241 //
+
242 // 1 FastLED 'hsv to rgb rainbow'
+
243 // 2 FastLED 'hsv to rgb raw C'
+
244 // 3 generic hsv to rgb 'pastel'
+
245 //
+
246 // Option 1 is the default and legacy choice, also looks best because
+
247 // it puts even weight into every color of the rainbow which involves
+
248 // stretching some segments like yellow to take up more hue space.
+
249 //
+
250 // Note you can still call the other routines from your pattern code,
+
251 // for example blend and complementary blend use hsv to rgb 'pastel'
+
252 // because it looks better than hsv to rgb rainbow
+
253 #define HSV_TO_RGB_ALGORITHM 3
+
254 
+
255 // IR Receiver Time-out Duration (ms)
+
256 //
+
257 // This is the amount of time in ms for the IR receiver to wait
+
258 // before reseting itself in the case that communication gets
+
259 // interrupted.
+
260 #define IR_RECEIVER_TIMEOUT_DURATION 2000
+
261 
+
262 // IR Sender Wait Duration (ms)
+
263 //
+
264 // This is the amount of time in ms for the IR sender to wait
+
265 // between IR sends. This duration allows the user to give input
+
266 // as it is not possible to give input during a send.
+
267 #define IR_SENDER_WAIT_DURATION 2000
+
268 
+
269 // Enter Advanced Menus Click Duration (ms)
+
270 //
+
271 // How long the user must long click on the menu item to enter the
+
272 // 'advanced' version of the menu
+
273 #define ADVANCED_MENU_ENTER_DURATION 1500
+
274 
+
275 // Brightness Options
+
276 //
+
277 // These are the four options available in the global brightness menu
+
278 // There is only four options, be careful not to go too low
+
279 #define BRIGHTNESS_OPTION_1 40
+
280 #define BRIGHTNESS_OPTION_2 120
+
281 #define BRIGHTNESS_OPTION_3 185
+
282 #define BRIGHTNESS_OPTION_4 255
+
283 
+
284 // Saturation Options
+
285 //
+
286 // These are the four saturations available in the color selection menu
+
287 // Any color can be picked with any of these 4 saturations
+
288 #define SAT_OPTION_1 0
+
289 #define SAT_OPTION_2 85
+
290 #define SAT_OPTION_3 170
+
291 #define SAT_OPTION_4 255
+
292 
+
293 // Value/Luminance Options
+
294 //
+
295 // These are the four values/luminance options in the color selection menu
+
296 // Any color can be picked with any of these 4 values
+
297 #define VAL_OPTION_1 0
+
298 #define VAL_OPTION_2 85
+
299 #define VAL_OPTION_3 170
+
300 #define VAL_OPTION_4 255
+
301 
+
302 // ===================================================================
+
303 // Boolean Configurations (0 or 1)
+
304 
+
305 // Fill From Thumb
+
306 //
+
307 // The ring menu will fill from the thumb if this is present, otherwise
+
308 // it will fill from the pinkie.
+
309 //
+
310 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
+
311 #define FILL_FROM_THUMB 1
+
312 
+
313 // Use Palm Lights
+
314 //
+
315 // Adjust the engine to account for palm lights
+
316 #define USE_PALM_LIGHTS 0
+
317 
+
318 // Demo All Patterns
+
319 //
+
320 // The default modes that are set on the gloveset will be dynamically
+
321 // generated with one mode per pattern in the patterns list
+
322 //
+
323 // This can be used to quickly demo all possible patterns, mostly useful
+
324 // for testing and development
+
325 #define DEMO_ALL_PATTERNS 0
+
326 
+
327 // Debug Allocations
+
328 //
+
329 // Tracks all memory allocations and logs them, useful for finding leaks
+
330 //
+
331 // Note tracking allocations while using the test framework will be inaccurate
+
332 // because the test framework allocations will be caught as well.
+
333 //
+
334 // When the test framework does things like display a color for the first time
+
335 // it will allocate space permanently for the new brush and never free it
+
336 #define DEBUG_ALLOCATIONS 0
+
337 
+
338 // Variable Tickrate
+
339 //
+
340 // This controls whether the setTickrate function is available and
+
341 // whether changing the tickrate is allowed. This goes hand-in-hand
+
342 // with the Default Tickrate configuration above
+
343 //
+
344 // The tickrate should always be fixed in final builds because this
+
345 // functionality induces extra performance costs and the intended
+
346 // tickrate for the final build should already be known.
+
347 //
+
348 // However there may be some clever uses for variable tickrate in
+
349 // the final build? I'm not sure.
+
350 #define VARIABLE_TICKRATE 0
+
351 
+
352 // Error Blinker System
+
353 //
+
354 // This toggles the vortex error blinker system, this system reports
+
355 // fatal errors as a series of blinks. If an error is encountered the
+
356 // chip will only blink out the error code from there forward.
+
357 //
+
358 // Note that enabling this system takes a non-negligible amount
+
359 // of space for all of the code, it really should only be used
+
360 // for debug settings or given tiers like logging level.
+
361 //
+
362 // This is mainly useful for tracking down issues on devices that don't
+
363 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
+
364 // set the error code and then the device will blink out the error
+
365 //
+
366 // for ex: red red green blue blue blue is code 213
+
367 //
+
368 // See Log/ErrorBlinker.h for details on the error codes
+
369 #define VORTEX_ERROR_BLINK 0
+
370 
+
371 // Fixed LED Count
+
372 //
+
373 // Do not allow the Mode loader to dynamically load however many modes
+
374 // are saved in the savefile. This should be enabled for embedded or vortex
+
375 // device builds because they cannot change their number of LEDs. However
+
376 // other tools like the editor or vortex emulator may be able to make use
+
377 // of this to dynamically adjust the number of leds that a mode can handle
+
378 //
+
379 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
+
380 // a mode will stretch it's list of patterns to match the number of leds
+
381 #define FIXED_LED_COUNT 1
+
382 
+
383 // Enable Editor Connection
+
384 //
+
385 // Turn on the editor connection, some devices are capable of connecting to
+
386 // the pc-based editor, this controls whether the engine exposes the purple
+
387 // editor connection menu or not
+
388 #define ENABLE_EDITOR_CONNECTION 1
+
389 
+
390 // Compression Test
+
391 //
+
392 // Run the built-in compression test that will find any faults
+
393 // in the compressor or decompressor. This is useful if you install
+
394 // a new compressor or want to test any changes to the compressor
+
395 #define COMPRESSION_TEST 0
+
396 
+
397 // Serialization Test
+
398 //
+
399 // Run the serializer/unserializer test which will find any objects
+
400 // which don't serialize and unserialize cleanly
+
401 #define SERIALIZATION_TEST 0
+
402 
+
403 // Modes Test
+
404 //
+
405 // Run unit tests on the Modes class which manages the list of Modes.
+
406 // If any patterns fail to instantiate or perform basic operations
+
407 // it should show up in the modes test. Also if the Modes api has been
+
408 // updated then this will test for any issues
+
409 #define MODES_TEST 0
+
410 
+
411 // Timer Test
+
412 //
+
413 // Tests the timers, time control, and timestep system to ensure they
+
414 // are all working as expected and behaving properly
+
415 #define TIMER_TEST 0
+
416 
417 
-
418 
-
419 // ===================================================================
-
420 // Menu Colors
-
421 //
-
422 // These are the colors for the respective menus, each color should
-
423 // be unique and distinct from the others. It should also be bright
-
424 // enough to be seen on the lowest brightness setting of the device
-
425 //
-
426 // See the below header for all of the available color constants
-
427 #include "Colors/ColorConstants.h"
-
428 
-
429 // Randomizer Menu Color
-
430 #define RGB_MENU_RANDOMIZER RGB_WHITE1
-
431 
-
432 // Mode Sharing Menu Color
-
433 #define RGB_MENU_MODE_SHARING RGB_CYAN1
-
434 
-
435 // Editor Connection Menu Color
-
436 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
-
437 
-
438 // Color Select Menu Color
-
439 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
-
440 
-
441 // Pattern Select Menu Color
-
442 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
-
443 
-
444 // Global Brightness Menu Color
-
445 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
-
446 
-
447 // Factory Reset Menu Color
-
448 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
418 // ===================================================================
+
419 // Menu Colors
+
420 //
+
421 // These are the colors for the respective menus, each color should
+
422 // be unique and distinct from the others. It should also be bright
+
423 // enough to be seen on the lowest brightness setting of the device
+
424 //
+
425 // See the below header for all of the available color constants
+
426 #include "Colors/ColorConstants.h"
+
427 
+
428 // Randomizer Menu Color
+
429 #define RGB_MENU_RANDOMIZER RGB_WHITE1
+
430 
+
431 // Mode Sharing Menu Color
+
432 #define RGB_MENU_MODE_SHARING RGB_CYAN1
+
433 
+
434 // Editor Connection Menu Color
+
435 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
+
436 
+
437 // Color Select Menu Color
+
438 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
+
439 
+
440 // Pattern Select Menu Color
+
441 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
+
442 
+
443 // Global Brightness Menu Color
+
444 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
+
445 
+
446 // Factory Reset Menu Color
+
447 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
448 
449 
-
450 
-
451 // ===================================================================
-
452 // Editor Verbs
-
453 //
-
454 // These are the commands used in the protocol with the editor.
-
455 // They are defined here so the editor can access them easily,
-
456 // also so you can configure them at your own free will.
-
457 
-
458 // the initial hello from the gloveset to the editor
-
459 // is the full name of this build of vortex
-
460 #define EDITOR_VERB_GREETING_PREFIX "== "
-
461 #define EDITOR_VERB_GREETING_POSTFIX " =="
-
462 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
-
463 
-
464 // the hello from the editor to the gloves
-
465 #define EDITOR_VERB_HELLO "a"
-
466 
-
467 // the response from the gloveset when it's ready to receive something
-
468 // after the editor has given it a command to do something the gloveset
-
469 // will respond with this then once it's done doing the action it will
-
470 // send a different finished response for each action
-
471 #define EDITOR_VERB_READY "b"
-
472 
-
473 // the command from the editor to send modes over
-
474 #define EDITOR_VERB_PULL_MODES "c"
-
475 // the response from the editor once modes are received
-
476 #define EDITOR_VERB_PULL_MODES_DONE "d"
-
477 // the response from the gloves once it acknowledges the editor got the modes
-
478 #define EDITOR_VERB_PULL_MODES_ACK "e"
-
479 
-
480 // the command from the editor to send modes over
-
481 #define EDITOR_VERB_PUSH_MODES "f"
-
482 // the response from the gloveset when it received the mode
-
483 #define EDITOR_VERB_PUSH_MODES_ACK "g"
-
484 
-
485 // the command from the editor to tell the gloveset to demo a mode
-
486 #define EDITOR_VERB_DEMO_MODE "h"
-
487 // the response from the gloveset when it's received the mode to demo
-
488 #define EDITOR_VERB_DEMO_MODE_ACK "i"
-
489 
-
490 // the command from the editor to tell the gloveset to clear the demo
-
491 #define EDITOR_VERB_CLEAR_DEMO "j"
-
492 // the response from the gloveset when it's received disabled the demo
-
493 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
-
494 
-
495 // when the gloveset is leaving the menu and needs to tell the editor
-
496 // that it's no longer listening
-
497 #define EDITOR_VERB_GOODBYE "l"
-
498 
-
499 // ===================================================================
-
500 // Manually Configured Sizes
-
501 //
-
502 // These are the various storage space constants of the vortex device
-
503 
-
504 // the space available for storing modes, we can't make this too big
-
505 // otherwise we will have trouble loading it into memory
-
506 #define STORAGE_SIZE 4096
-
507 
-
508 // ===================================================================
-
509 // Test Framework configurations
-
510 //
-
511 // * Unless you are using the test framework, don't touch these! *
+
450 // ===================================================================
+
451 // Editor Verbs
+
452 //
+
453 // These are the commands used in the protocol with the editor.
+
454 // They are defined here so the editor can access them easily,
+
455 // also so you can configure them at your own free will.
+
456 
+
457 // the initial hello from the gloveset to the editor
+
458 // is the full name of this build of vortex
+
459 #define EDITOR_VERB_GREETING_PREFIX "== "
+
460 #define EDITOR_VERB_GREETING_POSTFIX " =="
+
461 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
+
462 
+
463 // the hello from the editor to the gloves
+
464 #define EDITOR_VERB_HELLO "a"
+
465 
+
466 // the response from the gloveset when it's ready to receive something
+
467 // after the editor has given it a command to do something the gloveset
+
468 // will respond with this then once it's done doing the action it will
+
469 // send a different finished response for each action
+
470 #define EDITOR_VERB_READY "b"
+
471 
+
472 // the command from the editor to send modes over
+
473 #define EDITOR_VERB_PULL_MODES "c"
+
474 // the response from the editor once modes are received
+
475 #define EDITOR_VERB_PULL_MODES_DONE "d"
+
476 // the response from the gloves once it acknowledges the editor got the modes
+
477 #define EDITOR_VERB_PULL_MODES_ACK "e"
+
478 
+
479 // the command from the editor to send modes over
+
480 #define EDITOR_VERB_PUSH_MODES "f"
+
481 // the response from the gloveset when it received the mode
+
482 #define EDITOR_VERB_PUSH_MODES_ACK "g"
+
483 
+
484 // the command from the editor to tell the gloveset to demo a mode
+
485 #define EDITOR_VERB_DEMO_MODE "h"
+
486 // the response from the gloveset when it's received the mode to demo
+
487 #define EDITOR_VERB_DEMO_MODE_ACK "i"
+
488 
+
489 // the command from the editor to tell the gloveset to clear the demo
+
490 #define EDITOR_VERB_CLEAR_DEMO "j"
+
491 // the response from the gloveset when it's received disabled the demo
+
492 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
+
493 
+
494 // when the gloveset is leaving the menu and needs to tell the editor
+
495 // that it's no longer listening
+
496 #define EDITOR_VERB_GOODBYE "l"
+
497 
+
498 // ===================================================================
+
499 // Manually Configured Sizes
+
500 //
+
501 // These are the various storage space constants of the vortex device
+
502 
+
503 // maximum size of a mode here
+
504 #define MAX_MODE_SIZE 512
+
505 
+
506 // the number of storage slots for modes, add 1 for the header
+
507 #define NUM_MODE_SLOTS (MAX_MODES + 1)
+
508 
+
509 // the space available for storing modes, we can't make this too big
+
510 // otherwise we will have trouble loading it into memory
+
511 #define STORAGE_SIZE (MAX_MODE_SIZE * NUM_MODE_SLOTS)
512 
-
513 // These defines come from the project settings for preprocessor, an
-
514 // entry for $(SolutionName) produces preprocessor definitions that
-
515 // match the solution that is compiling the engine
-
516 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
-
517 #define VORTEX_EMBEDDED 1
-
518 #endif
-
519 
-
520 // if building for editor or test framework then we're building vortex lib, it should
-
521 // be defined in the project settings but sometimes it's not for example if a cpp file
-
522 // from the test framework includes a header from the engine it might not have VORTEX_LIB
-
523 // this will ensure that anything which includes this config file will have VORTEX_LIB
-
524 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
-
525 #undef VORTEX_LIB
-
526 #define VORTEX_LIB
-
527 #endif
-
528 
-
529 #ifdef VORTEX_LIB
-
530 #undef VORTEX_SLIM
-
531 #define VORTEX_SLIM 0
-
532 
-
533 // The test framework needs brighter menu colors can't really see them on the screen
-
534 #undef RGB_MENU_RANDOMIZER
-
535 #undef RGB_MENU_MODE_SHARING
-
536 #undef RGB_MENU_EDITOR_CONNECTION
-
537 #undef RGB_MENU_COLOR_SELECT
-
538 #undef RGB_MENU_PATTERN_SELECT
-
539 #undef RGB_MENU_BRIGHTNESS_SELECT
-
540 #undef RGB_MENU_FACTORY_RESET
-
541 #define RGB_MENU_RANDOMIZER RGB_WHITE4
-
542 #define RGB_MENU_MODE_SHARING RGB_CYAN4
-
543 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
-
544 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
-
545 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
-
546 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
-
547 #define RGB_MENU_FACTORY_RESET RGB_RED4
-
548 
-
549 #endif // ifdef VORTEX_LIB
-
550 
-
551 // This will be defined if the project is being built inside the test framework
-
552 #ifdef PROJECT_NAME_VortexTestingFramework
+
513 // ===================================================================
+
514 // Test Framework configurations
+
515 //
+
516 // * Unless you are using the test framework, don't touch these! *
+
517 
+
518 // These defines come from the project settings for preprocessor, an
+
519 // entry for $(SolutionName) produces preprocessor definitions that
+
520 // match the solution that is compiling the engine
+
521 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
+
522 #define VORTEX_EMBEDDED 1
+
523 #endif
+
524 
+
525 // if building for editor or test framework then we're building vortex lib, it should
+
526 // be defined in the project settings but sometimes it's not for example if a cpp file
+
527 // from the test framework includes a header from the engine it might not have VORTEX_LIB
+
528 // this will ensure that anything which includes this config file will have VORTEX_LIB
+
529 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
+
530 #undef VORTEX_LIB
+
531 #define VORTEX_LIB
+
532 #endif
+
533 
+
534 #ifdef VORTEX_LIB
+
535 #undef VORTEX_SLIM
+
536 #define VORTEX_SLIM 0
+
537 
+
538 // The test framework needs brighter menu colors can't really see them on the screen
+
539 #undef RGB_MENU_RANDOMIZER
+
540 #undef RGB_MENU_MODE_SHARING
+
541 #undef RGB_MENU_EDITOR_CONNECTION
+
542 #undef RGB_MENU_COLOR_SELECT
+
543 #undef RGB_MENU_PATTERN_SELECT
+
544 #undef RGB_MENU_BRIGHTNESS_SELECT
+
545 #undef RGB_MENU_FACTORY_RESET
+
546 #define RGB_MENU_RANDOMIZER RGB_WHITE4
+
547 #define RGB_MENU_MODE_SHARING RGB_CYAN4
+
548 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
+
549 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
+
550 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
+
551 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
+
552 #define RGB_MENU_FACTORY_RESET RGB_RED4
553 
-
554 // In the test framework variable tickrate must be enabled to allow
-
555 // the tickrate slider to function, also the test framework never runs
-
556 // at full tickrate, maximum is 500 tps
-
557 #undef VARIABLE_TICKRATE
-
558 #define VARIABLE_TICKRATE 1
-
559 
-
560 #undef DEFAULT_BRIGHTNESS
-
561 #define DEFAULT_BRIGHTNESS 255
-
562 
-
563 // test framework needs more time to click idk
-
564 #undef CONSECUTIVE_WINDOW
-
565 #define CONSECUTIVE_WINDOW 300
-
566 
-
567 // force logging to 3 on linux build
-
568 #ifndef _WIN32
-
569 #undef LOGGING_LEVEL
-
570 #define LOGGING_LEVEL 3
-
571 #endif
-
572 
-
573 #endif // VortexTestingFramework
-
574 
-
575 // This will be defined if the project is being built inside the editor
-
576 #ifdef PROJECT_NAME_VortexEditor
+
554 #endif // ifdef VORTEX_LIB
+
555 
+
556 // This will be defined if the project is being built inside the test framework
+
557 #ifdef PROJECT_NAME_VortexTestingFramework
+
558 
+
559 // In the test framework variable tickrate must be enabled to allow
+
560 // the tickrate slider to function, also the test framework never runs
+
561 // at full tickrate, maximum is 500 tps
+
562 #undef VARIABLE_TICKRATE
+
563 #define VARIABLE_TICKRATE 1
+
564 
+
565 #undef DEFAULT_BRIGHTNESS
+
566 #define DEFAULT_BRIGHTNESS 255
+
567 
+
568 // test framework needs more time to click idk
+
569 #undef CONSECUTIVE_WINDOW
+
570 #define CONSECUTIVE_WINDOW 300
+
571 
+
572 // force logging to 3 on linux build
+
573 #ifndef _WIN32
+
574 #undef LOGGING_LEVEL
+
575 #define LOGGING_LEVEL 3
+
576 #endif
577 
-
578 // The editor needs an unfixed led count in order to load any mode
-
579 #undef FIXED_LED_COUNT
-
580 #define FIXED_LED_COUNT 0
-
581 
-
582 #endif // VortexEditor
-
583 
-
584 // When running in the test framework with demo all patterns enabled
-
585 // we should change the max patterns to the total pattern count because
-
586 // the test framework can handle the memory usage and we can't demo
-
587 // all the patterns without the increased limit
-
588 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
-
589  #undef MAX_MODES
-
590  #include "Patterns/Patterns.h"
-
591  #define MAX_MODES 0
-
592  #undef LOGGING_LEVEL
-
593  #define LOGGING_LEVEL 3
-
594 #endif
-
595 
-
596 #endif // VORTEX_CONFIG_H
+
578 #endif // VortexTestingFramework
+
579 
+
580 // This will be defined if the project is being built inside the editor
+
581 #ifdef PROJECT_NAME_VortexEditor
+
582 
+
583 // The editor needs an unfixed led count in order to load any mode
+
584 #undef FIXED_LED_COUNT
+
585 #define FIXED_LED_COUNT 0
+
586 
+
587 #endif // VortexEditor
+
588 
+
589 // When running in the test framework with demo all patterns enabled
+
590 // we should change the max patterns to the total pattern count because
+
591 // the test framework can handle the memory usage and we can't demo
+
592 // all the patterns without the increased limit
+
593 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
+
594  #undef MAX_MODES
+
595  #include "Patterns/Patterns.h"
+
596  #define MAX_MODES 0
+
597  #undef LOGGING_LEVEL
+
598  #define LOGGING_LEVEL 3
+
599 #endif
+
600 
+
601 #endif // VORTEX_CONFIG_H
diff --git a/docs/gloves/VortexEngine_8cpp_source.html b/docs/gloves/VortexEngine_8cpp_source.html index 6d89c9382e..767b6219bc 100644 --- a/docs/gloves/VortexEngine_8cpp_source.html +++ b/docs/gloves/VortexEngine_8cpp_source.html @@ -176,7 +176,7 @@
88 {
89  // cleanup in reverse order
-
90  // NOTE: the arduino doesn't actually cleanup,
+
90  // NOTE: the embedded doesn't actually cleanup,
91  // but the test frameworks do
92 #ifdef VORTEX_LIB
@@ -531,7 +531,7 @@
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
#define DEVICE_LOCK_CLICKS
Definition: VortexConfig.h:65
#define VORTEX_VERSION_MINOR
Definition: VortexConfig.h:17
-
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define STORAGE_SIZE
Definition: VortexConfig.h:511
#define AUTO_CYCLE_MODES_CLICKS
Definition: VortexConfig.h:99
#define VORTEX_VERSION_MAJOR
Definition: VortexConfig.h:10
#define AUTO_RANDOM_DELAY
Definition: VortexConfig.h:90
@@ -578,21 +578,21 @@
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
uint8_t numArgs
Definition: PatternArgs.h:121
static PatternArgs getDefaultArgs(PatternID id)
@@ -600,9 +600,9 @@
Definition: Random.h:6
static void cleanup()
Definition: Serial.cpp:30
static bool init()
Definition: Serial.cpp:23
-
static bool init()
Definition: Storage.cpp:43
-
static void cleanup()
Definition: Storage.cpp:53
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
static bool init()
Definition: TimeControl.cpp:50
static uint32_t getCurtime()
Definition: TimeControl.h:40
static void tickClock()
Definition: TimeControl.cpp:75
diff --git a/docs/gloves/classBlendPattern.html b/docs/gloves/classBlendPattern.html index fafa155bc8..82fc45eeb8 100644 --- a/docs/gloves/classBlendPattern.html +++ b/docs/gloves/classBlendPattern.html @@ -468,7 +468,7 @@

46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -478,7 +478,7 @@

56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/gloves/classByteStream.html b/docs/gloves/classByteStream.html index 8f6650d7ed..d7cb0f1f5f 100644 --- a/docs/gloves/classByteStream.html +++ b/docs/gloves/classByteStream.html @@ -440,7 +440,7 @@

References isCRCDirty(), m_pData, and ByteStream::RawBuffer::verify().

-

Referenced by Storage::read().

+

Referenced by Storage::read().

@@ -472,7 +472,7 @@

References m_capacity, m_pData, m_position, and vfree.

-

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

+

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

@@ -549,7 +549,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, compress_buffer, compress_size, DEBUG_LOG, DEBUG_LOGF, ByteStream::RawBuffer::flags, is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), recalcCRC(), shrink(), and ByteStream::RawBuffer::size.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

@@ -687,7 +687,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, DEBUG_LOG, DEBUG_LOGF, decompress_buffer, ERROR_LOGF, ByteStream::RawBuffer::flags, init(), is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), sanity(), shrink(), ByteStream::RawBuffer::size, and ByteStream::RawBuffer::verify().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

+

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

@@ -904,7 +904,7 @@

References ByteStream::RawBuffer::buf, clear(), ByteStream::RawBuffer::crc32, ERROR_OUT_OF_MEMORY, ByteStream::RawBuffer::flags, m_capacity, m_pData, ByteStream::RawBuffer::recalcCRC(), size(), ByteStream::RawBuffer::size, and vcalloc.

-

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

+

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

@@ -1406,7 +1406,7 @@

References m_pData.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1492,7 +1492,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1532,7 +1532,7 @@

References BUFFER_FLAG_DIRTY, ByteStream::RawBuffer::crc32, ByteStream::RawBuffer::flags, m_pData, ByteStream::RawBuffer::recalcCRC(), and ByteStream::RawBuffer::size.

-

Referenced by compress(), Randomizer::init(), and SerialComs::write().

+

Referenced by compress(), Randomizer::init(), SerialComs::write(), and Storage::write().

@@ -1559,7 +1559,7 @@

References moveUnserializer().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), and EditorConnection::receiveModes().

+

Referenced by Mode::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), and Modes::unserializeSaveHeader().

@@ -1588,7 +1588,7 @@

References m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by decompress(), rawInit(), and Storage::read().

+

Referenced by decompress(), rawInit(), and Storage::read().

@@ -1698,7 +1698,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_DIRTY, extend(), ByteStream::RawBuffer::flags, m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by operator+=(), SerialComs::read(), Modes::saveToBuffer(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), and VortexEngine::serializeVersion().

+

Referenced by operator+=(), SerialComs::read(), Modes::saveStorage(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), Modes::serializeSaveHeader(), and VortexEngine::serializeVersion().

@@ -1769,7 +1769,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), Modes::unserialize(), and Storage::write().

+

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), Modes::unserialize(), and Storage::write().

@@ -1903,7 +1903,7 @@

References ByteStream::RawBuffer::buf, m_pData, m_position, and ByteStream::RawBuffer::size.

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), and unserialize8().

+

Referenced by Mode::loadFromBuffer(), Modes::loadStorage(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), unserialize8(), and Modes::unserializeSaveHeader().

diff --git a/docs/gloves/classColorSelect.html b/docs/gloves/classColorSelect.html index 64c33be56c..cae5426804 100644 --- a/docs/gloves/classColorSelect.html +++ b/docs/gloves/classColorSelect.html @@ -482,9 +482,9 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
bool isEmpty() const
Definition: Mode.cpp:735
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

@@ -528,7 +528,7 @@

LedMap m_targetLeds
Definition: Menu.h:57
const Colorset getColorset(LedPos pos=LED_ANY) const
Definition: Mode.cpp:467
-

References Modes::curMode(), Mode::getColorset(), m_colorset, Menu::m_targetLeds, MAP_LED_ALL, and mapGetFirstLed().

+

References Modes::curMode(), Mode::getColorset(), m_colorset, Menu::m_targetLeds, MAP_LED_ALL, and mapGetFirstLed().

@@ -665,7 +665,7 @@

virtual void init()
Definition: Mode.cpp:120
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
-

References HSVColor::clear(), Leds::clearAll(), Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, Colorset::equals(), FINGER_FIRST, FINGER_THUMB, g_pButton, Mode::getColorset(), Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, m_curPage, Menu::m_curSelection, m_newColor, m_slot, m_state, Colorset::numColors(), PAGE_SIZE, Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorset(), STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

+

References HSVColor::clear(), Leds::clearAll(), Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, Colorset::equals(), FINGER_FIRST, FINGER_THUMB, g_pButton, Mode::getColorset(), Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, m_curPage, Menu::m_curSelection, m_newColor, m_slot, m_state, Colorset::numColors(), PAGE_SIZE, Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorset(), STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

@@ -815,7 +815,7 @@

MenuAction
Definition: Menu.h:19
@ MENU_CONTINUE
Definition: Menu.h:23
-

References blinkSelection(), Leds::clearAll(), Modes::curMode(), FINGER_FIRST, Mode::getColorset(), m_colorset, m_curPage, Menu::m_curSelection, m_newColor, m_slot, m_state, Menu::m_targetLeds, MAP_LED_ALL, mapGetFirstLed(), Menu::MENU_CONTINUE, Menu::run(), showSelection(), showSlotSelection(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, and STATE_PICK_VAL.

+

References blinkSelection(), Leds::clearAll(), Modes::curMode(), FINGER_FIRST, Mode::getColorset(), m_colorset, m_curPage, Menu::m_curSelection, m_newColor, m_slot, m_state, Menu::m_targetLeds, MAP_LED_ALL, mapGetFirstLed(), Menu::MENU_CONTINUE, Menu::run(), showSelection(), showSlotSelection(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, and STATE_PICK_VAL.

@@ -1107,10 +1107,10 @@

SAT_OPTION_2,
}
-
#define SAT_OPTION_3
Definition: VortexConfig.h:291
-
#define SAT_OPTION_2
Definition: VortexConfig.h:290
-
#define SAT_OPTION_4
Definition: VortexConfig.h:292
-
#define SAT_OPTION_1
Definition: VortexConfig.h:289
+
#define SAT_OPTION_3
Definition: VortexConfig.h:290
+
#define SAT_OPTION_2
Definition: VortexConfig.h:289
+
#define SAT_OPTION_4
Definition: VortexConfig.h:291
+
#define SAT_OPTION_1
Definition: VortexConfig.h:288

Definition at line 54 of file ColorSelect.h.

@@ -1143,10 +1143,10 @@

VAL_OPTION_2,
}
-
#define VAL_OPTION_1
Definition: VortexConfig.h:298
-
#define VAL_OPTION_2
Definition: VortexConfig.h:299
-
#define VAL_OPTION_4
Definition: VortexConfig.h:301
-
#define VAL_OPTION_3
Definition: VortexConfig.h:300
+
#define VAL_OPTION_1
Definition: VortexConfig.h:297
+
#define VAL_OPTION_2
Definition: VortexConfig.h:298
+
#define VAL_OPTION_4
Definition: VortexConfig.h:300
+
#define VAL_OPTION_3
Definition: VortexConfig.h:299

Definition at line 62 of file ColorSelect.h.

diff --git a/docs/gloves/classColorset.html b/docs/gloves/classColorset.html index 84687214af..f732b8905a 100644 --- a/docs/gloves/classColorset.html +++ b/docs/gloves/classColorset.html @@ -1506,7 +1506,7 @@

References addColorWithValueStyle(), clear(), Random::next8(), numColors(), and VAL_STYLE_COUNT.

-

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

+

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

diff --git a/docs/gloves/classEditorConnection.html b/docs/gloves/classEditorConnection.html index 07a118b83a..8238d70a48 100644 --- a/docs/gloves/classEditorConnection.html +++ b/docs/gloves/classEditorConnection.html @@ -442,13 +442,13 @@

298  m_state = STATE_CLEAR_DEMO;
299  }
300 }
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:474
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:491
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:481
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:486
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:490
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:480
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:485
bool receiveMessage(const char *message)
-

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

+

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

Referenced by run().

@@ -529,11 +529,11 @@

187  SerialComs::write(EDITOR_VERB_GOODBYE);
188  Menu::leaveMenu(true);
189 }
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:497
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:496
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:164
static void write(const char *msg,...)
Definition: Serial.cpp:74
-

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

+

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

Referenced by onLongClick().

@@ -823,10 +823,10 @@

253  Modes::saveStorage();
254  return true;
255 }
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
-

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

+

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

Referenced by run().

@@ -959,13 +959,13 @@

167  }
168  return MENU_CONTINUE;
169 }
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:462
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:493
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:478
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:461
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:492
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:477
@@ -978,7 +978,7 @@

static bool checkSerial()
Definition: Serial.cpp:40
static bool isConnected()
Definition: Serial.cpp:34
-

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

+

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

@@ -1011,9 +1011,9 @@

223  Modes::saveToBuffer(modesBuffer);
224  SerialComs::write(modesBuffer);
225 }
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
-

References Modes::saveToBuffer(), and SerialComs::write().

+

References Modes::saveToBuffer(), and SerialComs::write().

Referenced by run().

diff --git a/docs/gloves/classFactoryReset.html b/docs/gloves/classFactoryReset.html index b69878519a..d5704cda43 100644 --- a/docs/gloves/classFactoryReset.html +++ b/docs/gloves/classFactoryReset.html @@ -289,9 +289,9 @@

virtual bool init()
Definition: Menu.cpp:26
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOG, FINGER_THUMB, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, and MAP_LED.

+

References Modes::curMode(), DEBUG_LOG, FINGER_THUMB, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, and MAP_LED.

@@ -344,7 +344,7 @@

97  if (m_advanced) {
98  uint8_t curModeIndex = Modes::curModeIndex();
99  // reset the target mode slot on the target led
-
100  const default_mode_entry &def = default_modes[curModeIndex];
+
100  const default_mode_entry &def = default_modes[curModeIndex];
101  Colorset set(def.numColors, def.cols);
102  Mode *cur = Modes::curMode();
103  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -360,7 +360,7 @@

113  leaveMenu(true);
114 }
Button * g_pButton
Definition: Buttons.cpp:16
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
#define FINGER_COUNT
Definition: LedTypes.h:119
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
#define FACTORY_RESET_THRESHOLD_TICKS
Definition: Timings.h:18
@@ -371,9 +371,9 @@

virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:164
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
virtual void init()
Definition: Mode.cpp:120
-
static void resetFlags()
Definition: Modes.cpp:590
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static void resetFlags()
Definition: Modes.cpp:659
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
Definition: DefaultModes.h:9
@@ -381,7 +381,7 @@

PatternID patternID
Definition: DefaultModes.h:10
uint8_t numColors
Definition: DefaultModes.h:11
-

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, FINGER_COUNT, FINGER_THUMB, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

+

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, FINGER_COUNT, FINGER_THUMB, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

diff --git a/docs/gloves/classGlobalBrightness.html b/docs/gloves/classGlobalBrightness.html index 51601c770b..5a9cd103e1 100644 --- a/docs/gloves/classGlobalBrightness.html +++ b/docs/gloves/classGlobalBrightness.html @@ -488,10 +488,10 @@

BRIGHTNESS_OPTION_3,
}
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279

Definition at line 23 of file GlobalBrightness.h.

diff --git a/docs/gloves/classLeds.html b/docs/gloves/classLeds.html index 23c4010134..e5f45f62ae 100644 --- a/docs/gloves/classLeds.html +++ b/docs/gloves/classLeds.html @@ -1081,7 +1081,7 @@

References HSV_OFF, and setAll().

-

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ColorSelect::onLongClick(), ColorSelect::onShortClick(), ModeSharing::onShortClick(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), ModeSharing::showReceiveMode(), VLSender::startPWM(), and VLSender::stopPWM().

+

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ColorSelect::onLongClick(), ColorSelect::onShortClick(), ModeSharing::onShortClick(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), ModeSharing::showReceiveMode(), VLSender::startPWM(), and VLSender::stopPWM().

@@ -1469,7 +1469,7 @@

References m_brightness.

-

Referenced by GlobalBrightness::init(), Modes::saveToBuffer(), and VLSender::startPWM().

+

Referenced by GlobalBrightness::init(), Modes::serializeSaveHeader(), and VLSender::startPWM().

@@ -1805,7 +1805,7 @@

References m_brightness.

-

Referenced by Modes::loadFromBuffer(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), and VLSender::startPWM().

+

Referenced by FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), VLSender::startPWM(), and Modes::unserializeSaveHeader().

diff --git a/docs/gloves/classMenu.html b/docs/gloves/classMenu.html index f7a999412c..346d20c07d 100644 --- a/docs/gloves/classMenu.html +++ b/docs/gloves/classMenu.html @@ -439,12 +439,12 @@

@ PATTERN_STROBE
Definition: Patterns.h:25
Mode m_previewMode
Definition: Menu.h:52
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static uint8_t numModes()
Definition: Modes.h:92
-

References Modes::addMode(), Modes::curMode(), FINGER_FIRST, Mode::init(), m_curSelection, m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, and RGB_OFF.

+

References Modes::addMode(), Modes::curMode(), FINGER_FIRST, Mode::init(), m_curSelection, m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, and RGB_OFF.

Referenced by ColorSelect::init(), EditorConnection::init(), FactoryReset::init(), GlobalBrightness::init(), ModeSharing::init(), PatternSelect::init(), Randomizer::init(), and Menus::openMenu().

@@ -483,9 +483,9 @@

168  Modes::saveStorage();
169  }
170 }
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
-

References m_shouldClose, and Modes::saveStorage().

+

References m_shouldClose, and Modes::saveStorage().

Referenced by EditorConnection::leaveMenu(), onLongClick(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveMode().

@@ -561,7 +561,7 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-

References Modes::curMode(), Mode::isMultiLed(), LED_COUNT, LED_FIRST, LED_LAST, LED_MULTI, m_targetLeds, MAP_LED, MAP_LED_ALL, MAP_PAIR_EVENS, MAP_PAIR_ODDS, and mapGetFirstLed().

+

References Modes::curMode(), Mode::isMultiLed(), LED_COUNT, LED_FIRST, LED_LAST, LED_MULTI, m_targetLeds, MAP_LED, MAP_LED_ALL, MAP_PAIR_EVENS, MAP_PAIR_ODDS, and mapGetFirstLed().

Referenced by run().

diff --git a/docs/gloves/classMode.html b/docs/gloves/classMode.html index 0d7b18301a..9223f9eebc 100644 --- a/docs/gloves/classMode.html +++ b/docs/gloves/classMode.html @@ -917,7 +917,7 @@

References getPattern(), Pattern::getPatternID(), and PATTERN_NONE.

-

Referenced by isEmpty(), PatternSelect::onLongClick(), Randomizer::run(), and Modes::setCurMode().

+

Referenced by isEmpty(), PatternSelect::onLongClick(), Randomizer::run(), and Modes::setCurMode().

@@ -1137,7 +1137,7 @@

References Pattern::init(), LED_FIRST, m_multiPat, m_singlePats, and MODE_LEDCOUNT.

-

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), PatternSelect::nextPattern(), PatternSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), Randomizer::reRoll(), and Randomizer::run().

+

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), PatternSelect::nextPattern(), PatternSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), Randomizer::reRoll(), and Randomizer::run().

@@ -1268,7 +1268,7 @@

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, init(), ByteStream::resetUnserializer(), unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), and IRReceiver::receiveMode().

+

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), and IRReceiver::receiveMode().

@@ -1473,7 +1473,7 @@

References ByteStream::compress(), DEBUG_LOGF, serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

-

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

+

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

@@ -1561,7 +1561,7 @@

References getFlags(), getSingleLedMap(), LED_FIRST, m_multiPat, m_singlePats, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, MODE_LEDCOUNT, Pattern::serialize(), and ByteStream::serialize().

-

Referenced by saveToBuffer(), and Modes::serialize().

+

Referenced by Modes::saveStorage(), saveToBuffer(), and Modes::serialize().

@@ -2028,7 +2028,7 @@

References Pattern::bind(), clearPattern(), PatternBuilder::dupe(), Pattern::init(), LED_ALL, LED_COUNT, LED_FIRST, m_multiPat, m_singlePats, MAP_FOREACH_LED, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, PatternBuilder::unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

+

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

diff --git a/docs/gloves/classModeSharing.html b/docs/gloves/classModeSharing.html index e0118cbabb..3b9c3093a3 100644 --- a/docs/gloves/classModeSharing.html +++ b/docs/gloves/classModeSharing.html @@ -337,10 +337,10 @@

static bool isSending()
Definition: IRSender.h:25
static bool loadMode(const Mode *targetMode)
Definition: IRSender.cpp:54
static bool send()
Definition: IRSender.cpp:83
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References Modes::curMode(), ERROR_LOG, Time::getCurtime(), IRSender::isSending(), IRSender::loadMode(), m_lastActionTime, and IRSender::send().

+

References Modes::curMode(), ERROR_LOG, Time::getCurtime(), IRSender::isSending(), IRSender::loadMode(), m_lastActionTime, and IRSender::send().

Referenced by run().

@@ -465,9 +465,9 @@

97 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:164
Mode m_previewMode
Definition: Menu.h:52
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
-

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

@@ -584,7 +584,7 @@

static void resetIRState()
Definition: IRReceiver.cpp:199
bool m_advanced
Definition: Menu.h:63
-

References Modes::curMode(), IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

+

References Modes::curMode(), IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

Referenced by run().

diff --git a/docs/gloves/classModes-members.html b/docs/gloves/classModes-members.html index 6aa7a36663..edb0cd5b8e 100644 --- a/docs/gloves/classModes-members.html +++ b/docs/gloves/classModes-members.html @@ -128,17 +128,19 @@ saveStorage()Modesstatic saveToBuffer(ByteStream &saveBuffer)Modesstatic serialize(ByteStream &buffer)Modesstatic - setAdvancedMenus(bool active, bool save=true)Modesinlinestatic - setCurMode(uint8_t index)Modesstatic - setDefaults()Modesstatic - setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic - setKeychainMode(bool active, bool save=true)Modesinlinestatic - setLocked(bool locked, bool save=true)Modesinlinestatic - setOneClickMode(bool enable, bool save=true)Modesinlinestatic - setStartupMode(uint8_t index)Modesstatic - shiftCurMode(int32_t offset=1)Modesstatic - startupMode()Modesstatic - unserialize(ByteStream &buffer)Modesstatic + serializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic + setAdvancedMenus(bool active, bool save=true)Modesinlinestatic + setCurMode(uint8_t index)Modesstatic + setDefaults()Modesstatic + setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic + setKeychainMode(bool active, bool save=true)Modesinlinestatic + setLocked(bool locked, bool save=true)Modesinlinestatic + setOneClickMode(bool enable, bool save=true)Modesinlinestatic + setStartupMode(uint8_t index)Modesstatic + shiftCurMode(int32_t offset=1)Modesstatic + startupMode()Modesstatic + unserialize(ByteStream &buffer)Modesstatic + unserializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic updateCurMode(const Mode *mode)Modesstatic diff --git a/docs/gloves/classModes.html b/docs/gloves/classModes.html index 7d8c1662fa..f9e294e93f 100644 --- a/docs/gloves/classModes.html +++ b/docs/gloves/classModes.html @@ -198,6 +198,10 @@ + + + + @@ -274,36 +278,36 @@

-

Definition at line 390 of file Modes.cpp.

-
391 {
-
392 #if MAX_MODES != 0
-
393  // max modes
-
394  if (m_numModes >= MAX_MODES) {
-
395  return false;
-
396  }
-
397 #endif
-
398  if (!m_storedModes) {
-
399  m_storedModes = new ModeLink(mode);
-
400  if (!m_storedModes) {
- -
402  return false;
-
403  }
-
404  } else {
-
405  if (!m_storedModes->append(mode)) {
- -
407  return false;
-
408  }
-
409  }
-
410  m_numModes++;
-
411  return true;
-
412 }
+

Definition at line 459 of file Modes.cpp.

+
460 {
+
461 #if MAX_MODES != 0
+
462  // max modes
+
463  if (m_numModes >= MAX_MODES) {
+
464  return false;
+
465  }
+
466 #endif
+
467  if (!m_storedModes) {
+
468  m_storedModes = new ModeLink(mode);
+
469  if (!m_storedModes) {
+ +
471  return false;
+
472  }
+
473  } else {
+
474  if (!m_storedModes->append(mode)) {
+ +
476  return false;
+
477  }
+
478  }
+
479  m_numModes++;
+
480  return true;
+
481 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
-
#define MAX_MODES
Definition: VortexConfig.h:168
- -
static ModeLink * m_storedModes
Definition: Modes.h:220
-
static uint8_t m_numModes
Definition: Modes.h:214
+
#define MAX_MODES
Definition: VortexConfig.h:167
+ +
static ModeLink * m_storedModes
Definition: Modes.h:223
+
static uint8_t m_numModes
Definition: Modes.h:217
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -347,29 +351,29 @@

-

Definition at line 371 of file Modes.cpp.

-
372 {
-
373  // max modes
-
374 #if MAX_MODES != 0
-
375  if (m_numModes >= MAX_MODES) {
-
376  return false;
-
377  }
-
378 #endif
-
379  if (id >= PATTERN_COUNT) {
-
380  return false;
-
381  }
-
382  Mode tmpMode(id, args, set);
-
383  // must init the mode so that it can be serialized
-
384  tmpMode.init();
-
385  // not a very good way to do this but it ensures the mode is
-
386  // added in the same way
-
387  return addMode(&tmpMode);
-
388 }
+

Definition at line 440 of file Modes.cpp.

+
441 {
+
442  // max modes
+
443 #if MAX_MODES != 0
+
444  if (m_numModes >= MAX_MODES) {
+
445  return false;
+
446  }
+
447 #endif
+
448  if (id >= PATTERN_COUNT) {
+
449  return false;
+
450  }
+
451  Mode tmpMode(id, args, set);
+
452  // must init the mode so that it can be serialized
+
453  tmpMode.init();
+
454  // not a very good way to do this but it ensures the mode is
+
455  // added in the same way
+
456  return addMode(&tmpMode);
+
457 }
@ PATTERN_COUNT
Definition: Patterns.h:101
Definition: Mode.h:38
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

@@ -449,14 +453,14 @@

-

Definition at line 364 of file Modes.cpp.

-
366 {
-
367  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
368  return addMode(id, nullptr, &set);
-
369 }
+

Definition at line 433 of file Modes.cpp.

+
435 {
+
436  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
437  return addMode(id, nullptr, &set);
+
438 }
-

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

+

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

@@ -484,23 +488,23 @@

-

Definition at line 307 of file Modes.cpp.

-
308 {
-
309 #if MAX_MODES != 0
-
310  if (m_numModes >= MAX_MODES) {
-
311  return false;
-
312  }
-
313 #endif
-
314  if (!m_storedModes->append(serializedMode)) {
- -
316  return false;
-
317  }
-
318  // increment mode counter
-
319  m_numModes++;
-
320  return true;
-
321 }
+

Definition at line 376 of file Modes.cpp.

+
377 {
+
378 #if MAX_MODES != 0
+
379  if (m_numModes >= MAX_MODES) {
+
380  return false;
+
381  }
+
382 #endif
+
383  if (!m_storedModes->append(serializedMode)) {
+ +
385  return false;
+
386  }
+
387  // increment mode counter
+
388  m_numModes++;
+
389  return true;
+
390 }
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -528,31 +532,31 @@

-

Definition at line 287 of file Modes.cpp.

-
288 {
-
289 #if MAX_MODES != 0
-
290  if (m_numModes >= MAX_MODES) {
-
291  return false;
-
292  }
-
293 #endif
-
294  // we must unserialize then re-serialize here because the
-
295  // input argument may contain other patterns in the buffer
-
296  // so we cannot just append the input arg to m_storedModes
-
297  Mode tmpMode;
-
298  if (!tmpMode.unserialize(serializedMode)) {
-
299  return false;
-
300  }
-
301  // initialize the mode because a pattern could theoretically serialize
-
302  // differently after it has initialized
-
303  tmpMode.init();
-
304  return addMode(&tmpMode);
-
305 }
+

Definition at line 356 of file Modes.cpp.

+
357 {
+
358 #if MAX_MODES != 0
+
359  if (m_numModes >= MAX_MODES) {
+
360  return false;
+
361  }
+
362 #endif
+
363  // we must unserialize then re-serialize here because the
+
364  // input argument may contain other patterns in the buffer
+
365  // so we cannot just append the input arg to m_storedModes
+
366  Mode tmpMode;
+
367  if (!tmpMode.unserialize(serializedMode)) {
+
368  return false;
+
369  }
+
370  // initialize the mode because a pattern could theoretically serialize
+
371  // differently after it has initialized
+
372  tmpMode.init();
+
373  return addMode(&tmpMode);
+
374 }
virtual void init()
Definition: Mode.cpp:120
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

-

Referenced by unserialize().

+

Referenced by loadStorage(), and unserialize().

@@ -584,9 +588,9 @@

133  return getFlag(MODES_FLAG_ADV_MENUS);
134  }
#define MODES_FLAG_ADV_MENUS
Definition: Modes.h:22
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
-

References getFlag(), and MODES_FLAG_ADV_MENUS.

+

References getFlag(), and MODES_FLAG_ADV_MENUS.

Referenced by Menus::runMenuSelection().

@@ -619,9 +623,9 @@

54 {
55  clearModes();
56 }
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
-

References clearModes().

+

References clearModes().

Referenced by VortexEngine::cleanup().

@@ -650,25 +654,25 @@

-

Definition at line 544 of file Modes.cpp.

-
545 {
-
546  if (!m_numModes || !m_storedModes) {
-
547  return;
-
548  }
-
549  // delete the first node and it will delete the entire chain
-
550  delete m_storedModes;
-
551  m_pCurModeLink = nullptr;
-
552  m_storedModes = nullptr;
-
553  m_numModes = 0;
-
554  // might as well clear the leds
-
555  Leds::clearAll();
-
556 }
+

Definition at line 613 of file Modes.cpp.

+
614 {
+
615  if (!m_numModes || !m_storedModes) {
+
616  return;
+
617  }
+
618  // delete the first node and it will delete the entire chain
+
619  delete m_storedModes;
+
620  m_pCurModeLink = nullptr;
+
621  m_storedModes = nullptr;
+
622  m_numModes = 0;
+
623  // might as well clear the leds
+
624  Leds::clearAll();
+
625 }
static void clearAll()
Definition: Leds.h:30
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
-

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

+

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

-

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

+

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

@@ -695,28 +699,28 @@

-

Definition at line 474 of file Modes.cpp.

-
475 {
-
476  // empty mode list
-
477  if (!m_numModes) {
-
478  return nullptr;
-
479  }
-
480  if (!m_pCurModeLink) {
-
481  if (!initCurMode()) {
-
482  ERROR_LOG("Failed to initialize current mode");
-
483  return nullptr;
-
484  }
-
485  }
-
486  // get current mode, instantiate it if necessary
-
487  return m_pCurModeLink->instantiate();
-
488 }
+

Definition at line 543 of file Modes.cpp.

+
544 {
+
545  // empty mode list
+
546  if (!m_numModes) {
+
547  return nullptr;
+
548  }
+
549  if (!m_pCurModeLink) {
+
550  if (!initCurMode()) {
+
551  ERROR_LOG("Failed to initialize current mode");
+
552  return nullptr;
+
553  }
+
554  }
+
555  // get current mode, instantiate it if necessary
+
556  return m_pCurModeLink->instantiate();
+
557 }
#define ERROR_LOG(msg)
Definition: Log.h:29
- -
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
+ +
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
-

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

+

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

-

Referenced by ModeSharing::beginSending(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), Menu::nextBulbSelection(), nextModeSkipEmpty(), ColorSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), ModeSharing::receiveMode(), ColorSelect::run(), and updateCurMode().

+

Referenced by ModeSharing::beginSending(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), Menu::nextBulbSelection(), nextModeSkipEmpty(), ColorSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), ModeSharing::receiveMode(), ColorSelect::run(), and updateCurMode().

@@ -745,9 +749,9 @@

Definition at line 93 of file Modes.h.

93 { return m_curMode; }
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static uint8_t m_curMode
Definition: Modes.h:214
-

References m_curMode.

+

References m_curMode.

Referenced by VortexEngine::enterSleep(), and FactoryReset::onLongClick().

@@ -776,29 +780,29 @@

-

Definition at line 523 of file Modes.cpp.

-
524 {
-
525  if (!m_numModes || !m_pCurModeLink) {
-
526  return;
-
527  }
-
528  // unlink the current mode so it can be deleted and
-
529  // update the current mode link accordingly
-
530  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
531  delete m_pCurModeLink;
-
532  m_pCurModeLink = newCur;
-
533  if (m_curMode) {
-
534  m_curMode--;
-
535  } else {
- -
537  }
-
538  m_numModes--;
-
539  if (!m_numModes) {
-
540  m_storedModes = nullptr;
-
541  }
-
542 }
- +

Definition at line 592 of file Modes.cpp.

+
593 {
+
594  if (!m_numModes || !m_pCurModeLink) {
+
595  return;
+
596  }
+
597  // unlink the current mode so it can be deleted and
+
598  // update the current mode link accordingly
+
599  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
600  delete m_pCurModeLink;
+
601  m_pCurModeLink = newCur;
+
602  if (m_curMode) {
+
603  m_curMode--;
+
604  } else {
+ +
606  }
+
607  m_numModes--;
+
608  if (!m_numModes) {
+
609  m_storedModes = nullptr;
+
610  }
+
611 }
+
-

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

+

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

@@ -826,13 +830,13 @@

-

Definition at line 585 of file Modes.cpp.

-
586 {
-
587  return ((m_globalFlags & flag) != 0);
-
588 }
-
static uint8_t m_globalFlags
Definition: Modes.h:223
+

Definition at line 654 of file Modes.cpp.

+
655 {
+
656  return ((m_globalFlags & flag) != 0);
+
657 }
+
static uint8_t m_globalFlags
Definition: Modes.h:226
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by advancedMenusEnabled(), keychainModeEnabled(), locked(), and oneClickModeEnabled().

@@ -862,23 +866,23 @@

-

Definition at line 659 of file Modes.cpp.

-
660 {
-
661  if (index >= m_numModes) {
-
662  return nullptr;
-
663  }
-
664  ModeLink *ptr = m_storedModes;
-
665  while (index > 0 && ptr) {
-
666  ptr = ptr->next();
-
667  index--;
-
668  }
-
669  return ptr;
-
670 }
- +

Definition at line 728 of file Modes.cpp.

+
729 {
+
730  if (index >= m_numModes) {
+
731  return nullptr;
+
732  }
+
733  ModeLink *ptr = m_storedModes;
+
734  while (index > 0 && ptr) {
+
735  ptr = ptr->next();
+
736  index--;
+
737  }
+
738  return ptr;
+
739 }
+
-

References m_numModes, m_storedModes, and Modes::ModeLink::next().

+

References m_numModes, m_storedModes, and Modes::ModeLink::next().

-

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

+

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

@@ -927,11 +931,11 @@

49 #endif
50  return true;
51 }
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool setDefaults()
Definition: Modes.cpp:252
-
static bool loadStorage()
Definition: Modes.cpp:149
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool setDefaults()
Definition: Modes.cpp:321
+
static bool loadStorage()
Definition: Modes.cpp:168
-

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

+

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

Referenced by VortexEngine::init().

@@ -961,31 +965,31 @@

-

Definition at line 672 of file Modes.cpp.

-
673 {
-
674  if (!m_numModes) {
-
675  return nullptr;
-
676  }
-
677  // cleanup the current mode link
-
678  if (m_pCurModeLink) {
- -
680  }
-
681  // update the current mode link based on the curmode index
- -
683  if (!m_pCurModeLink) {
-
684  return nullptr;
-
685  }
-
686  if (force) {
- -
688  }
-
689  return m_pCurModeLink->instantiate();
-
690 }
- -
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
+

Definition at line 741 of file Modes.cpp.

+
742 {
+
743  if (!m_numModes) {
+
744  return nullptr;
+
745  }
+
746  // cleanup the current mode link
+
747  if (m_pCurModeLink) {
+ +
749  }
+
750  // update the current mode link based on the curmode index
+ +
752  if (!m_pCurModeLink) {
+
753  return nullptr;
+
754  }
+
755  if (force) {
+ +
757  }
+
758  return m_pCurModeLink->instantiate();
+
759 }
+ +
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
-

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

+

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

-

Referenced by curMode(), play(), and updateCurMode().

+

Referenced by curMode(), play(), and updateCurMode().

@@ -1018,7 +1022,7 @@

141  }
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
-

References getFlag(), and MODES_FLAG_KEYCHAIN.

+

References getFlag(), and MODES_FLAG_KEYCHAIN.

@@ -1047,9 +1051,9 @@

Definition at line 96 of file Modes.h.

96 { return m_lastSwitchTime; }
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
-

References m_lastSwitchTime.

+

References m_lastSwitchTime.

Referenced by VortexEngine::runMainLogic().

@@ -1079,59 +1083,38 @@

-

Definition at line 106 of file Modes.cpp.

-
107 {
-
108  if (!modesBuffer.decompress()) {
-
109  // failed to decompress?
-
110  return false;
-
111  }
-
112  // reset the unserializer index before unserializing anything
-
113  modesBuffer.resetUnserializer();
-
114  uint8_t major = 0;
-
115  uint8_t minor = 0;
-
116  // unserialize the vortex version
-
117  modesBuffer.unserialize(&major);
-
118  modesBuffer.unserialize(&minor);
-
119  // check the version for incompatibility
-
120  if (!VortexEngine::checkVersion(major, minor)) {
-
121  // incompatible version
-
122  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
123  return false;
-
124  }
-
125  // NOTE: instead of global brightness the duo uses this to store the
-
126  // startup mode ID. The duo doesn't offer a global brightness option
-
127  // unserialize the global brightness
-
128  modesBuffer.unserialize(&m_globalFlags);
-
129  // unserialize the global brightness
-
130  uint8_t brightness = 0;
-
131  modesBuffer.unserialize(&brightness);
-
132  if (brightness) {
-
133  Leds::setBrightness(brightness);
-
134  }
-
135  // now just unserialize the list of modes
-
136  if (!unserialize(modesBuffer)) {
-
137  return false;
-
138  }
-
139  // startupMode is 1-based offset that encodes both the index to start at and
-
140  // whether the system is enabled, hence why 0 cannot be used as an offset
-
141  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
142  if (oneClickModeEnabled() && startupMode > 0) {
-
143  // set the current mode to the startup mode
- -
145  }
-
146  return true;
-
147 }
-
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
-
static void setBrightness(uint8_t brightness)
Definition: Leds.h:105
+

Definition at line 144 of file Modes.cpp.

+
145 {
+
146  if (!modesBuffer.decompress()) {
+
147  // failed to decompress?
+
148  return false;
+
149  }
+
150  // read out the header first
+
151  if (!unserializeSaveHeader(modesBuffer)) {
+
152  return false;
+
153  }
+
154  // now just unserialize the list of modes
+
155  if (!unserialize(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // startupMode is 1-based offset that encodes both the index to start at and
+
159  // whether the system is enabled, hence why 0 cannot be used as an offset
+
160  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
161  if (oneClickModeEnabled() && startupMode > 0) {
+
162  // set the current mode to the startup mode
+ +
164  }
+
165  return true;
+
166 }
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static uint8_t startupMode()
Definition: Modes.cpp:566
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static bool checkVersion(uint8_t major, uint8_t minor)
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static uint8_t startupMode()
Definition: Modes.cpp:635
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
-

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, m_globalFlags, oneClickModeEnabled(), ByteStream::resetUnserializer(), Leds::setBrightness(), setCurMode(), startupMode(), unserialize(), and ByteStream::unserialize().

+

References ByteStream::decompress(), m_globalFlags, oneClickModeEnabled(), setCurMode(), startupMode(), unserialize(), and unserializeSaveHeader().

-

Referenced by loadStorage(), and EditorConnection::receiveModes().

+

Referenced by EditorConnection::receiveModes().

@@ -1158,27 +1141,50 @@

-

Definition at line 149 of file Modes.cpp.

-
150 {
-
151  // this is good on memory, but it erases what they have stored
-
152  // before we know whether there is something actually saved
-
153  clearModes();
-
154  ByteStream modesBuffer;
-
155  // only read storage if the modebuffer isn't filled
-
156  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
157  DEBUG_LOG("Empty buffer read from storage");
-
158  // this kinda sucks whatever they had loaded is gone
-
159  return false;
-
160  }
-
161  return loadFromBuffer(modesBuffer);
-
162 }
+

Definition at line 168 of file Modes.cpp.

+
169 {
+
170  ByteStream headerBuffer;
+
171  // only read storage if the modebuffer isn't filled
+
172  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
173  DEBUG_LOG("Empty buffer read from storage");
+
174  // this kinda sucks whatever they had loaded is gone
+
175  return false;
+
176  }
+
177  // this erases what is stored before we know whether there is data
+
178  // but it's the easiest way to just re-load new data from storage
+
179  clearModes();
+
180  // read the header and load the data
+
181  if (!unserializeSaveHeader(headerBuffer)) {
+
182  return false;
+
183  }
+
184  // unserialize the number of modes next
+
185  uint8_t numModes = 0;
+
186  headerBuffer.unserialize(&numModes);
+
187  if (!numModes) {
+
188  DEBUG_LOG("Did not find any modes");
+
189  // this kinda sucks whatever they had loaded is gone
+
190  return false;
+
191  }
+
192  // iterate each mode and read it out of it's storage slot then add it
+
193  for (uint8_t i = 0; i < numModes; ++i) {
+
194  ByteStream modeBuffer(MAX_MODE_SIZE);
+
195  // read each mode from a storage slot and load it
+
196  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
197  return false;
+
198  }
+
199  }
+
200  return true;
+
201 }
#define DEBUG_LOG(msg)
Definition: Log.h:40
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:504
+
bool unserialize(uint8_t *byte)
Definition: ByteStream.cpp:417
uint32_t size() const
Definition: ByteStream.h:123
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static uint8_t numModes()
Definition: Modes.h:92
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
-

References clearModes(), DEBUG_LOG, loadFromBuffer(), Storage::read(), and ByteStream::size().

+

References addSerializedMode(), clearModes(), DEBUG_LOG, MAX_MODE_SIZE, numModes(), Storage::read(), ByteStream::size(), ByteStream::unserialize(), and unserializeSaveHeader().

Referenced by init().

@@ -1213,7 +1219,7 @@

127  }

#define MODES_FLAG_LOCKED
Definition: Modes.h:18
-

References getFlag(), and MODES_FLAG_LOCKED.

+

References getFlag(), and MODES_FLAG_LOCKED.

Referenced by setLocked(), and VortexEngine::tick().

@@ -1242,16 +1248,16 @@

-

Definition at line 491 of file Modes.cpp.

-
492 {
-
493  if (!m_numModes) {
-
494  return nullptr;
-
495  }
-
496  // iterate the cur mode forward
-
497  return setCurMode(m_curMode + 1);
-
498 }
+

Definition at line 560 of file Modes.cpp.

+
561 {
+
562  if (!m_numModes) {
+
563  return nullptr;
+
564  }
+
565  // iterate the cur mode forward
+
566  return setCurMode(m_curMode + 1);
+
567 }
-

References m_curMode, m_numModes, and setCurMode().

+

References m_curMode, m_numModes, and setCurMode().

@@ -1278,18 +1284,18 @@

-

Definition at line 513 of file Modes.cpp.

-
514 {
-
515  do {
-
516  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
517  break;
-
518  }
-
519  } while (m_curMode != 0);
-
520  return curMode();
-
521 }
-
static Mode * curMode()
Definition: Modes.cpp:474
+

Definition at line 582 of file Modes.cpp.

+
583 {
+
584  do {
+
585  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
586  break;
+
587  }
+
588  } while (m_curMode != 0);
+
589  return curMode();
+
590 }
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References curMode(), m_curMode, and setCurMode().

+

References curMode(), m_curMode, and setCurMode().

Referenced by play(), and VortexEngine::runMainLogic().

@@ -1321,9 +1327,9 @@

Definition at line 92 of file Modes.h.

92 { return m_numModes; }
-

References m_numModes.

+

References m_numModes.

-

Referenced by Menu::init(), previousMode(), and unserialize().

+

Referenced by Menu::init(), loadStorage(), previousMode(), and unserialize().

@@ -1356,9 +1362,9 @@

120  }
#define MODES_FLAG_ONE_CLICK
Definition: Modes.h:20
-

References getFlag(), and MODES_FLAG_ONE_CLICK.

+

References getFlag(), and MODES_FLAG_ONE_CLICK.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -1406,10 +1412,10 @@

76 }
Button * g_pButton
Definition: Buttons.cpp:16
bool onShortClick() const
Definition: Button.h:34
- -
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+ +
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
-

References Leds::clearAll(), DEBUG_LOG, g_pButton, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), and Modes::ModeLink::play().

+

References Leds::clearAll(), DEBUG_LOG, g_pButton, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), and Modes::ModeLink::play().

Referenced by VortexEngine::runMainLogic().

@@ -1438,20 +1444,19 @@

-

Definition at line 501 of file Modes.cpp.

-
502 {
-
503  if (!m_numModes) {
-
504  return nullptr;
-
505  }
-
506  // iterate the cur mode backwards
-
507  if (!m_curMode) {
-
508  return setCurMode(numModes() - 1);
-
509  }
-
510  return setCurMode(m_curMode - 1);
-
511 }
-
static uint8_t numModes()
Definition: Modes.h:92
+

Definition at line 570 of file Modes.cpp.

+
571 {
+
572  if (!m_numModes) {
+
573  return nullptr;
+
574  }
+
575  // iterate the cur mode backwards
+
576  if (!m_curMode) {
+
577  return setCurMode(numModes() - 1);
+
578  }
+
579  return setCurMode(m_curMode - 1);
+
580 }
-

References m_curMode, m_numModes, numModes(), and setCurMode().

+

References m_curMode, m_numModes, numModes(), and setCurMode().

@@ -1478,12 +1483,12 @@

-

Definition at line 590 of file Modes.cpp.

-
591 {
-
592  m_globalFlags = 0;
-
593 }
+

Definition at line 659 of file Modes.cpp.

+
660 {
+
661  m_globalFlags = 0;
+
662 }
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by FactoryReset::onLongClick().

@@ -1512,21 +1517,21 @@

-

Definition at line 692 of file Modes.cpp.

-
693 {
-
694  if (!m_pCurModeLink) {
-
695  // if there's no loaded mode currently then there's nothing
-
696  // to save so there's no error
-
697  return false;
-
698  }
-
699  // force the current mode to save back to serial to catch changes
-
700  return m_pCurModeLink->save();
-
701 }
- +

Definition at line 761 of file Modes.cpp.

+
762 {
+
763  if (!m_pCurModeLink) {
+
764  // if there's no loaded mode currently then there's nothing
+
765  // to save so there's no error
+
766  return false;
+
767  }
+
768  // force the current mode to save back to serial to catch changes
+
769  return m_pCurModeLink->save();
+
770 }
+
-

References m_pCurModeLink, and Modes::ModeLink::save().

+

References m_pCurModeLink, and Modes::ModeLink::save().

-

Referenced by serialize(), and updateCurMode().

+

Referenced by saveStorage(), serialize(), and updateCurMode().

@@ -1553,31 +1558,63 @@

-

Definition at line 166 of file Modes.cpp.

-
167 {
-
168  DEBUG_LOG("Saving modes...");
-
169  // A ByteStream to hold all the serialized data
-
170  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
171  // save data to the buffer
-
172  if (!saveToBuffer(modesBuffer)) {
-
173  return false;
-
174  }
-
175  // write the serial buffer to flash storage, this
-
176  // will compress the buffer and include crc/flags
-
177  if (!Storage::write(modesBuffer)) {
-
178  DEBUG_LOG("Failed to write storage");
-
179  return false;
-
180  }
-
181  DEBUG_LOG("Success saving modes to storage");
-
182  return true;
-
183 }
-
#define STORAGE_SIZE
Definition: VortexConfig.h:506
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
+

Definition at line 205 of file Modes.cpp.

+
206 {
+
207  DEBUG_LOG("Saving modes...");
+
208  ByteStream headerBuffer(MAX_MODE_SIZE);
+
209  if (!serializeSaveHeader(headerBuffer)) {
+
210  return false;
+
211  }
+
212  // serialize the number of modes
+
213  if (!headerBuffer.serialize(m_numModes)) {
+
214  return false;
+
215  }
+
216  if (!Storage::write(0, headerBuffer)) {
+
217  return false;
+
218  }
+
219  // make sure the current mode is saved in case it has changed somehow
+
220  saveCurMode();
+
221  // uninstantiate cur mode so we have stack space to serialize
+
222  if (m_pCurModeLink) {
+ +
224  }
+
225  uint16_t i = 0;
+
226  ModeLink *ptr = m_storedModes;
+
227  while (ptr && i < MAX_MODES) {
+
228  ByteStream modeBuffer(MAX_MODE_SIZE);
+
229  // instantiate the mode temporarily
+
230  Mode *mode = ptr->instantiate();
+
231  if (!mode) {
+ +
233  return false;
+
234  }
+
235  // serialize it into the target modes buffer
+
236  mode->serialize(modeBuffer);
+
237  // just uninstansiate the mode after serializing
+
238  ptr->uninstantiate();
+
239  // next mode
+
240  ptr = ptr->next();
+
241  // now write this mode into a storage slot (skip first slot, that's header)
+
242  if (!Storage::write(++i, modeBuffer)) {
+
243  return false;
+
244  }
+
245  }
+
246  // reinstanstiate the current mode
+ +
248  return false;
+
249  }
+
250  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
251  return true;
+
252 }
+
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
+
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
-

References DEBUG_LOG, saveToBuffer(), STORAGE_SIZE, and Storage::write().

+

References DEBUG_LOG, DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, MAX_MODE_SIZE, MAX_MODES, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), serializeSaveHeader(), Modes::ModeLink::uninstantiate(), and Storage::write().

-

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

+

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

@@ -1605,39 +1642,27 @@

-

Definition at line 79 of file Modes.cpp.

-
80 {
-
81  // serialize the engine version into the modes buffer
-
82  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
83  return false;
-
84  }
-
85  // NOTE: instead of global brightness the duo uses this to store the
-
86  // startup mode ID. The duo doesn't offer a global brightness option
-
87  if (!modesBuffer.serialize(m_globalFlags)) {
-
88  return false;
-
89  }
-
90  // serialize the global brightness
-
91  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
92  return false;
-
93  }
-
94  // serialize all modes data into the modesBuffer
-
95  if (!serialize(modesBuffer)) {
-
96  return false;
-
97  }
-
98  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
99  if (!modesBuffer.compress()) {
-
100  return false;
-
101  }
-
102  return true;
-
103 }
-
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
-
static uint8_t getBrightness()
Definition: Leds.h:104
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static bool serializeVersion(ByteStream &stream)
+

Definition at line 126 of file Modes.cpp.

+
127 {
+
128  // first write out the header
+
129  if (!serializeSaveHeader(modesBuffer)) {
+
130  return false;
+
131  }
+
132  // serialize all modes data into the modesBuffer
+
133  if (!serialize(modesBuffer)) {
+
134  return false;
+
135  }
+
136  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
137  if (!modesBuffer.compress()) {
+
138  return false;
+
139  }
+
140  return true;
+
141 }
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
-

References ByteStream::compress(), DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, serialize(), ByteStream::serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

+

References ByteStream::compress(), DEBUG_LOGF, serialize(), serializeSaveHeader(), and ByteStream::size().

-

Referenced by saveStorage(), and EditorConnection::sendModes().

+

Referenced by EditorConnection::sendModes().

@@ -1665,46 +1690,96 @@

-

Definition at line 186 of file Modes.cpp.

-
187 {
-
188  // serialize the number of modes
-
189  if (!modesBuffer.serialize(m_numModes)) {
-
190  return false;
-
191  }
-
192  // make sure the current mode is saved in case it has changed somehow
-
193  saveCurMode();
-
194  // uninstantiate cur mode so we have stack space to serialize
-
195  if (m_pCurModeLink) {
- -
197  }
-
198  ModeLink *ptr = m_storedModes;
-
199  while (ptr) {
-
200  // instantiate the mode temporarily
-
201  Mode *mode = ptr->instantiate();
-
202  if (!mode) {
- -
204  return false;
-
205  }
-
206  // serialize it into the target modes buffer
-
207  mode->serialize(modesBuffer);
-
208  // just uninstansiate the mode after serializing
-
209  ptr->uninstantiate();
-
210  // next mode
-
211  ptr = ptr->next();
-
212  }
-
213  // reinstanstiate the current mode
- -
215  return false;
-
216  }
-
217  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
218  return true;
-
219 }
-
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
-
static bool saveCurMode()
Definition: Modes.cpp:692
+

Definition at line 255 of file Modes.cpp.

+
256 {
+
257  // serialize the number of modes
+
258  if (!modesBuffer.serialize(m_numModes)) {
+
259  return false;
+
260  }
+
261  // make sure the current mode is saved in case it has changed somehow
+
262  saveCurMode();
+
263  // uninstantiate cur mode so we have stack space to serialize
+
264  if (m_pCurModeLink) {
+ +
266  }
+
267  ModeLink *ptr = m_storedModes;
+
268  while (ptr) {
+
269  // instantiate the mode temporarily
+
270  Mode *mode = ptr->instantiate();
+
271  if (!mode) {
+ +
273  return false;
+
274  }
+
275  // serialize it into the target modes buffer
+
276  mode->serialize(modesBuffer);
+
277  // just uninstansiate the mode after serializing
+
278  ptr->uninstantiate();
+
279  // next mode
+
280  ptr = ptr->next();
+
281  }
+
282  // reinstanstiate the current mode
+ +
284  return false;
+
285  }
+
286  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
287  return true;
+
288 }
+
+

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+ +

Referenced by saveToBuffer().

+ +
+ + +

◆ serializeSaveHeader()

+ +
+
+

Static Private Member Functions

static bool serializeSaveHeader (ByteStream &saveBuffer)
 
static bool unserializeSaveHeader (ByteStream &saveBuffer)
 
static ModeLinkgetModeLink (uint32_t index)
 
static ModeinitCurMode (bool force=false)
+ + + + +
+ + + + + + + + +
bool Modes::serializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 78 of file Modes.cpp.

+
79 {
+
80  // serialize the engine version into the modes buffer
+
81  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
82  return false;
+
83  }
+
84  // NOTE: instead of global brightness the duo uses this to store the
+
85  // startup mode ID. The duo doesn't offer a global brightness option
+
86  if (!saveBuffer.serialize(m_globalFlags)) {
+
87  return false;
+
88  }
+
89  // serialize the global brightness
+
90  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
91  return false;
+
92  }
+
93  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
94  return true;
+
95 }
+
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
+
static uint8_t getBrightness()
Definition: Leds.h:104
+
static bool serializeVersion(ByteStream &stream)
-

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+

References DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, ByteStream::serialize(), and VortexEngine::serializeVersion().

-

Referenced by saveToBuffer().

+

Referenced by saveStorage(), and saveToBuffer().

@@ -1746,9 +1821,9 @@

129  {
130  return setFlag(MODES_FLAG_ADV_MENUS, active, save);
131  }
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
-

References MODES_FLAG_ADV_MENUS, and setFlag().

+

References MODES_FLAG_ADV_MENUS, and setFlag().

Referenced by Menus::runMenuSelection().

@@ -1778,51 +1853,51 @@

-

Definition at line 434 of file Modes.cpp.

-
435 {
-
436  if (!m_numModes) {
-
437  return nullptr;
-
438  }
-
439  // clear the LEDs when switching modes
-
440  Leds::clearAll();
-
441  // if we have a current mode open, close it
-
442  if (m_pCurModeLink) {
- -
444  }
-
445  int8_t newModeIdx = index % m_numModes;
-
446  // lookup the new mode link
-
447  ModeLink *newCurLink = getModeLink(newModeIdx);
-
448  if (!newCurLink) {
-
449  // what
-
450  return nullptr;
-
451  }
-
452  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
453  Mode *newCur = newCurLink->instantiate();
-
454  if (!newCur) {
- -
456  return nullptr;
-
457  }
-
458  // update to the new mode
-
459  m_curMode = newModeIdx;
-
460  m_pCurModeLink = newCurLink;
-
461  // record the current time as the last switch time
- -
463  // update the global startup mode to be this mode, if we turn off
-
464  // and turn back on into one click mode it will select this one
-
465  Modes::setStartupMode(newModeIdx);
-
466  // log the change
-
467  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
468  m_curMode, m_numModes - 1, newCur->getPatternID());
-
469  // return the new current mode
-
470  return newCur;
-
471 }
+

Definition at line 503 of file Modes.cpp.

+
504 {
+
505  if (!m_numModes) {
+
506  return nullptr;
+
507  }
+
508  // clear the LEDs when switching modes
+
509  Leds::clearAll();
+
510  // if we have a current mode open, close it
+
511  if (m_pCurModeLink) {
+ +
513  }
+
514  int8_t newModeIdx = index % m_numModes;
+
515  // lookup the new mode link
+
516  ModeLink *newCurLink = getModeLink(newModeIdx);
+
517  if (!newCurLink) {
+
518  // what
+
519  return nullptr;
+
520  }
+
521  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
522  Mode *newCur = newCurLink->instantiate();
+
523  if (!newCur) {
+ +
525  return nullptr;
+
526  }
+
527  // update to the new mode
+
528  m_curMode = newModeIdx;
+
529  m_pCurModeLink = newCurLink;
+
530  // record the current time as the last switch time
+ +
532  // update the global startup mode to be this mode, if we turn off
+
533  // and turn back on into one click mode it will select this one
+
534  Modes::setStartupMode(newModeIdx);
+
535  // log the change
+
536  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
537  m_curMode, m_numModes - 1, newCur->getPatternID());
+
538  // return the new current mode
+
539  return newCur;
+
540 }
PatternID getPatternID(LedPos pos=LED_ANY) const
Definition: Mode.cpp:481
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

+

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

-

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

+

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

@@ -1849,42 +1924,42 @@

-

Definition at line 252 of file Modes.cpp.

-
253 {
-
254  clearModes();
-
255 #if DEMO_ALL_PATTERNS == 1
-
256  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
257  PatternID default_start = PATTERN_FIRST;
-
258  PatternID default_end = PATTERN_LAST;
-
259  // add 65 randomized modes
-
260  for (int i = 0; i < 65; ++i) {
-
261  Mode tmpMode;
-
262  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
263  // create a random pattern ID from all patterns
- -
265  Colorset randSet;
-
266  randSet.randomize(8);
-
267  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
268  }
-
269  // add another mode with the given pattern and colorset
-
270  if (!addMode(&tmpMode)) {
-
271  ERROR_LOG("Failed to add mode");
-
272  // return false?
-
273  }
-
274  }
-
275  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
276 #else
-
277  // add each default mode with each of the given colors
-
278  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
279  const default_mode_entry &def = default_modes[i];
-
280  Colorset set(def.numColors, def.cols);
-
281  addMode(def.patternID, nullptr, &set);
-
282  }
-
283 #endif
-
284  return true;
-
285 }
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+

Definition at line 321 of file Modes.cpp.

+
322 {
+
323  clearModes();
+
324 #if DEMO_ALL_PATTERNS == 1
+
325  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
326  PatternID default_start = PATTERN_FIRST;
+
327  PatternID default_end = PATTERN_LAST;
+
328  // add 65 randomized modes
+
329  for (int i = 0; i < 65; ++i) {
+
330  Mode tmpMode;
+
331  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
332  // create a random pattern ID from all patterns
+ +
334  Colorset randSet;
+
335  randSet.randomize(8);
+
336  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
337  }
+
338  // add another mode with the given pattern and colorset
+
339  if (!addMode(&tmpMode)) {
+
340  ERROR_LOG("Failed to add mode");
+
341  // return false?
+
342  }
+
343  }
+
344  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
345 #else
+
346  // add each default mode with each of the given colors
+
347  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
348  const default_mode_entry &def = default_modes[i];
+
349  Colorset set(def.numColors, def.cols);
+
350  addMode(def.patternID, nullptr, &set);
+
351  }
+
352 #endif
+
353  return true;
+
354 }
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:37
@ LED_FIRST
Definition: LedTypes.h:13
@@ -1899,7 +1974,7 @@

PatternID patternID
Definition: DefaultModes.h:10

uint8_t numColors
Definition: DefaultModes.h:11
-

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

+

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

Referenced by init(), and FactoryReset::onLongClick().

@@ -1945,20 +2020,20 @@

-

Definition at line 572 of file Modes.cpp.

-
573 {
-
574  // then actually if it's enabled ensure the upper nibble is set
-
575  if (enable) {
-
576  // set the cur mode index as the upper nibble
-
577  m_globalFlags |= flag;
-
578  } else {
-
579  m_globalFlags &= ~flag;
-
580  }
-
581  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
582  return !save || saveStorage();
-
583 }
+

Definition at line 641 of file Modes.cpp.

+
642 {
+
643  // then actually if it's enabled ensure the upper nibble is set
+
644  if (enable) {
+
645  // set the cur mode index as the upper nibble
+
646  m_globalFlags |= flag;
+
647  } else {
+
648  m_globalFlags &= ~flag;
+
649  }
+
650  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
651  return !save || saveStorage();
+
652 }
-

References DEBUG_LOGF, m_globalFlags, and saveStorage().

+

References DEBUG_LOGF, m_globalFlags, and saveStorage().

Referenced by setAdvancedMenus(), setKeychainMode(), setLocked(), and setOneClickMode().

@@ -2003,7 +2078,7 @@

137  return setFlag(MODES_FLAG_KEYCHAIN, active, save);

138  }
-

References MODES_FLAG_KEYCHAIN, and setFlag().

+

References MODES_FLAG_KEYCHAIN, and setFlag().

@@ -2047,7 +2122,7 @@

124  }
static bool locked()
Definition: Modes.h:125
-

References locked(), MODES_FLAG_LOCKED, and setFlag().

+

References locked(), MODES_FLAG_LOCKED, and setFlag().

Referenced by VortexEngine::tick().

@@ -2092,7 +2167,7 @@

116  return setFlag(MODES_FLAG_ONE_CLICK, enable, save);
117  }
-

References MODES_FLAG_ONE_CLICK, and setFlag().

+

References MODES_FLAG_ONE_CLICK, and setFlag().

@@ -2120,17 +2195,17 @@

-

Definition at line 558 of file Modes.cpp.

-
559 {
-
560  // zero out the upper nibble to disable
-
561  m_globalFlags &= 0x0F;
-
562  // or in the index value shifted into the upper nibble
-
563  m_globalFlags |= (index << 4) & 0xF0;
-
564 }
+

Definition at line 627 of file Modes.cpp.

+
628 {
+
629  // zero out the upper nibble to disable
+
630  m_globalFlags &= 0x0F;
+
631  // or in the index value shifted into the upper nibble
+
632  m_globalFlags |= (index << 4) & 0xF0;
+
633 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by VortexEngine::enterSleep(), and setCurMode().

+

Referenced by VortexEngine::enterSleep(), and setCurMode().

@@ -2158,47 +2233,47 @@

-

Definition at line 325 of file Modes.cpp.

-
326 {
-
327  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
328  if (newPos >= m_numModes) {
-
329  return false;
-
330  }
-
331  if (newPos == m_curMode) {
-
332  return true;
-
333  }
-
334  // get the target mode at the position of the shift
-
335  ModeLink *target = getModeLink(newPos);
-
336  if (!target) {
-
337  // invalid new position?
-
338  return false;
-
339  }
-
340  // special case for moving first in list forward
-
341  if (!m_curMode && offset > 0) {
-
342  // update main list ptr
- -
344  }
-
345  // unlink the current link
- -
347  // update the current position to reflect our new pos
-
348  m_curMode = newPos;
-
349  // then re-link the mode at the new spot
-
350  if (offset < 0) {
-
351  // link the link before our target link
-
352  target->linkBefore(m_pCurModeLink);
-
353  // special case for moving into first in list
-
354  if (!m_curMode) {
- -
356  }
-
357  } else {
-
358  // link the link after our target link
-
359  target->linkAfter(m_pCurModeLink);
-
360  }
-
361  return true;
-
362 }
- +

Definition at line 394 of file Modes.cpp.

+
395 {
+
396  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
397  if (newPos >= m_numModes) {
+
398  return false;
+
399  }
+
400  if (newPos == m_curMode) {
+
401  return true;
+
402  }
+
403  // get the target mode at the position of the shift
+
404  ModeLink *target = getModeLink(newPos);
+
405  if (!target) {
+
406  // invalid new position?
+
407  return false;
+
408  }
+
409  // special case for moving first in list forward
+
410  if (!m_curMode && offset > 0) {
+
411  // update main list ptr
+ +
413  }
+
414  // unlink the current link
+ +
416  // update the current position to reflect our new pos
+
417  m_curMode = newPos;
+
418  // then re-link the mode at the new spot
+
419  if (offset < 0) {
+
420  // link the link before our target link
+
421  target->linkBefore(m_pCurModeLink);
+
422  // special case for moving into first in list
+
423  if (!m_curMode) {
+ +
425  }
+
426  } else {
+
427  // link the link after our target link
+
428  target->linkAfter(m_pCurModeLink);
+
429  }
+
430  return true;
+
431 }
+
-

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

+

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

@@ -2225,15 +2300,15 @@

-

Definition at line 566 of file Modes.cpp.

-
567 {
-
568  // zero out the upper nibble to disable
-
569  return (m_globalFlags & 0xF0) >> 4;
-
570 }
+

Definition at line 635 of file Modes.cpp.

+
636 {
+
637  // zero out the upper nibble to disable
+
638  return (m_globalFlags & 0xF0) >> 4;
+
639 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -2261,40 +2336,100 @@

-

Definition at line 222 of file Modes.cpp.

-
223 {
-
224  DEBUG_LOG("Loading modes...");
-
225  // this is good on memory, but it erases what they have stored before we
-
226  // know whether there is something actually saved in the serial buffer
-
227  clearModes();
-
228  // unserialize the number of modes next
-
229  uint8_t numModes = 0;
-
230  modesBuffer.unserialize(&numModes);
-
231  if (!numModes) {
-
232  DEBUG_LOG("Did not find any modes");
-
233  // this kinda sucks whatever they had loaded is gone
-
234  return false;
-
235  }
-
236  // foreach expected mode
-
237  for (uint8_t i = 0; i < numModes; ++i) {
-
238  // just copy the serialized mode into the internal storage because
-
239  // we store the modes in a serialized manner so that they are smaller
-
240  // then we unpack them when we instantiate the mode
-
241  if (!addSerializedMode(modesBuffer)) {
-
242  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
243  // clear work so far?
-
244  clearModes();
-
245  return false;
-
246  }
-
247  }
-
248  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
249  return (m_numModes == numModes);
-
250 }
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
+

Definition at line 291 of file Modes.cpp.

+
292 {
+
293  DEBUG_LOG("Loading modes...");
+
294  // this is good on memory, but it erases what they have stored before we
+
295  // know whether there is something actually saved in the serial buffer
+
296  clearModes();
+
297  // unserialize the number of modes next
+
298  uint8_t numModes = 0;
+
299  modesBuffer.unserialize(&numModes);
+
300  if (!numModes) {
+
301  DEBUG_LOG("Did not find any modes");
+
302  // this kinda sucks whatever they had loaded is gone
+
303  return false;
+
304  }
+
305  // foreach expected mode
+
306  for (uint8_t i = 0; i < numModes; ++i) {
+
307  // just copy the serialized mode into the internal storage because
+
308  // we store the modes in a serialized manner so that they are smaller
+
309  // then we unpack them when we instantiate the mode
+
310  if (!addSerializedMode(modesBuffer)) {
+
311  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
312  // clear work so far?
+
313  clearModes();
+
314  return false;
+
315  }
+
316  }
+
317  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
318  return (m_numModes == numModes);
+
319 }
+
+

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+ +

Referenced by loadFromBuffer().

+ +
+ + +

◆ unserializeSaveHeader()

+ +
+
+ + + + + +
+ + + + + + + + +
bool Modes::unserializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 97 of file Modes.cpp.

+
98 {
+
99  // reset the unserializer index before unserializing anything
+
100  saveHeader.resetUnserializer();
+
101  uint8_t major = 0;
+
102  uint8_t minor = 0;
+
103  // unserialize the vortex version
+
104  saveHeader.unserialize(&major);
+
105  saveHeader.unserialize(&minor);
+
106  // check the version for incompatibility
+
107  if (!VortexEngine::checkVersion(major, minor)) {
+
108  // incompatible version
+
109  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
+
110  return false;
+
111  }
+
112  // NOTE: instead of global brightness the duo uses this to store the
+
113  // startup mode ID. The duo doesn't offer a global brightness option
+
114  // unserialize the global brightness
+
115  saveHeader.unserialize(&m_globalFlags);
+
116  // unserialize the global brightness
+
117  uint8_t brightness = 0;
+
118  saveHeader.unserialize(&brightness);
+
119  if (brightness) {
+
120  Leds::setBrightness(brightness);
+
121  }
+
122  return true;
+
123 }
+
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
+
static void setBrightness(uint8_t brightness)
Definition: Leds.h:105
+
static bool checkVersion(uint8_t major, uint8_t minor)
-

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+

References VortexEngine::checkVersion(), ERROR_LOGF, m_globalFlags, ByteStream::resetUnserializer(), Leds::setBrightness(), and ByteStream::unserialize().

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer(), and loadStorage().

@@ -2322,26 +2457,26 @@

-

Definition at line 414 of file Modes.cpp.

-
415 {
-
416  if (!mode) {
-
417  return false;
-
418  }
-
419  Mode *pCur = curMode();
-
420  if (!pCur) {
-
421  return false;
-
422  }
-
423  // utilize copy operator
-
424  *pCur = *mode;
-
425  // immediately save this mode to the internal mode storage
-
426  if (!saveCurMode()) {
-
427  return false;
-
428  }
-
429  // initialize the new mode
-
430  return initCurMode();
-
431 }
+

Definition at line 483 of file Modes.cpp.

+
484 {
+
485  if (!mode) {
+
486  return false;
+
487  }
+
488  Mode *pCur = curMode();
+
489  if (!pCur) {
+
490  return false;
+
491  }
+
492  // utilize copy operator
+
493  *pCur = *mode;
+
494  // immediately save this mode to the internal mode storage
+
495  if (!saveCurMode()) {
+
496  return false;
+
497  }
+
498  // initialize the new mode
+
499  return initCurMode();
+
500 }
-

References curMode(), initCurMode(), and saveCurMode().

+

References curMode(), initCurMode(), and saveCurMode().

Referenced by ModeSharing::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveMode().

@@ -2368,9 +2503,9 @@

-

Definition at line 211 of file Modes.h.

+

Definition at line 214 of file Modes.h.

-

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

+

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

@@ -2394,9 +2529,9 @@

-

Definition at line 223 of file Modes.h.

+

Definition at line 226 of file Modes.h.

-

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), saveToBuffer(), setFlag(), setStartupMode(), and startupMode().

+

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), serializeSaveHeader(), setFlag(), setStartupMode(), startupMode(), and unserializeSaveHeader().

@@ -2420,9 +2555,9 @@

-

Definition at line 226 of file Modes.h.

+

Definition at line 229 of file Modes.h.

-

Referenced by lastSwitchTime(), and setCurMode().

+

Referenced by lastSwitchTime(), and setCurMode().

@@ -2446,9 +2581,9 @@

-

Definition at line 214 of file Modes.h.

+

Definition at line 217 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

+

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), saveStorage(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

@@ -2472,9 +2607,9 @@

-

Definition at line 217 of file Modes.h.

+

Definition at line 220 of file Modes.h.

-

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), serialize(), setCurMode(), and shiftCurMode().

+

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), saveStorage(), serialize(), setCurMode(), and shiftCurMode().

@@ -2498,9 +2633,9 @@

-

Definition at line 220 of file Modes.h.

+

Definition at line 223 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), serialize(), and shiftCurMode().

+

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), saveStorage(), serialize(), and shiftCurMode().

diff --git a/docs/gloves/classModes.js b/docs/gloves/classModes.js index ae97a62325..0622c676b3 100644 --- a/docs/gloves/classModes.js +++ b/docs/gloves/classModes.js @@ -33,6 +33,7 @@ var classModes = [ "saveStorage", "classModes.html#a1756081ee85dbcf672ddad5a3dcb4690", null ], [ "saveToBuffer", "classModes.html#a9b64018ed3d72c3667f0eaef5fd6495f", null ], [ "serialize", "classModes.html#afb881f5315e4197bb01625b1268eca9d", null ], + [ "serializeSaveHeader", "classModes.html#a4432825def9ab0a3edb0c480e21c14e1", null ], [ "setAdvancedMenus", "classModes.html#ad4938ad48f465a7a59d9bcdaa2f8eaca", null ], [ "setCurMode", "classModes.html#a65f088d9076706c4976f7282be323e50", null ], [ "setDefaults", "classModes.html#a790f299aa425bdc73af7f584ee30472b", null ], @@ -44,6 +45,7 @@ var classModes = [ "shiftCurMode", "classModes.html#a7cb704d905f26b1d1e9e748c87b547a1", null ], [ "startupMode", "classModes.html#a354ffb53eeff1a351ef81ce55eae472a", null ], [ "unserialize", "classModes.html#ae5c68f28c424a2a08ba659e9373898e3", null ], + [ "unserializeSaveHeader", "classModes.html#a0e4a896bf673ecc51bf52f3efabf8aca", null ], [ "updateCurMode", "classModes.html#a263cf02fb83d954b91c85d2d1e5411ee", null ], [ "m_curMode", "classModes.html#aee36ec773858cf347b90bd1538b0a2b8", null ], [ "m_globalFlags", "classModes.html#a9929c8efa425648fa8a2e85028b1b303", null ], diff --git a/docs/gloves/classModes_1_1ModeLink.html b/docs/gloves/classModes_1_1ModeLink.html index 7f8b6553c3..da8577d03b 100644 --- a/docs/gloves/classModes_1_1ModeLink.html +++ b/docs/gloves/classModes_1_1ModeLink.html @@ -154,7 +154,7 @@

Detailed Description

-

Definition at line 156 of file Modes.h.

+

Definition at line 159 of file Modes.h.

Constructor & Destructor Documentation

◆ ModeLink() [1/2]

@@ -182,28 +182,28 @@

-

Definition at line 703 of file Modes.cpp.

-
703  :
-
704  m_pInstantiatedMode(nullptr),
-
705  m_storedMode(),
-
706  m_next(nullptr),
-
707  m_prev(nullptr)
-
708 {
-
709  if (src) {
-
710  init(src);
-
711  }
-
712  if (src && inst) {
-
713  instantiate();
-
714  }
-
715 }
- - - - - - +

Definition at line 772 of file Modes.cpp.

+
772  :
+
773  m_pInstantiatedMode(nullptr),
+
774  m_storedMode(),
+
775  m_next(nullptr),
+
776  m_prev(nullptr)
+
777 {
+
778  if (src) {
+
779  init(src);
+
780  }
+
781  if (src && inst) {
+
782  instantiate();
+
783  }
+
784 }
+ + + + + +
-

References init(), and instantiate().

+

References init(), and instantiate().

@@ -233,20 +233,20 @@

-

Definition at line 717 of file Modes.cpp.

-
717  :
-
718  m_pInstantiatedMode(nullptr),
-
719  m_storedMode(src),
-
720  m_next(nullptr),
-
721  m_prev(nullptr)
-
722 {
-
723  if (src.size() && inst) {
-
724  instantiate();
-
725  }
-
726 }
+

Definition at line 786 of file Modes.cpp.

+
786  :
+
787  m_pInstantiatedMode(nullptr),
+
788  m_storedMode(src),
+
789  m_next(nullptr),
+
790  m_prev(nullptr)
+
791 {
+
792  if (src.size() && inst) {
+
793  instantiate();
+
794  }
+
795 }
uint32_t size() const
Definition: ByteStream.h:123
-

References instantiate(), and ByteStream::size().

+

References instantiate(), and ByteStream::size().

@@ -265,15 +265,15 @@

-

Definition at line 728 of file Modes.cpp.

-
729 {
-
730  if (m_next) {
-
731  delete m_next;
-
732  }
-
733  if (m_pInstantiatedMode) {
-
734  delete m_pInstantiatedMode;
-
735  }
-
736 }
+

Definition at line 797 of file Modes.cpp.

+
798 {
+
799  if (m_next) {
+
800  delete m_next;
+
801  }
+
802  if (m_pInstantiatedMode) {
+
803  delete m_pInstantiatedMode;
+
804  }
+
805 }
@@ -294,27 +294,27 @@

-

Definition at line 769 of file Modes.cpp.

-
770 {
-
771  if (!next.size()) {
-
772  return false;
-
773  }
-
774  // if not end of chain, recurse on next link
-
775  if (m_next) {
-
776  return m_next->append(next);
-
777  }
-
778  m_next = new ModeLink(next);
-
779  if (!m_next) {
- -
781  return false;
-
782  }
-
783  m_next->m_prev = this;
-
784  return true;
-
785 }
+

Definition at line 838 of file Modes.cpp.

+
839 {
+
840  if (!next.size()) {
+
841  return false;
+
842  }
+
843  // if not end of chain, recurse on next link
+
844  if (m_next) {
+
845  return m_next->append(next);
+
846  }
+
847  m_next = new ModeLink(next);
+
848  if (!m_next) {
+ +
850  return false;
+
851  }
+
852  m_next->m_prev = this;
+
853  return true;
+
854 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
- - - + + +

References ERROR_OUT_OF_MEMORY, and ByteStream::size().

@@ -336,27 +336,27 @@

-

Definition at line 751 of file Modes.cpp.

-
752 {
-
753  if (!next) {
-
754  return false;
-
755  }
-
756  // if not end of chain, recurse on next link
-
757  if (m_next) {
-
758  return m_next->append(next);
-
759  }
-
760  m_next = new ModeLink(next);
-
761  if (!m_next) {
- -
763  return false;
-
764  }
-
765  m_next->m_prev = this;
-
766  return true;
-
767 }
+

Definition at line 820 of file Modes.cpp.

+
821 {
+
822  if (!next) {
+
823  return false;
+
824  }
+
825  // if not end of chain, recurse on next link
+
826  if (m_next) {
+
827  return m_next->append(next);
+
828  }
+
829  m_next = new ModeLink(next);
+
830  if (!m_next) {
+ +
832  return false;
+
833  }
+
834  m_next->m_prev = this;
+
835  return true;
+
836 }

References ERROR_OUT_OF_MEMORY.

-

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

+

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

@@ -383,10 +383,10 @@

-

Definition at line 187 of file Modes.h.

-
187 { return m_storedMode; }
+

Definition at line 190 of file Modes.h.

+
190 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -406,25 +406,25 @@

-

Definition at line 738 of file Modes.cpp.

-
739 {
-
740  if (!mode) {
-
741  return false;
-
742  }
- -
744  // serialize the mode so it can be instantiated anytime
-
745  if (!mode->saveToBuffer(m_storedMode)) {
-
746  return false;
-
747  }
-
748  return true;
-
749 }
+

Definition at line 807 of file Modes.cpp.

+
808 {
+
809  if (!mode) {
+
810  return false;
+
811  }
+ +
813  // serialize the mode so it can be instantiated anytime
+
814  if (!mode->saveToBuffer(m_storedMode)) {
+
815  return false;
+
816  }
+
817  return true;
+
818 }
void clear()
Definition: ByteStream.cpp:107
virtual bool saveToBuffer(ByteStream &saveBuffer, uint8_t numLeds=0) const
Definition: Mode.cpp:169
- +

References Mode::saveToBuffer().

-

Referenced by ModeLink().

+

Referenced by ModeLink().

@@ -443,30 +443,30 @@

-

Definition at line 838 of file Modes.cpp.

-
839 {
-
840  if (m_pInstantiatedMode) {
-
841  return m_pInstantiatedMode;
-
842  }
-
843  Mode *newMode = new Mode();
-
844  if (!newMode) {
- -
846  return nullptr;
-
847  }
- -
849  if (!newMode->loadFromBuffer(m_storedMode)) {
-
850  return nullptr;
-
851  }
-
852  m_pInstantiatedMode = newMode;
-
853  return m_pInstantiatedMode;
-
854 }
+

Definition at line 907 of file Modes.cpp.

+
908 {
+
909  if (m_pInstantiatedMode) {
+
910  return m_pInstantiatedMode;
+
911  }
+
912  Mode *newMode = new Mode();
+
913  if (!newMode) {
+ +
915  return nullptr;
+
916  }
+ +
918  if (!newMode->loadFromBuffer(m_storedMode)) {
+
919  return nullptr;
+
920  }
+
921  m_pInstantiatedMode = newMode;
+
922  return m_pInstantiatedMode;
+
923 }
void resetUnserializer()
Definition: ByteStream.cpp:391
Definition: Mode.h:38
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179

References ERROR_OUT_OF_MEMORY, and Mode::loadFromBuffer().

-

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -486,22 +486,22 @@

-

Definition at line 812 of file Modes.cpp.

-
813 {
-
814  if (!link) {
-
815  return;
-
816  }
-
817  if (m_next) {
-
818  m_next->m_prev = link;
-
819  link->m_next = m_next;
-
820  }
-
821  m_next = link;
-
822  link->m_prev = this;
-
823 }
+

Definition at line 881 of file Modes.cpp.

+
882 {
+
883  if (!link) {
+
884  return;
+
885  }
+
886  if (m_next) {
+
887  m_next->m_prev = link;
+
888  link->m_next = m_next;
+
889  }
+
890  m_next = link;
+
891  link->m_prev = this;
+
892 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -521,22 +521,22 @@

-

Definition at line 825 of file Modes.cpp.

-
826 {
-
827  if (!link) {
-
828  return;
-
829  }
-
830  if (m_prev) {
-
831  m_prev->m_next = link;
-
832  link->m_prev = m_prev;
-
833  }
-
834  m_prev = link;
-
835  link->m_next = this;
-
836 }
+

Definition at line 894 of file Modes.cpp.

+
895 {
+
896  if (!link) {
+
897  return;
+
898  }
+
899  if (m_prev) {
+
900  m_prev->m_next = link;
+
901  link->m_prev = m_prev;
+
902  }
+
903  m_prev = link;
+
904  link->m_next = this;
+
905 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -563,10 +563,10 @@

-

Definition at line 188 of file Modes.h.

-
188 { return m_pInstantiatedMode; }
+

Definition at line 191 of file Modes.h.

+
191 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -593,12 +593,12 @@

-

Definition at line 189 of file Modes.h.

-
189 { return m_next; }
+

Definition at line 192 of file Modes.h.

+
192 { return m_next; }
-

References m_next.

+

References m_next.

-

Referenced by Modes::getModeLink(), Modes::serialize(), and Modes::shiftCurMode().

+

Referenced by Modes::getModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::shiftCurMode().

@@ -625,10 +625,10 @@

-

Definition at line 193 of file Modes.h.

-
193 { return m_storedMode; }
+

Definition at line 196 of file Modes.h.

+
196 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -655,10 +655,10 @@

-

Definition at line 192 of file Modes.h.

-
192 { return m_storedMode; }
+

Definition at line 195 of file Modes.h.

+
195 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -685,10 +685,10 @@

-

Definition at line 194 of file Modes.h.

-
194 { return m_pInstantiatedMode; }
+

Definition at line 197 of file Modes.h.

+
197 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -707,13 +707,13 @@

-

Definition at line 787 of file Modes.cpp.

-
788 {
-
789  if (!m_pInstantiatedMode) {
-
790  return;
-
791  }
- -
793 }
+

Definition at line 856 of file Modes.cpp.

+
857 {
+
858  if (!m_pInstantiatedMode) {
+
859  return;
+
860  }
+ +
862 }
virtual void play()
Definition: Mode.cpp:139

Referenced by Modes::play().

@@ -743,10 +743,10 @@

-

Definition at line 190 of file Modes.h.

-
190 { return m_prev; }
+

Definition at line 193 of file Modes.h.

+
193 { return m_prev; }
-

References m_prev.

+

References m_prev.

@@ -765,16 +765,16 @@

-

Definition at line 864 of file Modes.cpp.

-
865 {
-
866  if (!m_pInstantiatedMode) {
-
867  return false;
-
868  }
- - -
871 }
+

Definition at line 933 of file Modes.cpp.

+
934 {
+
935  if (!m_pInstantiatedMode) {
+
936  return false;
+
937  }
+ + +
940 }
-

Referenced by Modes::saveCurMode().

+

Referenced by Modes::saveCurMode().

@@ -793,15 +793,15 @@

-

Definition at line 856 of file Modes.cpp.

-
857 {
-
858  if (m_pInstantiatedMode) {
-
859  delete m_pInstantiatedMode;
-
860  m_pInstantiatedMode = nullptr;
-
861  }
-
862 }
+

Definition at line 925 of file Modes.cpp.

+
926 {
+
927  if (m_pInstantiatedMode) {
+
928  delete m_pInstantiatedMode;
+
929  m_pInstantiatedMode = nullptr;
+
930  }
+
931 }
-

Referenced by Modes::initCurMode(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::initCurMode(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -820,26 +820,26 @@

-

Definition at line 795 of file Modes.cpp.

-
796 {
-
797  // unlink this node from the chain
-
798  if (m_prev) {
-
799  m_prev->m_next = m_next;
-
800  }
-
801  if (m_next) {
-
802  m_next->m_prev = m_prev;
-
803  }
-
804  // grab the new link that will take this place
-
805  ModeLink *newLink = m_prev ? m_prev : m_next;
-
806  // clear the links of this node
-
807  m_prev = nullptr;
-
808  m_next = nullptr;
-
809  return newLink;
-
810 }
+

Definition at line 864 of file Modes.cpp.

+
865 {
+
866  // unlink this node from the chain
+
867  if (m_prev) {
+
868  m_prev->m_next = m_next;
+
869  }
+
870  if (m_next) {
+
871  m_next->m_prev = m_prev;
+
872  }
+
873  // grab the new link that will take this place
+
874  ModeLink *newLink = m_prev ? m_prev : m_next;
+
875  // clear the links of this node
+
876  m_prev = nullptr;
+
877  m_next = nullptr;
+
878  return newLink;
+
879 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

+

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

@@ -864,9 +864,9 @@

-

Definition at line 198 of file Modes.h.

+

Definition at line 201 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

@@ -890,9 +890,9 @@

-

Definition at line 196 of file Modes.h.

+

Definition at line 199 of file Modes.h.

-

Referenced by mode(), and operator Mode *().

+

Referenced by mode(), and operator Mode *().

@@ -916,9 +916,9 @@

-

Definition at line 199 of file Modes.h.

+

Definition at line 202 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

@@ -942,9 +942,9 @@

-

Definition at line 197 of file Modes.h.

+

Definition at line 200 of file Modes.h.

-

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

+

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

diff --git a/docs/gloves/classPatternBuilder.html b/docs/gloves/classPatternBuilder.html index a457adbb1e..b53ffdf983 100644 --- a/docs/gloves/classPatternBuilder.html +++ b/docs/gloves/classPatternBuilder.html @@ -426,12 +426,12 @@

153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/gloves/classPatternSelect.html b/docs/gloves/classPatternSelect.html index 2150e534ba..eb7c21f9ca 100644 --- a/docs/gloves/classPatternSelect.html +++ b/docs/gloves/classPatternSelect.html @@ -194,7 +194,7 @@

Detailed Description

-

Definition at line 10 of file PatternSelect.h.

+

Definition at line 9 of file PatternSelect.h.

Member Enumeration Documentation

◆ PatternSelectState

@@ -220,15 +220,15 @@

STATE_PICK_PATTERN  -

Definition at line 34 of file PatternSelect.h.

-
35  {
-
36  // currently picking the list of patterns
- -
38  // currently picking a pattern in the list
- -
40  };
- - +

Definition at line 33 of file PatternSelect.h.

+
34  {
+
35  // currently picking the list of patterns
+ +
37  // currently picking a pattern in the list
+ +
39  };
+ +
@@ -269,9 +269,9 @@

20 }
@ PATTERN_FIRST
Definition: Patterns.h:18
Menu(const RGBColor &col, bool advanced)
Definition: Menu.cpp:12
- -
PatternSelectState m_state
Definition: PatternSelect.h:43
-
PatternID m_newPatternID
Definition: PatternSelect.h:49
+ +
PatternSelectState m_state
Definition: PatternSelect.h:42
+
PatternID m_newPatternID
Definition: PatternSelect.h:48
@@ -335,7 +335,7 @@

#define DEBUG_LOG(msg)
Definition: Log.h:40
virtual bool init()
Definition: Menu.cpp:26
-

References DEBUG_LOG, Menu::init(), m_newPatternID, m_state, PATTERN_FIRST, and STATE_PICK_LIST.

+

References DEBUG_LOG, Menu::init(), m_newPatternID, m_state, PATTERN_FIRST, and STATE_PICK_LIST.

@@ -382,7 +382,7 @@

virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-

References DEBUG_LOGF, Mode::init(), m_newPatternID, Menu::m_previewMode, m_started, PATTERN_COUNT, PATTERN_FIRST, and Mode::setPattern().

+

References DEBUG_LOGF, Mode::init(), m_newPatternID, Menu::m_previewMode, m_started, PATTERN_COUNT, PATTERN_FIRST, and Mode::setPattern().

Referenced by onShortClick().

@@ -489,9 +489,9 @@

virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:164
Definition: Mode.h:38
PatternID getPatternID(LedPos pos=LED_ANY) const
Definition: Mode.cpp:481
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOGF, FINGER_FIRST, FINGER_THUMB, Mode::getPatternID(), Mode::init(), Menu::leaveMenu(), Menu::m_curSelection, m_newPatternID, Menu::m_previewMode, m_state, PATTERN_COUNT, PATTERN_FIRST, Mode::setPattern(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References Modes::curMode(), DEBUG_LOGF, FINGER_FIRST, FINGER_THUMB, Mode::getPatternID(), Mode::init(), Menu::leaveMenu(), Menu::m_curSelection, m_newPatternID, Menu::m_previewMode, m_state, PATTERN_COUNT, PATTERN_FIRST, Mode::setPattern(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -535,7 +535,7 @@

Pair Finger
Definition: LedTypes.h:110
-

References FINGER_THUMB, Menu::m_curSelection, m_state, nextPattern(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References FINGER_THUMB, Menu::m_curSelection, m_state, nextPattern(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -595,7 +595,7 @@

void showPatternSelection()
void showListSelection()
-

References Menu::blinkSelection(), m_state, Menu::MENU_CONTINUE, Menu::run(), showListSelection(), showPatternSelection(), Menus::showSelection(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References Menu::blinkSelection(), m_state, Menu::MENU_CONTINUE, Menu::run(), showListSelection(), showPatternSelection(), Menus::showSelection(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -634,7 +634,7 @@

152 }
virtual void showExit()
Definition: Menu.cpp:108
-

References m_state, Menu::showExit(), and STATE_PICK_PATTERN.

+

References m_state, Menu::showExit(), and STATE_PICK_PATTERN.

@@ -750,7 +750,7 @@

-

Definition at line 46 of file PatternSelect.h.

+

Definition at line 45 of file PatternSelect.h.

@@ -774,7 +774,7 @@

-

Definition at line 49 of file PatternSelect.h.

+

Definition at line 48 of file PatternSelect.h.

Referenced by init(), nextPattern(), and onLongClick().

@@ -800,7 +800,7 @@

-

Definition at line 53 of file PatternSelect.h.

+

Definition at line 52 of file PatternSelect.h.

Referenced by nextPattern().

@@ -826,7 +826,7 @@

-

Definition at line 43 of file PatternSelect.h.

+

Definition at line 42 of file PatternSelect.h.

Referenced by init(), onLongClick(), onShortClick(), run(), and showExit().

diff --git a/docs/gloves/classRandomizer.html b/docs/gloves/classRandomizer.html index 967c8b1bae..35e480fcde 100644 --- a/docs/gloves/classRandomizer.html +++ b/docs/gloves/classRandomizer.html @@ -546,14 +546,14 @@

Definition: Mode.h:38
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
bool hasMultiLed() const
Definition: Mode.cpp:682
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
void serialize(ByteStream &buffer) const
Definition: Pattern.cpp:57
void seed(uint32_t newseed)
Definition: Random.cpp:18
Random m_multiRandCtx
Definition: Randomizer.h:30
Random m_singlesRandCtx[LED_COUNT]
Definition: Randomizer.h:29
-

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

+

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

@@ -597,9 +597,9 @@

133 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:164
Mode m_previewMode
Definition: Menu.h:52
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
-

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

diff --git a/docs/gloves/classStorage-members.html b/docs/gloves/classStorage-members.html index f50d386b6b..d85de9d6de 100644 --- a/docs/gloves/classStorage-members.html +++ b/docs/gloves/classStorage-members.html @@ -94,9 +94,9 @@ init()Storagestatic lastSaveSize()Storagestatic m_lastSaveSizeStorageprivatestatic - read(ByteStream &buffer)Storagestatic + read(uint16_t slot, ByteStream &buffer)Storagestatic Storage()Storageprivate - write(ByteStream &buffer)Storagestatic + write(uint16_t slot, ByteStream &buffer)Storagestatic diff --git a/docs/gloves/classStorage.html b/docs/gloves/classStorage.html index ec1296f4ae..59e5851300 100644 --- a/docs/gloves/classStorage.html +++ b/docs/gloves/classStorage.html @@ -101,10 +101,10 @@   static void cleanup ()   -static bool write (ByteStream &buffer) -  -static bool read (ByteStream &buffer) -  +static bool write (uint16_t slot, ByteStream &buffer) +  +static bool read (uint16_t slot, ByteStream &buffer) +  static uint32_t lastSaveSize ()   @@ -145,9 +145,9 @@

-

Definition at line 39 of file Storage.cpp.

-
40 {
-
41 }
+

Definition at line 41 of file Storage.cpp.

+
42 {
+
43 }
@@ -175,9 +175,9 @@

-

Definition at line 53 of file Storage.cpp.

-
54 {
-
55 }
+

Definition at line 55 of file Storage.cpp.

+
56 {
+
57 }

Referenced by VortexEngine::cleanup().

@@ -206,18 +206,18 @@

-

Definition at line 43 of file Storage.cpp.

-
44 {
-
45 #ifdef VORTEX_LIB
-
46  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
47  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
48  }
-
49 #endif
-
50  return true;
-
51 }
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
+

Definition at line 45 of file Storage.cpp.

+
46 {
+
47 #ifdef VORTEX_LIB
+
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
50  }
+
51 #endif
+
52  return true;
+
53 }
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
-

References DEFAULT_STORAGE_FILENAME.

+

References DEFAULT_STORAGE_FILENAME.

Referenced by VortexEngine::init().

@@ -246,18 +246,18 @@

-

Definition at line 191 of file Storage.cpp.

-
192 {
-
193  return m_lastSaveSize;
-
194 }
+

Definition at line 216 of file Storage.cpp.

+
217 {
+
218  return m_lastSaveSize;
+
219 }
static uint32_t m_lastSaveSize
Definition: Storage.h:40

References m_lastSaveSize.

- -

◆ read()

+ +

◆ read()

@@ -268,9 +268,19 @@

bool Storage::read

+ + + + + + - + + + + +
(uint16_t slot,
ByteStreambuffer)buffer 
)
@@ -280,65 +290,71 @@

-

Definition at line 135 of file Storage.cpp.

-
136 {
-
137 #ifdef VORTEX_LIB
-
138  if (!Vortex::storageEnabled()) {
-
139  // return false here, but true in write because we don't want to return
-
140  // an empty buffer after returning true
-
141  return false;
-
142  }
-
143 #endif
-
144  uint32_t size = STORAGE_SIZE;
-
145  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
146  return false;
-
147  }
-
148  if (!buffer.init(size)) {
-
149  return false;
-
150  }
-
151 #ifdef VORTEX_EMBEDDED
-
152  // read directly into the raw data of the byte array
-
153  memcpy(buffer.rawData(), (const void *)_storagedata, size);
-
154 #elif defined(_WIN32)
-
155  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
156  if (hFile == INVALID_HANDLE_VALUE) {
-
157  // error
-
158  return false;
-
159  }
-
160  DWORD bytesRead = 0;
-
161  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
162  // error
-
163  return false;
-
164  }
-
165  CloseHandle(hFile);
-
166 #else
-
167  FILE *f = fopen(STORAGE_FILENAME, "r");
-
168  if (!f) {
-
169  return false;
-
170  }
-
171  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
172  return false;
-
173  }
-
174  fclose(f);
-
175 #endif
-
176  // ensure the internal buffer is sane after reading it out, this
-
177  // prevents segfaults if the internal size reports larger than capacity
-
178  buffer.sanity();
-
179  // check crc immediately since we read into raw data copying the
-
180  // array could be dangerous
-
181  if (!buffer.checkCRC()) {
-
182  buffer.clear();
-
183  ERROR_LOG("Could not verify buffer");
-
184  return false;
-
185  }
-
186  m_lastSaveSize = size;
-
187  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
188  return true;
-
189 }
+

Definition at line 156 of file Storage.cpp.

+
157 {
+
158 #ifdef VORTEX_LIB
+
159  if (!Vortex::storageEnabled()) {
+
160  // return false here, but true in write because we don't want to return
+
161  // an empty buffer after returning true
+
162  return false;
+
163  }
+
164 #endif
+
165  uint32_t size = MAX_MODE_SIZE;
+
166  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
+
167  return false;
+
168  }
+
169  if (!buffer.init(size)) {
+
170  return false;
+
171  }
+
172 #ifdef VORTEX_EMBEDDED
+
173  // read directly into the raw data of the byte array
+
174  memcpy(buffer.rawData(), (const void *)(_storagedata + (slot * MAX_MODE_SIZE)), size);
+
175 #elif defined(_WIN32)
+
176  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
177  if (hFile == INVALID_HANDLE_VALUE) {
+
178  // error
+
179  return false;
+
180  }
+
181  DWORD bytesRead = 0;
+
182  DWORD offset = slot * MAX_MODE_SIZE;
+
183  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
184  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
185  // error
+
186  return false;
+
187  }
+
188  CloseHandle(hFile);
+
189 #else
+
190  FILE *f = fopen(STORAGE_FILENAME, "r");
+
191  if (!f) {
+
192  return false;
+
193  }
+
194  long offset = slot * MAX_MODE_SIZE;
+
195  fseek(f, offset, SEEK_SET);
+
196  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
197  return false;
+
198  }
+
199  fclose(f);
+
200 #endif
+
201  // ensure the internal buffer is sane after reading it out, this
+
202  // prevents segfaults if the internal size reports larger than capacity
+
203  buffer.sanity();
+
204  // check crc immediately since we read into raw data copying the
+
205  // array could be dangerous
+
206  if (!buffer.checkCRC()) {
+
207  buffer.clear();
+
208  ERROR_LOG("Could not verify buffer");
+
209  return false;
+
210  }
+
211  m_lastSaveSize = size;
+
212  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
213  return true;
+
214 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:504
+
#define STORAGE_SIZE
Definition: VortexConfig.h:511
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:507
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
void * rawData() const
Definition: ByteStream.h:121
void clear()
Definition: ByteStream.cpp:107
@@ -347,14 +363,14 @@

void sanity()
Definition: ByteStream.cpp:319

-

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::loadStorage().

+

Referenced by Modes::loadStorage().

- -

◆ write()

+ +

◆ write()

@@ -365,9 +381,19 @@

bool Storage::write ( + uint16_t  + slot, + + + + ByteStream &  - buffer) + buffer  + + + ) + @@ -377,87 +403,107 @@

-

Definition at line 58 of file Storage.cpp.

-
59 {
-
60 #ifdef VORTEX_LIB
-
61  if (!Vortex::storageEnabled()) {
-
62  // success so the system thinks it all worked
-
63  return true;
-
64  }
-
65 #endif
-
66  // check size
-
67  if (buffer.rawSize() > STORAGE_SIZE) {
-
68  ERROR_LOG("Buffer too big for storage space");
-
69  return false;
-
70  }
-
71 #ifdef VORTEX_EMBEDDED
-
72  // clear existing storage
-
73  NVMCTRL->ADDR.reg = ((uint32_t)_storagedata) / 2;
-
74  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
-
75  while (!NVMCTRL->INTFLAG.bit.READY) {}
-
76 
-
77  // set the last save size
-
78  m_lastSaveSize = buffer.size();
-
79 
-
80  // write out the buffer to storage
-
81  // Calculate data boundaries
-
82  uint32_t size = (buffer.rawSize() + 3) / 4;
-
83  volatile uint32_t *dst_addr = (volatile uint32_t *)_storagedata;
-
84  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
-
85 
-
86  // Disable automatic page write
-
87  NVMCTRL->CTRLB.bit.MANW = 1;
-
88 
-
89  // Do writes in pages
-
90  while (size) {
-
91  // Execute "PBC" Page Buffer Clear
-
92  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
-
93  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
94 
-
95  // Fill page buffer
-
96  uint32_t i;
-
97  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
-
98  *dst_addr = *(uint32_t *)(src_addr);
-
99  src_addr += sizeof(uint32_t);
-
100  dst_addr++;
-
101  size--;
-
102  }
-
103 
-
104  // Execute "WP" Write Page
-
105  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
-
106  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
107  }
-
108 #elif defined(_WIN32)
-
109  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
110  if (hFile == INVALID_HANDLE_VALUE) {
-
111  // error
-
112  return false;
-
113  }
-
114  DWORD written = 0;
-
115  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
116  // error
-
117  return false;
-
118  }
-
119  CloseHandle(hFile);
-
120 #else
-
121  FILE *f = fopen(STORAGE_FILENAME, "w");
-
122  if (!f) {
-
123  return false;
+

Definition at line 60 of file Storage.cpp.

+
61 {
+
62 #ifdef VORTEX_LIB
+
63  if (!Vortex::storageEnabled()) {
+
64  // success so the system thinks it all worked
+
65  return true;
+
66  }
+
67 #endif
+
68  // check size
+
69  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
70  ERROR_LOG("Buffer too big for storage space");
+
71  return false;
+
72  }
+
73  if (slot >= NUM_MODE_SLOTS) {
+
74  return false;
+
75  }
+
76  // just in case
+
77  buffer.recalcCRC();
+
78 #ifdef VORTEX_EMBEDDED
+
79  // the target slot to store in
+
80  uint32_t storage_slot = (uint32_t)_storagedata + (slot * MAX_MODE_SIZE);
+
81 
+
82  // Number of rows to erase for one slot
+
83  uint16_t rows_to_erase = MAX_MODE_SIZE / (PAGE_SIZE * 4);
+
84  // Erase only the rows containing the slot
+
85  for (uint16_t i = 0; i < rows_to_erase; ++i) {
+
86  // Set the address for the row to erase
+
87  NVMCTRL->ADDR.reg = (uint32_t)(storage_slot + (i * PAGE_SIZE * 4)) / 2;
+
88  // Execute the erase command
+
89  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
+
90  // Wait for the erase operation to complete
+
91  while (!NVMCTRL->INTFLAG.bit.READY) {}
+
92  }
+
93 
+
94  // set the last save size
+
95  m_lastSaveSize = buffer.size();
+
96 
+
97  // write out the buffer to storage
+
98  // Calculate data boundaries
+
99  uint32_t size = (buffer.rawSize() + 3) / 4;
+
100  volatile uint32_t *dst_addr = (volatile uint32_t *)storage_slot;
+
101  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
+
102 
+
103  // Disable automatic page write
+
104  NVMCTRL->CTRLB.bit.MANW = 1;
+
105 
+
106  // Do writes in pages
+
107  while (size) {
+
108  // Execute "PBC" Page Buffer Clear
+
109  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
+
110  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
+
111 
+
112  // Fill page buffer
+
113  uint32_t i;
+
114  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
+
115  *dst_addr = *(uint32_t *)(src_addr);
+
116  src_addr += sizeof(uint32_t);
+
117  dst_addr++;
+
118  size--;
+
119  }
+
120 
+
121  // Execute "WP" Write Page
+
122  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
+
123  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
124  }
-
125  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
-
126  return false;
-
127  }
-
128  fclose(f);
-
129 #endif // VORTEX_EMBEDDED
-
130  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
131  return true;
-
132 }
-
#define PAGE_SIZE
Definition: Storage.cpp:32
+
125 #elif defined(_WIN32)
+
126  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
127  if (hFile == INVALID_HANDLE_VALUE) {
+
128  // error
+
129  return false;
+
130  }
+
131  DWORD written = 0;
+
132  DWORD offset = slot * MAX_MODE_SIZE;
+
133  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
134  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
135  // error
+
136  return false;
+
137  }
+
138  CloseHandle(hFile);
+
139 #else
+
140  FILE *f = fopen(STORAGE_FILENAME, "w");
+
141  if (!f) {
+
142  return false;
+
143  }
+
144  long offset = slot * MAX_MODE_SIZE;
+
145  fseek(f, offset, SEEK_SET);
+
146  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
147  return false;
+
148  }
+
149  fclose(f);
+
150 #endif // VORTEX_EMBEDDED
+
151  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
152  return true;
+
153 }
+
#define PAGE_SIZE
Definition: Storage.cpp:34
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
uint32_t rawSize() const
Definition: ByteStream.h:122
-

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, PAGE_SIZE, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, PAGE_SIZE, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::recalcCRC(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::saveStorage().

+

Referenced by Modes::saveStorage().

@@ -484,7 +530,7 @@

Definition at line 40 of file Storage.h.

-

Referenced by lastSaveSize(), read(), and write().

+

Referenced by lastSaveSize(), read(), and write().

diff --git a/docs/gloves/classStorage.js b/docs/gloves/classStorage.js index 8d55c03aba..12c499441b 100644 --- a/docs/gloves/classStorage.js +++ b/docs/gloves/classStorage.js @@ -4,7 +4,7 @@ var classStorage = [ "cleanup", "classStorage.html#a2a1ce108c9a17f6175bfb9a9aba51703", null ], [ "init", "classStorage.html#a065812a8dbd82d731291b5aa7ce3edf9", null ], [ "lastSaveSize", "classStorage.html#a79176e030af1f92f563c2b19316fe3dd", null ], - [ "read", "classStorage.html#a5f7d41fcbfbc0840addbaa0345e1594d", null ], - [ "write", "classStorage.html#a28703a07e21e576760f1b84202c55a01", null ], + [ "read", "classStorage.html#a463f451de890486dd483575e47defbc7", null ], + [ "write", "classStorage.html#a97a1b036dedd7b94a91899638c2248c1", null ], [ "m_lastSaveSize", "classStorage.html#ae85ca521ae89c408fb045d2890951458", null ] ]; \ No newline at end of file diff --git a/docs/gloves/classTime.html b/docs/gloves/classTime.html index 1c554ac391..4c22c75688 100644 --- a/docs/gloves/classTime.html +++ b/docs/gloves/classTime.html @@ -311,7 +311,7 @@

References m_curTick, and SIMULATION_TICK.

-

Referenced by Timer::alarm(), ModeSharing::beginSending(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkRange(), Menu::blinkSelection(), SerialComs::checkSerial(), ModeSharing::continueSending(), ModeSharing::init(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveMode(), ModeSharing::run(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), PatternSelect::showListSelection(), ModeSharing::showReceiveMode(), ModeSharing::showSendMode(), Timer::start(), and Button::update().

+

Referenced by Timer::alarm(), ModeSharing::beginSending(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkRange(), Menu::blinkSelection(), SerialComs::checkSerial(), ModeSharing::continueSending(), ModeSharing::init(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveMode(), ModeSharing::run(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), PatternSelect::showListSelection(), ModeSharing::showReceiveMode(), ModeSharing::showSendMode(), Timer::start(), and Button::update().

@@ -424,11 +424,11 @@

68  return true;
69 }
uint64_t start
Definition: TimeControl.cpp:19
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static uint32_t m_firstTime
Definition: TimeControl.h:121
static uint32_t m_prevTime
Definition: TimeControl.h:118
-

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

+

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

Referenced by VortexEngine::init().

@@ -525,7 +525,7 @@

153 #endif
154 }
-

References DEFAULT_TICKRATE.

+

References DEFAULT_TICKRATE.

@@ -590,7 +590,7 @@

110  uint32_t sleepTime = 0;
111  if (required > elapsed_us) {
112  // in vortex lib on linux we can just sleep instead of spinning
-
113  // but on arduino we must spin and on windows it actually ends
+
113  // but on embedded we must spin and on windows it actually ends
114  // up being more accurate to poll QPF + QPC via microseconds()
115  sleepTime = required - elapsed_us;
116  }
diff --git a/docs/gloves/classVortexEngine.html b/docs/gloves/classVortexEngine.html index 929f9eccff..4f5ddeaa20 100644 --- a/docs/gloves/classVortexEngine.html +++ b/docs/gloves/classVortexEngine.html @@ -206,7 +206,7 @@

References VORTEX_VERSION_MAJOR.

-

Referenced by Mode::loadFromBuffer(), and Modes::loadFromBuffer().

+

Referenced by Mode::loadFromBuffer(), and Modes::unserializeSaveHeader().

@@ -236,7 +236,7 @@

Definition at line 87 of file VortexEngine.cpp.

88 {
89  // cleanup in reverse order
-
90  // NOTE: the arduino doesn't actually cleanup,
+
90  // NOTE: the embedded doesn't actually cleanup,
91  // but the test frameworks do
92 #ifdef VORTEX_LIB
@@ -258,11 +258,11 @@

static void cleanup()
Definition: Menus.cpp:77

static void cleanup()
Definition: Modes.cpp:53
static void cleanup()
Definition: Serial.cpp:30
-
static void cleanup()
Definition: Storage.cpp:53
+
static void cleanup()
Definition: Storage.cpp:55
static void cleanup()
Definition: TimeControl.cpp:71
static void cleanup()
Definition: VLSender.cpp:38
-

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), and VLSender::cleanup().

+

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), and VLSender::cleanup().

Referenced by wakeup().

@@ -300,9 +300,9 @@

202  return nullptr;
203 #endif
204 }
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode().

+

References Modes::curMode().

@@ -348,12 +348,12 @@

#define DEBUG_LOG(msg)
Definition: Log.h:40
static void clearAll()
Definition: Leds.h:30
static void update()
Definition: Leds.cpp:306
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static volatile bool m_sleeping
Definition: VortexEngine.h:52
-

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

+

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

@@ -445,11 +445,11 @@

static bool init()
Definition: Menus.cpp:70
static bool init()
Definition: Modes.cpp:30
static bool init()
Definition: Serial.cpp:23
-
static bool init()
Definition: Storage.cpp:43
+
static bool init()
Definition: Storage.cpp:45
static bool init()
Definition: TimeControl.cpp:50
static bool init()
Definition: VLSender.cpp:33
-

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), and VLSender::init().

+

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), and VLSender::init().

Referenced by wakeup().

@@ -522,13 +522,13 @@

static void holdAll(RGBColor col)
Definition: Leds.cpp:252
static bool openMenuSelection()
Definition: Menus.cpp:203
static bool run()
Definition: Menus.cpp:88
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
static void play()
Definition: Modes.cpp:58
static uint32_t lastSwitchTime()
Definition: Modes.h:96
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool m_autoCycle
Definition: VortexEngine.h:55
-

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

+

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

Referenced by tick().

@@ -569,7 +569,7 @@

References ByteStream::serialize(), VORTEX_VERSION_MAJOR, and VORTEX_VERSION_MINOR.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Mode::saveToBuffer(), and Modes::serializeSaveHeader().

diff --git a/docs/gloves/dir_000007_000010.html b/docs/gloves/dir_000007_000010.html index 48966f891f..4c67f05ef7 100644 --- a/docs/gloves/dir_000007_000010.html +++ b/docs/gloves/dir_000007_000010.html @@ -83,7 +83,7 @@ +

Menus → Patterns Relation

File in VortexEngine/src/MenusIncludes file in VortexEngine/src/Patterns
MenuList / EditorConnection.cppPatternArgs.h
MenuList / PatternSelect.cppPattern.h
MenuList / PatternSelect.cppPatternBuilder.h
MenuList / Randomizer.cppPattern.h
MenuList / Randomizer.cppPatternBuilder.h
+

MenuList → Patterns Relation

File in VortexEngine/src/Menus/MenuListIncludes file in VortexEngine/src/Patterns
EditorConnection.cppPatternArgs.h
PatternSelect.cppPattern.h
PatternSelect.cppPatternBuilder.h
Randomizer.cppPattern.h
Randomizer.cppPatternBuilder.h
@@ -138,7 +138,7 @@

Definition at line 11 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -156,7 +156,7 @@

Definition at line 10 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

diff --git a/docs/handle/BlendPattern_8cpp_source.html b/docs/handle/BlendPattern_8cpp_source.html index 2f0a65f417..cc1725a251 100644 --- a/docs/handle/BlendPattern_8cpp_source.html +++ b/docs/handle/BlendPattern_8cpp_source.html @@ -135,7 +135,7 @@
46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -145,7 +145,7 @@
56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/handle/Buttons_8h_source.html b/docs/handle/Buttons_8h_source.html index d22c61f7f9..0a2980ada6 100644 --- a/docs/handle/Buttons_8h_source.html +++ b/docs/handle/Buttons_8h_source.html @@ -92,7 +92,7 @@
3 
4 #include "Button.h"
5 
-
6 // the number of buttons, this isn't an arduino config because
+
6 // the number of buttons, this isn't in VortexConfig.h because
7 // changing it won't really work without updating other things
8 // like which pins the buttons are attached to. So this is more
9 // of a hardcoded constant than a configuration setting
diff --git a/docs/handle/ColorSelect_8cpp_source.html b/docs/handle/ColorSelect_8cpp_source.html index e2838964dc..afd42f0a15 100644 --- a/docs/handle/ColorSelect_8cpp_source.html +++ b/docs/handle/ColorSelect_8cpp_source.html @@ -211,7 +211,7 @@
122  }
123  // reuse these variables lots
124  uint8_t numColors = m_colorset.numColors();
-
125  uint8_t holdDur = g_pButton->holdDuration();
+
125  uint32_t holdDur = g_pButton->holdDuration();
126  switch (m_state) {
127  case STATE_INIT:
128  // nothing
@@ -425,7 +425,7 @@
virtual void init()
Definition: Mode.cpp:120
bool isEmpty() const
Definition: Mode.cpp:735
bool setColorsetMap(LedMap map, const Colorset &set)
Definition: Mode.cpp:616
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
bool empty() const
Definition: ColorTypes.cpp:181
static uint32_t getCurtime()
Definition: TimeControl.h:40
diff --git a/docs/handle/ColorSelect_8h_source.html b/docs/handle/ColorSelect_8h_source.html index bdc90db3aa..b97af1afc9 100644 --- a/docs/handle/ColorSelect_8h_source.html +++ b/docs/handle/ColorSelect_8h_source.html @@ -157,14 +157,14 @@
68 };
69 
70 #endif
-
#define VAL_OPTION_1
Definition: VortexConfig.h:298
-
#define VAL_OPTION_2
Definition: VortexConfig.h:299
-
#define SAT_OPTION_3
Definition: VortexConfig.h:291
-
#define VAL_OPTION_4
Definition: VortexConfig.h:301
-
#define SAT_OPTION_2
Definition: VortexConfig.h:290
-
#define SAT_OPTION_4
Definition: VortexConfig.h:292
-
#define VAL_OPTION_3
Definition: VortexConfig.h:300
-
#define SAT_OPTION_1
Definition: VortexConfig.h:289
+
#define VAL_OPTION_1
Definition: VortexConfig.h:297
+
#define VAL_OPTION_2
Definition: VortexConfig.h:298
+
#define SAT_OPTION_3
Definition: VortexConfig.h:290
+
#define VAL_OPTION_4
Definition: VortexConfig.h:300
+
#define SAT_OPTION_2
Definition: VortexConfig.h:289
+
#define SAT_OPTION_4
Definition: VortexConfig.h:291
+
#define VAL_OPTION_3
Definition: VortexConfig.h:299
+
#define SAT_OPTION_1
Definition: VortexConfig.h:288
const uint8_t vals[4]
Definition: ColorSelect.h:48
bool init() override
Definition: ColorSelect.cpp:37
diff --git a/docs/handle/ColorTypes_8cpp.html b/docs/handle/ColorTypes_8cpp.html index e2b976acb8..f786910e19 100644 --- a/docs/handle/ColorTypes_8cpp.html +++ b/docs/handle/ColorTypes_8cpp.html @@ -363,7 +363,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/handle/ColorTypes_8cpp_source.html b/docs/handle/ColorTypes_8cpp_source.html index d2868c18e3..78b65ff226 100644 --- a/docs/handle/ColorTypes_8cpp_source.html +++ b/docs/handle/ColorTypes_8cpp_source.html @@ -330,7 +330,7 @@
241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/handle/ColorTypes_8h.html b/docs/handle/ColorTypes_8h.html index 9ecb6d64c0..b01428f3ea 100644 --- a/docs/handle/ColorTypes_8h.html +++ b/docs/handle/ColorTypes_8h.html @@ -282,7 +282,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/handle/DefaultModes_8cpp.html b/docs/handle/DefaultModes_8cpp.html index 029833d469..f786e9797f 100644 --- a/docs/handle/DefaultModes_8cpp.html +++ b/docs/handle/DefaultModes_8cpp.html @@ -102,27 +102,27 @@ - - - + + +

Variables

const default_mode_entry default_modes []
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

- +
const default_mode_entry default_modes[]const default_mode_entry default_modes[MAX_MODES]

Definition at line 7 of file DefaultModes.cpp.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -133,14 +133,14 @@

- +
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
diff --git a/docs/handle/DefaultModes_8cpp.js b/docs/handle/DefaultModes_8cpp.js index 6fa5e6eaa9..d71b7f5f31 100644 --- a/docs/handle/DefaultModes_8cpp.js +++ b/docs/handle/DefaultModes_8cpp.js @@ -1,5 +1,5 @@ var DefaultModes_8cpp = [ - [ "default_modes", "DefaultModes_8cpp.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8cpp.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8cpp.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/handle/DefaultModes_8cpp_source.html b/docs/handle/DefaultModes_8cpp_source.html index af1e1633e3..8c8e9449dc 100644 --- a/docs/handle/DefaultModes_8cpp_source.html +++ b/docs/handle/DefaultModes_8cpp_source.html @@ -93,7 +93,7 @@
4 
5 // Here is the array of 'default modes' that are assigned to
6 // the gloveset upon factory reset
- +
8  {
9  PATTERN_STROBE, 5, {
10  RGB_RED,
@@ -144,20 +144,21 @@
55 };
56 
57 // exposed size of the default modes array
-
58 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
+
58 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
#define RGB_BLUE
#define RGB_OFF
#define RGB_RED
#define RGB_GREEN
#define RGB_WHITE
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ PATTERN_STROBE
Definition: Patterns.h:25
@ PATTERN_COMPLEMENTARY_BLEND
Definition: Patterns.h:53
@ PATTERN_GHOSTCRUSH
Definition: Patterns.h:38
@ PATTERN_ULTRADOPS
Definition: Patterns.h:30
@ PATTERN_DASHDOPS
Definition: Patterns.h:42
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
diff --git a/docs/handle/DefaultModes_8h.html b/docs/handle/DefaultModes_8h.html index ad3c726b28..097dedcadb 100644 --- a/docs/handle/DefaultModes_8h.html +++ b/docs/handle/DefaultModes_8h.html @@ -114,14 +114,14 @@ - - + +

Variables

const default_mode_entry default_modes []
 
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

@@ -168,7 +168,7 @@

Definition at line 58 of file DefaultModes.cpp.

-

Referenced by Modes::setDefaults().

+

Referenced by Modes::setDefaults().

diff --git a/docs/handle/DefaultModes_8h.js b/docs/handle/DefaultModes_8h.js index 19b3bcd9a1..471875a243 100644 --- a/docs/handle/DefaultModes_8h.js +++ b/docs/handle/DefaultModes_8h.js @@ -1,6 +1,6 @@ var DefaultModes_8h = [ [ "default_mode_entry", "structdefault__mode__entry.html", "structdefault__mode__entry" ], - [ "default_modes", "DefaultModes_8h.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8h.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8h.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/handle/DefaultModes_8h_source.html b/docs/handle/DefaultModes_8h_source.html index 5758f59c73..3a9038c6a4 100644 --- a/docs/handle/DefaultModes_8h_source.html +++ b/docs/handle/DefaultModes_8h_source.html @@ -102,16 +102,17 @@
13 };
14 
15 // exposed global array of default modes
-
16 extern const default_mode_entry default_modes[];
+
17 
18 // exposed size of the default modes array
19 extern const uint8_t num_default_modes;
20 
21 #endif
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
PatternID
Definition: Patterns.h:12
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
uint32_t cols[MAX_COLOR_SLOTS]
Definition: DefaultModes.h:12
PatternID patternID
Definition: DefaultModes.h:10
diff --git a/docs/handle/EditorConnection_8cpp_source.html b/docs/handle/EditorConnection_8cpp_source.html index 54fb3e503f..1d16579782 100644 --- a/docs/handle/EditorConnection_8cpp_source.html +++ b/docs/handle/EditorConnection_8cpp_source.html @@ -387,18 +387,18 @@
@ LED_ALL
Definition: LedTypes.h:29
#define DEBUG_LOG(msg)
Definition: Log.h:40
@ PATTERN_STROBE
Definition: Patterns.h:25
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:466
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:469
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:492
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:457
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:481
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:465
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:468
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:491
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:456
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:480
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:472
const uint8_t * data() const
Definition: ByteStream.h:120
void * rawData() const
Definition: ByteStream.h:121
@@ -455,9 +455,9 @@
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static bool checkSerial()
Definition: Serial.cpp:40
diff --git a/docs/handle/FactoryReset_8cpp_source.html b/docs/handle/FactoryReset_8cpp_source.html index d077952602..83a488e00b 100644 --- a/docs/handle/FactoryReset_8cpp_source.html +++ b/docs/handle/FactoryReset_8cpp_source.html @@ -167,7 +167,7 @@
78  if (m_advanced) {
79  uint8_t curModeIndex = Modes::curModeIndex();
80  // reset the target mode slot on the target led
-
81  const default_mode_entry &def = default_modes[curModeIndex];
+
81  const default_mode_entry &def = default_modes[curModeIndex];
82  Colorset set(def.numColors, def.cols);
83  Mode *cur = Modes::curMode();
84  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -218,7 +218,7 @@
#define RGB_WHITE0
#define RGB_RED4
#define RGB_WHITE
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ LED_MULTI
Definition: LedTypes.h:35
#define MAP_LED(led)
Definition: LedTypes.h:103
@@ -256,10 +256,10 @@
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static void resetFlags()
Definition: Modes.cpp:590
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static void resetFlags()
Definition: Modes.cpp:659
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
diff --git a/docs/handle/GlobalBrightness_8h_source.html b/docs/handle/GlobalBrightness_8h_source.html index 85f6e119d7..6d6a0add7e 100644 --- a/docs/handle/GlobalBrightness_8h_source.html +++ b/docs/handle/GlobalBrightness_8h_source.html @@ -118,10 +118,10 @@
29 };
30 
31 #endif
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279
MenuAction run() override
const uint8_t m_brightnessOptions[4]
diff --git a/docs/handle/Log_8h_source.html b/docs/handle/Log_8h_source.html index e4ea02ca88..ff8512aae1 100644 --- a/docs/handle/Log_8h_source.html +++ b/docs/handle/Log_8h_source.html @@ -120,7 +120,7 @@
31 #endif
32 
33 #if LOGGING_LEVEL > 2
-
34 // arduino compiler won't allow for ellipsis macro that's passed no args...
+
34 // some compilers won't allow for ellipsis macro that's passed no args...
35 #define DEBUG_LOG(msg) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg)
36 #define DEBUG_LOGF(msg, ...) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg, __VA_ARGS__)
37 // debug messages are only in debug builds so they have full file + func + line info
diff --git a/docs/handle/Memory_8cpp_source.html b/docs/handle/Memory_8cpp_source.html index 25c568bd89..53d63fde15 100644 --- a/docs/handle/Memory_8cpp_source.html +++ b/docs/handle/Memory_8cpp_source.html @@ -235,7 +235,7 @@
#define vfree(ptr)
Definition: Memory.h:35
#define vmalloc(size)
Definition: Memory.h:32
-
#define MAX_MEMORY
Definition: VortexConfig.h:207
+
#define MAX_MEMORY
Definition: VortexConfig.h:206
diff --git a/docs/handle/Menu_8cpp_source.html b/docs/handle/Menu_8cpp_source.html index c5603fbfa9..cb8bb5a7fe 100644 --- a/docs/handle/Menu_8cpp_source.html +++ b/docs/handle/Menu_8cpp_source.html @@ -315,9 +315,9 @@
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static uint8_t numModes()
Definition: Modes.h:92
uint8_t blue
Definition: ColorTypes.h:90
diff --git a/docs/handle/Menus_8cpp.html b/docs/handle/Menus_8cpp.html index 7d34e6ead5..1b88723ea2 100644 --- a/docs/handle/Menus_8cpp.html +++ b/docs/handle/Menus_8cpp.html @@ -270,19 +270,19 @@

ENTRY(FactoryReset, RGB_MENU_FACTORY_RESET),
}
#define ENTRY(classname, color)
Definition: Menus.cpp:49
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:434
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:440
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:443
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:428
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:437
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:425
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:431
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:433
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:439
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:442
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:427
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:436
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:424
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:430
- +

Definition at line 53 of file Menus.cpp.

diff --git a/docs/handle/Menus_8cpp__incl.md5 b/docs/handle/Menus_8cpp__incl.md5 index 45e17c4a80..3c10dd2b4d 100644 --- a/docs/handle/Menus_8cpp__incl.md5 +++ b/docs/handle/Menus_8cpp__incl.md5 @@ -1 +1 @@ -16d49a51ce4fc26c1df4bd46bcc50f3d \ No newline at end of file +ef94412480825982f4c518ea91add3f9 \ No newline at end of file diff --git a/docs/handle/Menus_8cpp__incl.svg b/docs/handle/Menus_8cpp__incl.svg index 576c270bc9..99ffde2282 100644 --- a/docs/handle/Menus_8cpp__incl.svg +++ b/docs/handle/Menus_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -68,151 +68,151 @@ var sectionId = 'dynsection-0'; Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -224,583 +224,577 @@ var sectionId = 'dynsection-0'; - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/handle/Menus_8cpp__incl_org.svg b/docs/handle/Menus_8cpp__incl_org.svg index 95ad42186f..4e90fd3e8b 100644 --- a/docs/handle/Menus_8cpp__incl_org.svg +++ b/docs/handle/Menus_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/Menus.cpp Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -22,151 +22,151 @@ Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -178,583 +178,577 @@ - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/handle/Menus_8cpp_source.html b/docs/handle/Menus_8cpp_source.html index 6ff77f1a1e..420d5fee03 100644 --- a/docs/handle/Menus_8cpp_source.html +++ b/docs/handle/Menus_8cpp_source.html @@ -406,13 +406,13 @@
#define HYPERSTROBE_OFF_DURATION
Definition: Timings.h:36
#define ADV_MENU_DURATION_TICKS
Definition: Timings.h:22
#define ADVANCED_MENU_CLICKS
Definition: VortexConfig.h:71
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:434
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:440
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:443
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:428
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:437
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:425
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:431
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:433
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:439
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:442
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:427
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:436
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:424
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:430
uint32_t holdDuration() const
Definition: Button.h:47
uint32_t pressTime() const
Definition: Button.h:42
bool onShortClick() const
Definition: Button.h:34
@@ -461,7 +461,7 @@
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
static bool advancedMenusEnabled()
Definition: Modes.h:132
- +
uint8_t blue
Definition: ColorTypes.h:90
uint8_t green
Definition: ColorTypes.h:89
diff --git a/docs/handle/ModeSharing_8cpp_source.html b/docs/handle/ModeSharing_8cpp_source.html index cbe45bcdff..048764fb98 100644 --- a/docs/handle/ModeSharing_8cpp_source.html +++ b/docs/handle/ModeSharing_8cpp_source.html @@ -348,8 +348,8 @@
void onLongClick() override
Definition: ModeSharing.cpp:87
void showReceiveMode()
virtual void play()
Definition: Mode.cpp:139
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool loadMode(const Mode *targetMode)
Definition: VLSender.cpp:42
diff --git a/docs/handle/Modes_8cpp_source.html b/docs/handle/Modes_8cpp_source.html index ed7fa57db9..662b32e293 100644 --- a/docs/handle/Modes_8cpp_source.html +++ b/docs/handle/Modes_8cpp_source.html @@ -164,900 +164,969 @@
76 }
77 
-
78 // full save/load to/from buffer
-
79 bool Modes::saveToBuffer(ByteStream &modesBuffer)
-
80 {
-
81  // serialize the engine version into the modes buffer
-
82  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
83  return false;
-
84  }
-
85  // NOTE: instead of global brightness the duo uses this to store the
-
86  // startup mode ID. The duo doesn't offer a global brightness option
-
87  if (!modesBuffer.serialize(m_globalFlags)) {
-
88  return false;
-
89  }
-
90  // serialize the global brightness
-
91  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
92  return false;
-
93  }
-
94  // serialize all modes data into the modesBuffer
-
95  if (!serialize(modesBuffer)) {
-
96  return false;
-
97  }
-
98  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
99  if (!modesBuffer.compress()) {
-
100  return false;
-
101  }
-
102  return true;
-
103 }
-
104 
-
105 // load modes from a save buffer
- -
107 {
-
108  if (!modesBuffer.decompress()) {
-
109  // failed to decompress?
+ +
79 {
+
80  // serialize the engine version into the modes buffer
+
81  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
82  return false;
+
83  }
+
84  // NOTE: instead of global brightness the duo uses this to store the
+
85  // startup mode ID. The duo doesn't offer a global brightness option
+
86  if (!saveBuffer.serialize(m_globalFlags)) {
+
87  return false;
+
88  }
+
89  // serialize the global brightness
+
90  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
91  return false;
+
92  }
+
93  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
94  return true;
+
95 }
+
96 
+ +
98 {
+
99  // reset the unserializer index before unserializing anything
+
100  saveHeader.resetUnserializer();
+
101  uint8_t major = 0;
+
102  uint8_t minor = 0;
+
103  // unserialize the vortex version
+
104  saveHeader.unserialize(&major);
+
105  saveHeader.unserialize(&minor);
+
106  // check the version for incompatibility
+
107  if (!VortexEngine::checkVersion(major, minor)) {
+
108  // incompatible version
+
109  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
110  return false;
111  }
-
112  // reset the unserializer index before unserializing anything
-
113  modesBuffer.resetUnserializer();
-
114  uint8_t major = 0;
-
115  uint8_t minor = 0;
-
116  // unserialize the vortex version
-
117  modesBuffer.unserialize(&major);
-
118  modesBuffer.unserialize(&minor);
-
119  // check the version for incompatibility
-
120  if (!VortexEngine::checkVersion(major, minor)) {
-
121  // incompatible version
-
122  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
123  return false;
-
124  }
-
125  // NOTE: instead of global brightness the duo uses this to store the
-
126  // startup mode ID. The duo doesn't offer a global brightness option
-
127  // unserialize the global brightness
-
128  modesBuffer.unserialize(&m_globalFlags);
-
129  // unserialize the global brightness
-
130  uint8_t brightness = 0;
-
131  modesBuffer.unserialize(&brightness);
-
132  if (brightness) {
-
133  Leds::setBrightness(brightness);
-
134  }
-
135  // now just unserialize the list of modes
-
136  if (!unserialize(modesBuffer)) {
-
137  return false;
-
138  }
-
139  // startupMode is 1-based offset that encodes both the index to start at and
-
140  // whether the system is enabled, hence why 0 cannot be used as an offset
-
141  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
142  if (oneClickModeEnabled() && startupMode > 0) {
-
143  // set the current mode to the startup mode
- -
145  }
-
146  return true;
-
147 }
-
148 
- -
150 {
-
151  // this is good on memory, but it erases what they have stored
-
152  // before we know whether there is something actually saved
-
153  clearModes();
-
154  ByteStream modesBuffer;
-
155  // only read storage if the modebuffer isn't filled
-
156  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
157  DEBUG_LOG("Empty buffer read from storage");
-
158  // this kinda sucks whatever they had loaded is gone
-
159  return false;
-
160  }
-
161  return loadFromBuffer(modesBuffer);
-
162 }
-
163 
-
164 // NOTE: Flash storage is limited to about 10,000 writes so
-
165 // use this function sparingly!
- -
167 {
-
168  DEBUG_LOG("Saving modes...");
-
169  // A ByteStream to hold all the serialized data
-
170  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
171  // save data to the buffer
-
172  if (!saveToBuffer(modesBuffer)) {
-
173  return false;
-
174  }
-
175  // write the serial buffer to flash storage, this
-
176  // will compress the buffer and include crc/flags
-
177  if (!Storage::write(modesBuffer)) {
-
178  DEBUG_LOG("Failed to write storage");
-
179  return false;
-
180  }
-
181  DEBUG_LOG("Success saving modes to storage");
-
182  return true;
-
183 }
-
184 
-
185 // Save all of the modes to a serial buffer
-
186 bool Modes::serialize(ByteStream &modesBuffer)
-
187 {
-
188  // serialize the number of modes
-
189  if (!modesBuffer.serialize(m_numModes)) {
+
112  // NOTE: instead of global brightness the duo uses this to store the
+
113  // startup mode ID. The duo doesn't offer a global brightness option
+
114  // unserialize the global brightness
+
115  saveHeader.unserialize(&m_globalFlags);
+
116  // unserialize the global brightness
+
117  uint8_t brightness = 0;
+
118  saveHeader.unserialize(&brightness);
+
119  if (brightness) {
+
120  Leds::setBrightness(brightness);
+
121  }
+
122  return true;
+
123 }
+
124 
+
125 // full save/load to/from buffer
+
126 bool Modes::saveToBuffer(ByteStream &modesBuffer)
+
127 {
+
128  // first write out the header
+
129  if (!serializeSaveHeader(modesBuffer)) {
+
130  return false;
+
131  }
+
132  // serialize all modes data into the modesBuffer
+
133  if (!serialize(modesBuffer)) {
+
134  return false;
+
135  }
+
136  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
137  if (!modesBuffer.compress()) {
+
138  return false;
+
139  }
+
140  return true;
+
141 }
+
142 
+
143 // load modes from a save buffer
+ +
145 {
+
146  if (!modesBuffer.decompress()) {
+
147  // failed to decompress?
+
148  return false;
+
149  }
+
150  // read out the header first
+
151  if (!unserializeSaveHeader(modesBuffer)) {
+
152  return false;
+
153  }
+
154  // now just unserialize the list of modes
+
155  if (!unserialize(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // startupMode is 1-based offset that encodes both the index to start at and
+
159  // whether the system is enabled, hence why 0 cannot be used as an offset
+
160  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
161  if (oneClickModeEnabled() && startupMode > 0) {
+
162  // set the current mode to the startup mode
+ +
164  }
+
165  return true;
+
166 }
+
167 
+ +
169 {
+
170  ByteStream headerBuffer;
+
171  // only read storage if the modebuffer isn't filled
+
172  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
173  DEBUG_LOG("Empty buffer read from storage");
+
174  // this kinda sucks whatever they had loaded is gone
+
175  return false;
+
176  }
+
177  // this erases what is stored before we know whether there is data
+
178  // but it's the easiest way to just re-load new data from storage
+
179  clearModes();
+
180  // read the header and load the data
+
181  if (!unserializeSaveHeader(headerBuffer)) {
+
182  return false;
+
183  }
+
184  // unserialize the number of modes next
+
185  uint8_t numModes = 0;
+
186  headerBuffer.unserialize(&numModes);
+
187  if (!numModes) {
+
188  DEBUG_LOG("Did not find any modes");
+
189  // this kinda sucks whatever they had loaded is gone
190  return false;
191  }
-
192  // make sure the current mode is saved in case it has changed somehow
-
193  saveCurMode();
-
194  // uninstantiate cur mode so we have stack space to serialize
-
195  if (m_pCurModeLink) {
- -
197  }
-
198  ModeLink *ptr = m_storedModes;
-
199  while (ptr) {
-
200  // instantiate the mode temporarily
-
201  Mode *mode = ptr->instantiate();
-
202  if (!mode) {
- -
204  return false;
-
205  }
-
206  // serialize it into the target modes buffer
-
207  mode->serialize(modesBuffer);
-
208  // just uninstansiate the mode after serializing
-
209  ptr->uninstantiate();
-
210  // next mode
-
211  ptr = ptr->next();
-
212  }
-
213  // reinstanstiate the current mode
- -
215  return false;
-
216  }
-
217  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
218  return true;
-
219 }
-
220 
-
221 // load all modes from a serial buffer
-
222 bool Modes::unserialize(ByteStream &modesBuffer)
-
223 {
-
224  DEBUG_LOG("Loading modes...");
-
225  // this is good on memory, but it erases what they have stored before we
-
226  // know whether there is something actually saved in the serial buffer
-
227  clearModes();
-
228  // unserialize the number of modes next
-
229  uint8_t numModes = 0;
-
230  modesBuffer.unserialize(&numModes);
-
231  if (!numModes) {
-
232  DEBUG_LOG("Did not find any modes");
-
233  // this kinda sucks whatever they had loaded is gone
-
234  return false;
-
235  }
-
236  // foreach expected mode
-
237  for (uint8_t i = 0; i < numModes; ++i) {
-
238  // just copy the serialized mode into the internal storage because
-
239  // we store the modes in a serialized manner so that they are smaller
-
240  // then we unpack them when we instantiate the mode
-
241  if (!addSerializedMode(modesBuffer)) {
-
242  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
243  // clear work so far?
-
244  clearModes();
-
245  return false;
-
246  }
-
247  }
-
248  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
249  return (m_numModes == numModes);
-
250 }
-
251 
- -
253 {
-
254  clearModes();
-
255 #if DEMO_ALL_PATTERNS == 1
-
256  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
257  PatternID default_start = PATTERN_FIRST;
-
258  PatternID default_end = PATTERN_LAST;
-
259  // add 65 randomized modes
-
260  for (int i = 0; i < 65; ++i) {
-
261  Mode tmpMode;
-
262  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
263  // create a random pattern ID from all patterns
- -
265  Colorset randSet;
-
266  randSet.randomize(8);
-
267  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
268  }
-
269  // add another mode with the given pattern and colorset
-
270  if (!addMode(&tmpMode)) {
-
271  ERROR_LOG("Failed to add mode");
-
272  // return false?
-
273  }
-
274  }
-
275  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
276 #else
-
277  // add each default mode with each of the given colors
-
278  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
279  const default_mode_entry &def = default_modes[i];
-
280  Colorset set(def.numColors, def.cols);
-
281  addMode(def.patternID, nullptr, &set);
-
282  }
-
283 #endif
-
284  return true;
-
285 }
-
286 
- -
288 {
-
289 #if MAX_MODES != 0
-
290  if (m_numModes >= MAX_MODES) {
-
291  return false;
-
292  }
-
293 #endif
-
294  // we must unserialize then re-serialize here because the
-
295  // input argument may contain other patterns in the buffer
-
296  // so we cannot just append the input arg to m_storedModes
-
297  Mode tmpMode;
-
298  if (!tmpMode.unserialize(serializedMode)) {
-
299  return false;
-
300  }
-
301  // initialize the mode because a pattern could theoretically serialize
-
302  // differently after it has initialized
-
303  tmpMode.init();
-
304  return addMode(&tmpMode);
-
305 }
-
306 
- -
308 {
-
309 #if MAX_MODES != 0
-
310  if (m_numModes >= MAX_MODES) {
-
311  return false;
-
312  }
-
313 #endif
-
314  if (!m_storedModes->append(serializedMode)) {
- -
316  return false;
-
317  }
-
318  // increment mode counter
-
319  m_numModes++;
-
320  return true;
-
321 }
-
322 
-
323 // shift the current mode to a different position relative to current position
-
324 // negative values for up, positive values for down, 0 for no move
-
325 bool Modes::shiftCurMode(int32_t offset)
-
326 {
-
327  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
328  if (newPos >= m_numModes) {
-
329  return false;
-
330  }
-
331  if (newPos == m_curMode) {
-
332  return true;
-
333  }
-
334  // get the target mode at the position of the shift
-
335  ModeLink *target = getModeLink(newPos);
-
336  if (!target) {
-
337  // invalid new position?
-
338  return false;
-
339  }
-
340  // special case for moving first in list forward
-
341  if (!m_curMode && offset > 0) {
-
342  // update main list ptr
- -
344  }
-
345  // unlink the current link
- -
347  // update the current position to reflect our new pos
-
348  m_curMode = newPos;
-
349  // then re-link the mode at the new spot
-
350  if (offset < 0) {
-
351  // link the link before our target link
-
352  target->linkBefore(m_pCurModeLink);
-
353  // special case for moving into first in list
-
354  if (!m_curMode) {
- -
356  }
-
357  } else {
-
358  // link the link after our target link
-
359  target->linkAfter(m_pCurModeLink);
-
360  }
-
361  return true;
-
362 }
-
363 
- -
365  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
-
366 {
-
367  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
368  return addMode(id, nullptr, &set);
-
369 }
-
370 
-
371 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
-
372 {
-
373  // max modes
-
374 #if MAX_MODES != 0
-
375  if (m_numModes >= MAX_MODES) {
-
376  return false;
-
377  }
-
378 #endif
-
379  if (id >= PATTERN_COUNT) {
+
192  // iterate each mode and read it out of it's storage slot then add it
+
193  for (uint8_t i = 0; i < numModes; ++i) {
+
194  ByteStream modeBuffer(MAX_MODE_SIZE);
+
195  // read each mode from a storage slot and load it
+
196  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
197  return false;
+
198  }
+
199  }
+
200  return true;
+
201 }
+
202 
+
203 // NOTE: Flash storage is limited to about 10,000 writes so
+
204 // use this function sparingly!
+ +
206 {
+
207  DEBUG_LOG("Saving modes...");
+
208  ByteStream headerBuffer(MAX_MODE_SIZE);
+
209  if (!serializeSaveHeader(headerBuffer)) {
+
210  return false;
+
211  }
+
212  // serialize the number of modes
+
213  if (!headerBuffer.serialize(m_numModes)) {
+
214  return false;
+
215  }
+
216  if (!Storage::write(0, headerBuffer)) {
+
217  return false;
+
218  }
+
219  // make sure the current mode is saved in case it has changed somehow
+
220  saveCurMode();
+
221  // uninstantiate cur mode so we have stack space to serialize
+
222  if (m_pCurModeLink) {
+ +
224  }
+
225  uint16_t i = 0;
+
226  ModeLink *ptr = m_storedModes;
+
227  while (ptr && i < MAX_MODES) {
+
228  ByteStream modeBuffer(MAX_MODE_SIZE);
+
229  // instantiate the mode temporarily
+
230  Mode *mode = ptr->instantiate();
+
231  if (!mode) {
+ +
233  return false;
+
234  }
+
235  // serialize it into the target modes buffer
+
236  mode->serialize(modeBuffer);
+
237  // just uninstansiate the mode after serializing
+
238  ptr->uninstantiate();
+
239  // next mode
+
240  ptr = ptr->next();
+
241  // now write this mode into a storage slot (skip first slot, that's header)
+
242  if (!Storage::write(++i, modeBuffer)) {
+
243  return false;
+
244  }
+
245  }
+
246  // reinstanstiate the current mode
+ +
248  return false;
+
249  }
+
250  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
251  return true;
+
252 }
+
253 
+
254 // Save all of the modes to a serial buffer
+
255 bool Modes::serialize(ByteStream &modesBuffer)
+
256 {
+
257  // serialize the number of modes
+
258  if (!modesBuffer.serialize(m_numModes)) {
+
259  return false;
+
260  }
+
261  // make sure the current mode is saved in case it has changed somehow
+
262  saveCurMode();
+
263  // uninstantiate cur mode so we have stack space to serialize
+
264  if (m_pCurModeLink) {
+ +
266  }
+
267  ModeLink *ptr = m_storedModes;
+
268  while (ptr) {
+
269  // instantiate the mode temporarily
+
270  Mode *mode = ptr->instantiate();
+
271  if (!mode) {
+ +
273  return false;
+
274  }
+
275  // serialize it into the target modes buffer
+
276  mode->serialize(modesBuffer);
+
277  // just uninstansiate the mode after serializing
+
278  ptr->uninstantiate();
+
279  // next mode
+
280  ptr = ptr->next();
+
281  }
+
282  // reinstanstiate the current mode
+ +
284  return false;
+
285  }
+
286  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
287  return true;
+
288 }
+
289 
+
290 // load all modes from a serial buffer
+
291 bool Modes::unserialize(ByteStream &modesBuffer)
+
292 {
+
293  DEBUG_LOG("Loading modes...");
+
294  // this is good on memory, but it erases what they have stored before we
+
295  // know whether there is something actually saved in the serial buffer
+
296  clearModes();
+
297  // unserialize the number of modes next
+
298  uint8_t numModes = 0;
+
299  modesBuffer.unserialize(&numModes);
+
300  if (!numModes) {
+
301  DEBUG_LOG("Did not find any modes");
+
302  // this kinda sucks whatever they had loaded is gone
+
303  return false;
+
304  }
+
305  // foreach expected mode
+
306  for (uint8_t i = 0; i < numModes; ++i) {
+
307  // just copy the serialized mode into the internal storage because
+
308  // we store the modes in a serialized manner so that they are smaller
+
309  // then we unpack them when we instantiate the mode
+
310  if (!addSerializedMode(modesBuffer)) {
+
311  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
312  // clear work so far?
+
313  clearModes();
+
314  return false;
+
315  }
+
316  }
+
317  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
318  return (m_numModes == numModes);
+
319 }
+
320 
+ +
322 {
+
323  clearModes();
+
324 #if DEMO_ALL_PATTERNS == 1
+
325  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
326  PatternID default_start = PATTERN_FIRST;
+
327  PatternID default_end = PATTERN_LAST;
+
328  // add 65 randomized modes
+
329  for (int i = 0; i < 65; ++i) {
+
330  Mode tmpMode;
+
331  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
332  // create a random pattern ID from all patterns
+ +
334  Colorset randSet;
+
335  randSet.randomize(8);
+
336  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
337  }
+
338  // add another mode with the given pattern and colorset
+
339  if (!addMode(&tmpMode)) {
+
340  ERROR_LOG("Failed to add mode");
+
341  // return false?
+
342  }
+
343  }
+
344  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
345 #else
+
346  // add each default mode with each of the given colors
+
347  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
348  const default_mode_entry &def = default_modes[i];
+
349  Colorset set(def.numColors, def.cols);
+
350  addMode(def.patternID, nullptr, &set);
+
351  }
+
352 #endif
+
353  return true;
+
354 }
+
355 
+ +
357 {
+
358 #if MAX_MODES != 0
+
359  if (m_numModes >= MAX_MODES) {
+
360  return false;
+
361  }
+
362 #endif
+
363  // we must unserialize then re-serialize here because the
+
364  // input argument may contain other patterns in the buffer
+
365  // so we cannot just append the input arg to m_storedModes
+
366  Mode tmpMode;
+
367  if (!tmpMode.unserialize(serializedMode)) {
+
368  return false;
+
369  }
+
370  // initialize the mode because a pattern could theoretically serialize
+
371  // differently after it has initialized
+
372  tmpMode.init();
+
373  return addMode(&tmpMode);
+
374 }
+
375 
+ +
377 {
+
378 #if MAX_MODES != 0
+
379  if (m_numModes >= MAX_MODES) {
380  return false;
381  }
-
382  Mode tmpMode(id, args, set);
-
383  // must init the mode so that it can be serialized
-
384  tmpMode.init();
-
385  // not a very good way to do this but it ensures the mode is
-
386  // added in the same way
-
387  return addMode(&tmpMode);
-
388 }
-
389 
-
390 bool Modes::addMode(const Mode *mode)
-
391 {
-
392 #if MAX_MODES != 0
-
393  // max modes
-
394  if (m_numModes >= MAX_MODES) {
-
395  return false;
-
396  }
-
397 #endif
-
398  if (!m_storedModes) {
-
399  m_storedModes = new ModeLink(mode);
-
400  if (!m_storedModes) {
- -
402  return false;
-
403  }
-
404  } else {
-
405  if (!m_storedModes->append(mode)) {
- -
407  return false;
-
408  }
-
409  }
-
410  m_numModes++;
-
411  return true;
-
412 }
-
413 
-
414 bool Modes::updateCurMode(const Mode *mode)
-
415 {
-
416  if (!mode) {
-
417  return false;
-
418  }
-
419  Mode *pCur = curMode();
-
420  if (!pCur) {
-
421  return false;
-
422  }
-
423  // utilize copy operator
-
424  *pCur = *mode;
-
425  // immediately save this mode to the internal mode storage
-
426  if (!saveCurMode()) {
-
427  return false;
-
428  }
-
429  // initialize the new mode
-
430  return initCurMode();
+
382 #endif
+
383  if (!m_storedModes->append(serializedMode)) {
+ +
385  return false;
+
386  }
+
387  // increment mode counter
+
388  m_numModes++;
+
389  return true;
+
390 }
+
391 
+
392 // shift the current mode to a different position relative to current position
+
393 // negative values for up, positive values for down, 0 for no move
+
394 bool Modes::shiftCurMode(int32_t offset)
+
395 {
+
396  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
397  if (newPos >= m_numModes) {
+
398  return false;
+
399  }
+
400  if (newPos == m_curMode) {
+
401  return true;
+
402  }
+
403  // get the target mode at the position of the shift
+
404  ModeLink *target = getModeLink(newPos);
+
405  if (!target) {
+
406  // invalid new position?
+
407  return false;
+
408  }
+
409  // special case for moving first in list forward
+
410  if (!m_curMode && offset > 0) {
+
411  // update main list ptr
+ +
413  }
+
414  // unlink the current link
+ +
416  // update the current position to reflect our new pos
+
417  m_curMode = newPos;
+
418  // then re-link the mode at the new spot
+
419  if (offset < 0) {
+
420  // link the link before our target link
+
421  target->linkBefore(m_pCurModeLink);
+
422  // special case for moving into first in list
+
423  if (!m_curMode) {
+ +
425  }
+
426  } else {
+
427  // link the link after our target link
+
428  target->linkAfter(m_pCurModeLink);
+
429  }
+
430  return true;
431 }
432 
-
433 // set the current active mode by index
-
434 Mode *Modes::setCurMode(uint8_t index)
+ +
434  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
435 {
-
436  if (!m_numModes) {
-
437  return nullptr;
-
438  }
-
439  // clear the LEDs when switching modes
-
440  Leds::clearAll();
-
441  // if we have a current mode open, close it
-
442  if (m_pCurModeLink) {
- -
444  }
-
445  int8_t newModeIdx = index % m_numModes;
-
446  // lookup the new mode link
-
447  ModeLink *newCurLink = getModeLink(newModeIdx);
-
448  if (!newCurLink) {
-
449  // what
-
450  return nullptr;
-
451  }
-
452  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
453  Mode *newCur = newCurLink->instantiate();
-
454  if (!newCur) {
- -
456  return nullptr;
-
457  }
-
458  // update to the new mode
-
459  m_curMode = newModeIdx;
-
460  m_pCurModeLink = newCurLink;
-
461  // record the current time as the last switch time
- -
463  // update the global startup mode to be this mode, if we turn off
-
464  // and turn back on into one click mode it will select this one
-
465  Modes::setStartupMode(newModeIdx);
-
466  // log the change
-
467  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
468  m_curMode, m_numModes - 1, newCur->getPatternID());
-
469  // return the new current mode
-
470  return newCur;
-
471 }
-
472 
-
473 // the current mode
- -
475 {
-
476  // empty mode list
-
477  if (!m_numModes) {
-
478  return nullptr;
-
479  }
-
480  if (!m_pCurModeLink) {
-
481  if (!initCurMode()) {
-
482  ERROR_LOG("Failed to initialize current mode");
-
483  return nullptr;
-
484  }
-
485  }
-
486  // get current mode, instantiate it if necessary
-
487  return m_pCurModeLink->instantiate();
-
488 }
-
489 
-
490 // iterate to next mode and return it
- -
492 {
-
493  if (!m_numModes) {
-
494  return nullptr;
-
495  }
-
496  // iterate the cur mode forward
-
497  return setCurMode(m_curMode + 1);
-
498 }
-
499 
-
500 // iterate to previous mode and return it
- -
502 {
-
503  if (!m_numModes) {
-
504  return nullptr;
-
505  }
-
506  // iterate the cur mode backwards
-
507  if (!m_curMode) {
-
508  return setCurMode(numModes() - 1);
-
509  }
-
510  return setCurMode(m_curMode - 1);
-
511 }
-
512 
- -
514 {
-
515  do {
-
516  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
517  break;
-
518  }
-
519  } while (m_curMode != 0);
-
520  return curMode();
-
521 }
-
522 
- -
524 {
-
525  if (!m_numModes || !m_pCurModeLink) {
-
526  return;
-
527  }
-
528  // unlink the current mode so it can be deleted and
-
529  // update the current mode link accordingly
-
530  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
531  delete m_pCurModeLink;
-
532  m_pCurModeLink = newCur;
-
533  if (m_curMode) {
-
534  m_curMode--;
-
535  } else {
- -
537  }
-
538  m_numModes--;
-
539  if (!m_numModes) {
-
540  m_storedModes = nullptr;
-
541  }
-
542 }
-
543 
- -
545 {
-
546  if (!m_numModes || !m_storedModes) {
-
547  return;
+
436  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
437  return addMode(id, nullptr, &set);
+
438 }
+
439 
+
440 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
+
441 {
+
442  // max modes
+
443 #if MAX_MODES != 0
+
444  if (m_numModes >= MAX_MODES) {
+
445  return false;
+
446  }
+
447 #endif
+
448  if (id >= PATTERN_COUNT) {
+
449  return false;
+
450  }
+
451  Mode tmpMode(id, args, set);
+
452  // must init the mode so that it can be serialized
+
453  tmpMode.init();
+
454  // not a very good way to do this but it ensures the mode is
+
455  // added in the same way
+
456  return addMode(&tmpMode);
+
457 }
+
458 
+
459 bool Modes::addMode(const Mode *mode)
+
460 {
+
461 #if MAX_MODES != 0
+
462  // max modes
+
463  if (m_numModes >= MAX_MODES) {
+
464  return false;
+
465  }
+
466 #endif
+
467  if (!m_storedModes) {
+
468  m_storedModes = new ModeLink(mode);
+
469  if (!m_storedModes) {
+ +
471  return false;
+
472  }
+
473  } else {
+
474  if (!m_storedModes->append(mode)) {
+ +
476  return false;
+
477  }
+
478  }
+
479  m_numModes++;
+
480  return true;
+
481 }
+
482 
+
483 bool Modes::updateCurMode(const Mode *mode)
+
484 {
+
485  if (!mode) {
+
486  return false;
+
487  }
+
488  Mode *pCur = curMode();
+
489  if (!pCur) {
+
490  return false;
+
491  }
+
492  // utilize copy operator
+
493  *pCur = *mode;
+
494  // immediately save this mode to the internal mode storage
+
495  if (!saveCurMode()) {
+
496  return false;
+
497  }
+
498  // initialize the new mode
+
499  return initCurMode();
+
500 }
+
501 
+
502 // set the current active mode by index
+
503 Mode *Modes::setCurMode(uint8_t index)
+
504 {
+
505  if (!m_numModes) {
+
506  return nullptr;
+
507  }
+
508  // clear the LEDs when switching modes
+
509  Leds::clearAll();
+
510  // if we have a current mode open, close it
+
511  if (m_pCurModeLink) {
+ +
513  }
+
514  int8_t newModeIdx = index % m_numModes;
+
515  // lookup the new mode link
+
516  ModeLink *newCurLink = getModeLink(newModeIdx);
+
517  if (!newCurLink) {
+
518  // what
+
519  return nullptr;
+
520  }
+
521  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
522  Mode *newCur = newCurLink->instantiate();
+
523  if (!newCur) {
+ +
525  return nullptr;
+
526  }
+
527  // update to the new mode
+
528  m_curMode = newModeIdx;
+
529  m_pCurModeLink = newCurLink;
+
530  // record the current time as the last switch time
+ +
532  // update the global startup mode to be this mode, if we turn off
+
533  // and turn back on into one click mode it will select this one
+
534  Modes::setStartupMode(newModeIdx);
+
535  // log the change
+
536  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
537  m_curMode, m_numModes - 1, newCur->getPatternID());
+
538  // return the new current mode
+
539  return newCur;
+
540 }
+
541 
+
542 // the current mode
+ +
544 {
+
545  // empty mode list
+
546  if (!m_numModes) {
+
547  return nullptr;
548  }
-
549  // delete the first node and it will delete the entire chain
-
550  delete m_storedModes;
-
551  m_pCurModeLink = nullptr;
-
552  m_storedModes = nullptr;
-
553  m_numModes = 0;
-
554  // might as well clear the leds
-
555  Leds::clearAll();
-
556 }
-
557 
-
558 void Modes::setStartupMode(uint8_t index)
-
559 {
-
560  // zero out the upper nibble to disable
-
561  m_globalFlags &= 0x0F;
-
562  // or in the index value shifted into the upper nibble
-
563  m_globalFlags |= (index << 4) & 0xF0;
-
564 }
-
565 
- -
567 {
-
568  // zero out the upper nibble to disable
-
569  return (m_globalFlags & 0xF0) >> 4;
-
570 }
-
571 
-
572 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
-
573 {
-
574  // then actually if it's enabled ensure the upper nibble is set
-
575  if (enable) {
-
576  // set the cur mode index as the upper nibble
-
577  m_globalFlags |= flag;
-
578  } else {
-
579  m_globalFlags &= ~flag;
-
580  }
-
581  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
582  return !save || saveStorage();
-
583 }
-
584 
-
585 bool Modes::getFlag(uint8_t flag)
-
586 {
-
587  return ((m_globalFlags & flag) != 0);
-
588 }
-
589 
- -
591 {
-
592  m_globalFlags = 0;
-
593 }
-
594 
-
595 #ifdef VORTEX_LIB
-
596 #include "Patterns/PatternBuilder.h"
-
597 // get the maximum size a mode can occupy
-
598 uint32_t Modes::maxModeSize()
-
599 {
-
600  Mode maxMode;
-
601  uint8_t x = 0;
-
602  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
603  // blend takes up 8 params
-
604  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
-
605  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
-
606  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
-
607  Colorset maxSet;
-
608  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
609  // different color in each slot
-
610  RGBColor col;
-
611  col.red = ++x;
-
612  col.green = ++x;
-
613  col.blue = ++x;
-
614  maxSet.addColor(col);
-
615  }
-
616  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
549  if (!m_pCurModeLink) {
+
550  if (!initCurMode()) {
+
551  ERROR_LOG("Failed to initialize current mode");
+
552  return nullptr;
+
553  }
+
554  }
+
555  // get current mode, instantiate it if necessary
+
556  return m_pCurModeLink->instantiate();
+
557 }
+
558 
+
559 // iterate to next mode and return it
+ +
561 {
+
562  if (!m_numModes) {
+
563  return nullptr;
+
564  }
+
565  // iterate the cur mode forward
+
566  return setCurMode(m_curMode + 1);
+
567 }
+
568 
+
569 // iterate to previous mode and return it
+ +
571 {
+
572  if (!m_numModes) {
+
573  return nullptr;
+
574  }
+
575  // iterate the cur mode backwards
+
576  if (!m_curMode) {
+
577  return setCurMode(numModes() - 1);
+
578  }
+
579  return setCurMode(m_curMode - 1);
+
580 }
+
581 
+ +
583 {
+
584  do {
+
585  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
586  break;
+
587  }
+
588  } while (m_curMode != 0);
+
589  return curMode();
+
590 }
+
591 
+ +
593 {
+
594  if (!m_numModes || !m_pCurModeLink) {
+
595  return;
+
596  }
+
597  // unlink the current mode so it can be deleted and
+
598  // update the current mode link accordingly
+
599  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
600  delete m_pCurModeLink;
+
601  m_pCurModeLink = newCur;
+
602  if (m_curMode) {
+
603  m_curMode--;
+
604  } else {
+ +
606  }
+
607  m_numModes--;
+
608  if (!m_numModes) {
+
609  m_storedModes = nullptr;
+
610  }
+
611 }
+
612 
+ +
614 {
+
615  if (!m_numModes || !m_storedModes) {
+
616  return;
617  }
-
618  ByteStream stream;
-
619  maxMode.saveToBuffer(stream);
-
620  return stream.size();
-
621 }
-
622 
-
623 // get the maximum size a savefile can occupy
-
624 uint32_t Modes::maxSaveSize()
-
625 {
-
626 #if MAX_MODES == 0
-
627  // unbounded
-
628  return 0;
-
629 #else
-
630  ByteStream backupModes;
-
631  saveToBuffer(backupModes);
-
632  for (uint32_t i = 0; i < MAX_MODES; ++i) {
-
633  Mode maxMode;
-
634  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
635  // blend takes up 8 params
-
636  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
-
637  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
-
638  Colorset maxSet;
-
639  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
640  // different color in each slot
-
641  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
-
642  }
-
643  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
-
644  }
-
645  addMode(&maxMode);
-
646  }
-
647  // grab the size of the new buffer
-
648  ByteStream stream;
-
649  saveToBuffer(stream);
-
650  uint32_t size = stream.size();
-
651  // restore backed up modes
-
652  loadFromBuffer(backupModes);
-
653  return size;
-
654 #endif
-
655 }
-
656 #endif
-
657 
-
658 // fetch a link from the chain by index
- +
618  // delete the first node and it will delete the entire chain
+
619  delete m_storedModes;
+
620  m_pCurModeLink = nullptr;
+
621  m_storedModes = nullptr;
+
622  m_numModes = 0;
+
623  // might as well clear the leds
+
624  Leds::clearAll();
+
625 }
+
626 
+
627 void Modes::setStartupMode(uint8_t index)
+
628 {
+
629  // zero out the upper nibble to disable
+
630  m_globalFlags &= 0x0F;
+
631  // or in the index value shifted into the upper nibble
+
632  m_globalFlags |= (index << 4) & 0xF0;
+
633 }
+
634 
+ +
636 {
+
637  // zero out the upper nibble to disable
+
638  return (m_globalFlags & 0xF0) >> 4;
+
639 }
+
640 
+
641 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
+
642 {
+
643  // then actually if it's enabled ensure the upper nibble is set
+
644  if (enable) {
+
645  // set the cur mode index as the upper nibble
+
646  m_globalFlags |= flag;
+
647  } else {
+
648  m_globalFlags &= ~flag;
+
649  }
+
650  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
651  return !save || saveStorage();
+
652 }
+
653 
+
654 bool Modes::getFlag(uint8_t flag)
+
655 {
+
656  return ((m_globalFlags & flag) != 0);
+
657 }
+
658 
+
660 {
-
661  if (index >= m_numModes) {
-
662  return nullptr;
-
663  }
-
664  ModeLink *ptr = m_storedModes;
-
665  while (index > 0 && ptr) {
-
666  ptr = ptr->next();
-
667  index--;
-
668  }
-
669  return ptr;
-
670 }
-
671 
- -
673 {
-
674  if (!m_numModes) {
-
675  return nullptr;
-
676  }
-
677  // cleanup the current mode link
-
678  if (m_pCurModeLink) {
- -
680  }
-
681  // update the current mode link based on the curmode index
- -
683  if (!m_pCurModeLink) {
-
684  return nullptr;
-
685  }
-
686  if (force) {
- -
688  }
-
689  return m_pCurModeLink->instantiate();
+
661  m_globalFlags = 0;
+
662 }
+
663 
+
664 #ifdef VORTEX_LIB
+
665 #include "Patterns/PatternBuilder.h"
+
666 // get the maximum size a mode can occupy
+
667 uint32_t Modes::maxModeSize()
+
668 {
+
669  Mode maxMode;
+
670  uint8_t x = 0;
+
671  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
672  // blend takes up 8 params
+
673  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
+
674  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
+
675  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
+
676  Colorset maxSet;
+
677  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
678  // different color in each slot
+
679  RGBColor col;
+
680  col.red = ++x;
+
681  col.green = ++x;
+
682  col.blue = ++x;
+
683  maxSet.addColor(col);
+
684  }
+
685  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
686  }
+
687  ByteStream stream;
+
688  maxMode.saveToBuffer(stream);
+
689  return stream.size();
690 }
691 
- -
693 {
-
694  if (!m_pCurModeLink) {
-
695  // if there's no loaded mode currently then there's nothing
-
696  // to save so there's no error
-
697  return false;
-
698  }
-
699  // force the current mode to save back to serial to catch changes
-
700  return m_pCurModeLink->save();
-
701 }
-
702 
-
703 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
-
704  m_pInstantiatedMode(nullptr),
-
705  m_storedMode(),
-
706  m_next(nullptr),
-
707  m_prev(nullptr)
-
708 {
-
709  if (src) {
-
710  init(src);
-
711  }
-
712  if (src && inst) {
-
713  instantiate();
-
714  }
-
715 }
-
716 
-
717 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
-
718  m_pInstantiatedMode(nullptr),
-
719  m_storedMode(src),
-
720  m_next(nullptr),
-
721  m_prev(nullptr)
-
722 {
-
723  if (src.size() && inst) {
-
724  instantiate();
-
725  }
-
726 }
-
727 
- +
692 // get the maximum size a savefile can occupy
+
693 uint32_t Modes::maxSaveSize()
+
694 {
+
695 #if MAX_MODES == 0
+
696  // unbounded
+
697  return 0;
+
698 #else
+
699  ByteStream backupModes;
+
700  saveToBuffer(backupModes);
+
701  for (uint32_t i = 0; i < MAX_MODES; ++i) {
+
702  Mode maxMode;
+
703  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
704  // blend takes up 8 params
+
705  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
+
706  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
+
707  Colorset maxSet;
+
708  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
709  // different color in each slot
+
710  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
+
711  }
+
712  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
713  }
+
714  addMode(&maxMode);
+
715  }
+
716  // grab the size of the new buffer
+
717  ByteStream stream;
+
718  saveToBuffer(stream);
+
719  uint32_t size = stream.size();
+
720  // restore backed up modes
+
721  loadFromBuffer(backupModes);
+
722  return size;
+
723 #endif
+
724 }
+
725 #endif
+
726 
+
727 // fetch a link from the chain by index
+
729 {
-
730  if (m_next) {
-
731  delete m_next;
+
730  if (index >= m_numModes) {
+
731  return nullptr;
732  }
-
733  if (m_pInstantiatedMode) {
-
734  delete m_pInstantiatedMode;
-
735  }
-
736 }
-
737 
-
738 bool Modes::ModeLink::init(const Mode *mode)
-
739 {
-
740  if (!mode) {
-
741  return false;
-
742  }
-
743  m_storedMode.clear();
-
744  // serialize the mode so it can be instantiated anytime
-
745  if (!mode->saveToBuffer(m_storedMode)) {
-
746  return false;
-
747  }
-
748  return true;
-
749 }
-
750 
-
751 bool Modes::ModeLink::append(const Mode *next)
-
752 {
-
753  if (!next) {
-
754  return false;
-
755  }
-
756  // if not end of chain, recurse on next link
-
757  if (m_next) {
-
758  return m_next->append(next);
-
759  }
-
760  m_next = new ModeLink(next);
-
761  if (!m_next) {
- -
763  return false;
-
764  }
-
765  m_next->m_prev = this;
-
766  return true;
-
767 }
-
768 
- -
770 {
-
771  if (!next.size()) {
-
772  return false;
-
773  }
-
774  // if not end of chain, recurse on next link
-
775  if (m_next) {
-
776  return m_next->append(next);
-
777  }
-
778  m_next = new ModeLink(next);
-
779  if (!m_next) {
- -
781  return false;
-
782  }
-
783  m_next->m_prev = this;
-
784  return true;
-
785 }
-
786 
- -
788 {
-
789  if (!m_pInstantiatedMode) {
-
790  return;
-
791  }
-
792  m_pInstantiatedMode->play();
-
793 }
-
794 
- -
796 {
-
797  // unlink this node from the chain
-
798  if (m_prev) {
-
799  m_prev->m_next = m_next;
-
800  }
-
801  if (m_next) {
-
802  m_next->m_prev = m_prev;
-
803  }
-
804  // grab the new link that will take this place
-
805  ModeLink *newLink = m_prev ? m_prev : m_next;
-
806  // clear the links of this node
-
807  m_prev = nullptr;
-
808  m_next = nullptr;
-
809  return newLink;
-
810 }
-
811 
- -
813 {
-
814  if (!link) {
-
815  return;
+
733  ModeLink *ptr = m_storedModes;
+
734  while (index > 0 && ptr) {
+
735  ptr = ptr->next();
+
736  index--;
+
737  }
+
738  return ptr;
+
739 }
+
740 
+ +
742 {
+
743  if (!m_numModes) {
+
744  return nullptr;
+
745  }
+
746  // cleanup the current mode link
+
747  if (m_pCurModeLink) {
+ +
749  }
+
750  // update the current mode link based on the curmode index
+ +
752  if (!m_pCurModeLink) {
+
753  return nullptr;
+
754  }
+
755  if (force) {
+ +
757  }
+
758  return m_pCurModeLink->instantiate();
+
759 }
+
760 
+ +
762 {
+
763  if (!m_pCurModeLink) {
+
764  // if there's no loaded mode currently then there's nothing
+
765  // to save so there's no error
+
766  return false;
+
767  }
+
768  // force the current mode to save back to serial to catch changes
+
769  return m_pCurModeLink->save();
+
770 }
+
771 
+
772 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
+
773  m_pInstantiatedMode(nullptr),
+
774  m_storedMode(),
+
775  m_next(nullptr),
+
776  m_prev(nullptr)
+
777 {
+
778  if (src) {
+
779  init(src);
+
780  }
+
781  if (src && inst) {
+
782  instantiate();
+
783  }
+
784 }
+
785 
+
786 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
+
787  m_pInstantiatedMode(nullptr),
+
788  m_storedMode(src),
+
789  m_next(nullptr),
+
790  m_prev(nullptr)
+
791 {
+
792  if (src.size() && inst) {
+
793  instantiate();
+
794  }
+
795 }
+
796 
+ +
798 {
+
799  if (m_next) {
+
800  delete m_next;
+
801  }
+
802  if (m_pInstantiatedMode) {
+
803  delete m_pInstantiatedMode;
+
804  }
+
805 }
+
806 
+
807 bool Modes::ModeLink::init(const Mode *mode)
+
808 {
+
809  if (!mode) {
+
810  return false;
+
811  }
+
812  m_storedMode.clear();
+
813  // serialize the mode so it can be instantiated anytime
+
814  if (!mode->saveToBuffer(m_storedMode)) {
+
815  return false;
816  }
-
817  if (m_next) {
-
818  m_next->m_prev = link;
-
819  link->m_next = m_next;
-
820  }
-
821  m_next = link;
-
822  link->m_prev = this;
-
823 }
-
824 
- -
826 {
-
827  if (!link) {
-
828  return;
-
829  }
-
830  if (m_prev) {
-
831  m_prev->m_next = link;
-
832  link->m_prev = m_prev;
+
817  return true;
+
818 }
+
819 
+
820 bool Modes::ModeLink::append(const Mode *next)
+
821 {
+
822  if (!next) {
+
823  return false;
+
824  }
+
825  // if not end of chain, recurse on next link
+
826  if (m_next) {
+
827  return m_next->append(next);
+
828  }
+
829  m_next = new ModeLink(next);
+
830  if (!m_next) {
+ +
832  return false;
833  }
-
834  m_prev = link;
-
835  link->m_next = this;
+
834  m_next->m_prev = this;
+
835  return true;
836 }
837 
- +
839 {
-
840  if (m_pInstantiatedMode) {
-
841  return m_pInstantiatedMode;
+
840  if (!next.size()) {
+
841  return false;
842  }
-
843  Mode *newMode = new Mode();
-
844  if (!newMode) {
- -
846  return nullptr;
-
847  }
-
848  m_storedMode.resetUnserializer();
-
849  if (!newMode->loadFromBuffer(m_storedMode)) {
-
850  return nullptr;
+
843  // if not end of chain, recurse on next link
+
844  if (m_next) {
+
845  return m_next->append(next);
+
846  }
+
847  m_next = new ModeLink(next);
+
848  if (!m_next) {
+ +
850  return false;
851  }
-
852  m_pInstantiatedMode = newMode;
-
853  return m_pInstantiatedMode;
+
852  m_next->m_prev = this;
+
853  return true;
854 }
855 
- +
857 {
-
858  if (m_pInstantiatedMode) {
-
859  delete m_pInstantiatedMode;
-
860  m_pInstantiatedMode = nullptr;
-
861  }
+
858  if (!m_pInstantiatedMode) {
+
859  return;
+
860  }
+
861  m_pInstantiatedMode->play();
862 }
863 
- +
865 {
-
866  if (!m_pInstantiatedMode) {
-
867  return false;
-
868  }
-
869  m_storedMode.clear();
-
870  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
-
871 }
-
872 
-
873 #if MODES_TEST == 1
-
874 #include <assert.h>
-
875 #include <stdio.h>
-
876 
-
877 #include "../Patterns/PatternBuilder.h"
-
878 
-
879 void Modes::test()
-
880 {
-
881  INFO_LOG("== Beginning Modes Test ==\n");
-
882 
-
883  RGBColor col = RGB_RED;
-
884  assert(!addMode(PATTERN_COUNT, col));
-
885  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
886  assert(addMode(pat, col));
-
887  }
- -
889  clearModes();
-
890  assert(numModes() == 0);
-
891 
- -
893  assert(!addMode(PATTERN_COUNT, nullptr, &set));
-
894  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
895  assert(addMode(pat, nullptr, &set));
-
896  }
- -
898  clearModes();
-
899  assert(numModes() == 0);
-
900 
-
901  // add a new mode in various different ways
-
902  assert(!addMode(PATTERN_COUNT, col));
- -
904  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
905  Mode tmpMode(pat, nullptr, &set2);
-
906  assert(addMode(&tmpMode));
-
907  }
- -
909  clearModes();
-
910  assert(numModes() == 0);
-
911 
-
912  INFO_LOG("addMode(): success\n");
-
913 
-
914  ByteStream modebuf;
-
915  ByteStream modesave;
-
916  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
-
917  Mode tmpMode(PATTERN_BASIC, &args, &set);
-
918  tmpMode.serialize(modebuf);
-
919  tmpMode.saveToBuffer(modesave);
-
920  assert(addSerializedMode(modebuf));
-
921  assert(numModes() == 1);
-
922  assert(addModeFromBuffer(modesave));
-
923  assert(numModes() == 2);
-
924  assert(getModeLink(0) != nullptr);
-
925  Mode *mode1 = getModeLink(0)->instantiate();
-
926  assert(mode1 != nullptr);
-
927  Mode *mode2 = getModeLink(1)->instantiate();
-
928  assert(mode2 != nullptr);
-
929  assert(mode1->equals(mode2));
-
930 
-
931  INFO_LOG("addSerializedMode(): success\n");
+
866  // unlink this node from the chain
+
867  if (m_prev) {
+
868  m_prev->m_next = m_next;
+
869  }
+
870  if (m_next) {
+
871  m_next->m_prev = m_prev;
+
872  }
+
873  // grab the new link that will take this place
+
874  ModeLink *newLink = m_prev ? m_prev : m_next;
+
875  // clear the links of this node
+
876  m_prev = nullptr;
+
877  m_next = nullptr;
+
878  return newLink;
+
879 }
+
880 
+ +
882 {
+
883  if (!link) {
+
884  return;
+
885  }
+
886  if (m_next) {
+
887  m_next->m_prev = link;
+
888  link->m_next = m_next;
+
889  }
+
890  m_next = link;
+
891  link->m_prev = this;
+
892 }
+
893 
+ +
895 {
+
896  if (!link) {
+
897  return;
+
898  }
+
899  if (m_prev) {
+
900  m_prev->m_next = link;
+
901  link->m_prev = m_prev;
+
902  }
+
903  m_prev = link;
+
904  link->m_next = this;
+
905 }
+
906 
+ +
908 {
+
909  if (m_pInstantiatedMode) {
+
910  return m_pInstantiatedMode;
+
911  }
+
912  Mode *newMode = new Mode();
+
913  if (!newMode) {
+ +
915  return nullptr;
+
916  }
+
917  m_storedMode.resetUnserializer();
+
918  if (!newMode->loadFromBuffer(m_storedMode)) {
+
919  return nullptr;
+
920  }
+
921  m_pInstantiatedMode = newMode;
+
922  return m_pInstantiatedMode;
+
923 }
+
924 
+ +
926 {
+
927  if (m_pInstantiatedMode) {
+
928  delete m_pInstantiatedMode;
+
929  m_pInstantiatedMode = nullptr;
+
930  }
+
931 }
932 
- - -
935  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
-
936  assert(setCurMode(1));
-
937  // update the current mode to match the given mode
-
938  assert(updateCurMode(PATTERN_DOPS, &newset));
-
939  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
- - -
942 
-
943  INFO_LOG("updateCurMode(): success\n");
-
944 
-
945  assert(shiftCurMode(-1));
-
946  assert(m_curMode == 0);
-
947  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
948  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
949  assert(shiftCurMode(0));
-
950  assert(m_curMode == 0);
-
951  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
952  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
953  assert(shiftCurMode(1));
-
954  assert(m_curMode == 1);
-
955  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
956  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
-
957 
-
958  INFO_LOG("shiftCurMode(): success\n");
-
959 
-
960  deleteCurMode();
-
961  assert(m_numModes == 1);
-
962  assert(m_curMode == 0);
-
963  deleteCurMode();
-
964  assert(m_numModes == 0);
-
965  assert(m_curMode == 0);
-
966 
-
967  INFO_LOG("deleteCurMode(): success\n");
-
968 
-
969  INFO_LOG("== Success Running Modes Test ==\n");
-
970 }
-
971 #endif
+ +
934 {
+
935  if (!m_pInstantiatedMode) {
+
936  return false;
+
937  }
+
938  m_storedMode.clear();
+
939  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
+
940 }
+
941 
+
942 #if MODES_TEST == 1
+
943 #include <assert.h>
+
944 #include <stdio.h>
+
945 
+
946 #include "../Patterns/PatternBuilder.h"
+
947 
+
948 void Modes::test()
+
949 {
+
950  INFO_LOG("== Beginning Modes Test ==\n");
+
951 
+
952  RGBColor col = RGB_RED;
+
953  assert(!addMode(PATTERN_COUNT, col));
+
954  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
955  assert(addMode(pat, col));
+
956  }
+ +
958  clearModes();
+
959  assert(numModes() == 0);
+
960 
+ +
962  assert(!addMode(PATTERN_COUNT, nullptr, &set));
+
963  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
964  assert(addMode(pat, nullptr, &set));
+
965  }
+ +
967  clearModes();
+
968  assert(numModes() == 0);
+
969 
+
970  // add a new mode in various different ways
+
971  assert(!addMode(PATTERN_COUNT, col));
+ +
973  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
974  Mode tmpMode(pat, nullptr, &set2);
+
975  assert(addMode(&tmpMode));
+
976  }
+ +
978  clearModes();
+
979  assert(numModes() == 0);
+
980 
+
981  INFO_LOG("addMode(): success\n");
+
982 
+
983  ByteStream modebuf;
+
984  ByteStream modesave;
+
985  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
+
986  Mode tmpMode(PATTERN_BASIC, &args, &set);
+
987  tmpMode.serialize(modebuf);
+
988  tmpMode.saveToBuffer(modesave);
+
989  assert(addSerializedMode(modebuf));
+
990  assert(numModes() == 1);
+
991  assert(addModeFromBuffer(modesave));
+
992  assert(numModes() == 2);
+
993  assert(getModeLink(0) != nullptr);
+
994  Mode *mode1 = getModeLink(0)->instantiate();
+
995  assert(mode1 != nullptr);
+
996  Mode *mode2 = getModeLink(1)->instantiate();
+
997  assert(mode2 != nullptr);
+
998  assert(mode1->equals(mode2));
+
999 
+
1000  INFO_LOG("addSerializedMode(): success\n");
+
1001 
+
1002  Colorset newset(RGB_BLUE, RGB_RED, RGB_GREEN);
+ +
1004  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
+
1005  assert(setCurMode(1));
+
1006  // update the current mode to match the given mode
+
1007  assert(updateCurMode(PATTERN_DOPS, &newset));
+
1008  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
+ + +
1011 
+
1012  INFO_LOG("updateCurMode(): success\n");
+
1013 
+
1014  assert(shiftCurMode(-1));
+
1015  assert(m_curMode == 0);
+
1016  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1017  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1018  assert(shiftCurMode(0));
+
1019  assert(m_curMode == 0);
+
1020  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1021  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1022  assert(shiftCurMode(1));
+
1023  assert(m_curMode == 1);
+
1024  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1025  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1026 
+
1027  INFO_LOG("shiftCurMode(): success\n");
+
1028 
+
1029  deleteCurMode();
+
1030  assert(m_numModes == 1);
+
1031  assert(m_curMode == 0);
+
1032  deleteCurMode();
+
1033  assert(m_numModes == 0);
+
1034  assert(m_curMode == 0);
+
1035 
+
1036  INFO_LOG("deleteCurMode(): success\n");
+
1037 
+
1038  INFO_LOG("== Success Running Modes Test ==\n");
+
1039 }
+
1040 #endif
Button * g_pButton
Definition: Buttons.cpp:16
#define RGB_ORANGE
#define RGB_BLUE
@@ -1067,8 +1136,8 @@
#define RGB_WHITE
#define RGB_YELLOW
#define assert(condition)
Definition: Compression.cpp:68
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:21
@@ -1092,8 +1161,8 @@
@ PATTERN_FIRST
Definition: Patterns.h:18
@ PATTERN_LAST
Definition: Patterns.h:100
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
-
#define MAX_MODES
Definition: VortexConfig.h:168
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define MAX_MODES
Definition: VortexConfig.h:167
bool onShortClick() const
Definition: Button.h:34
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
@@ -1117,67 +1186,69 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
- - - - - - - - - - - - - - - -
static ModeLink * m_storedModes
Definition: Modes.h:220
+ + + + + + + + + + + + + + + +
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:523
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool saveCurMode()
Definition: Modes.cpp:692
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:307
-
static uint8_t startupMode()
Definition: Modes.cpp:566
-
static void resetFlags()
Definition: Modes.cpp:590
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
-
static bool setDefaults()
Definition: Modes.cpp:252
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:325
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void deleteCurMode()
Definition: Modes.cpp:592
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:376
+
static uint8_t startupMode()
Definition: Modes.cpp:635
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static void resetFlags()
Definition: Modes.cpp:659
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
+
static bool setDefaults()
Definition: Modes.cpp:321
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:394
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
-
static void clearModes()
Definition: Modes.cpp:544
-
static Mode * nextMode()
Definition: Modes.cpp:491
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
+
static void clearModes()
Definition: Modes.cpp:613
+
static Mode * nextMode()
Definition: Modes.cpp:560
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:149
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static uint8_t m_curMode
Definition: Modes.h:211
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static Mode * previousMode()
Definition: Modes.cpp:501
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:168
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static uint8_t m_curMode
Definition: Modes.h:214
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
+
static Mode * previousMode()
Definition: Modes.cpp:570
static PatternArgs getDefaultArgs(PatternID id)
uint8_t blue
Definition: ColorTypes.h:90
uint8_t red
Definition: ColorTypes.h:88
uint8_t green
Definition: ColorTypes.h:89
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool serializeVersion(ByteStream &stream)
static bool checkVersion(uint8_t major, uint8_t minor)
diff --git a/docs/handle/Modes_8h_source.html b/docs/handle/Modes_8h_source.html index 1e2799e7e6..9a8ff240ef 100644 --- a/docs/handle/Modes_8h_source.html +++ b/docs/handle/Modes_8h_source.html @@ -241,81 +241,84 @@
152 #endif
153 
154 private:
-
155  // linked list of internal mode storage
-
156  class ModeLink {
-
157  public:
-
158  // construct a link and optionally instantiate the link
-
159  ModeLink(const Mode *src = nullptr, bool inst = false);
-
160  ModeLink(const ByteStream &src, bool inst = false);
-
161  ~ModeLink();
-
162 
-
163  // init the link and append another link
-
164  bool init(const Mode *mode = nullptr);
-
165  bool append(const Mode *next);
-
166  bool append(const ByteStream &next);
-
167 
-
168  // play the instantiated mode inside
-
169  void play();
+
155  static bool serializeSaveHeader(ByteStream &saveBuffer);
+
156  static bool unserializeSaveHeader(ByteStream &saveBuffer);
+
157 
+
158  // linked list of internal mode storage
+
159  class ModeLink {
+
160  public:
+
161  // construct a link and optionally instantiate the link
+
162  ModeLink(const Mode *src = nullptr, bool inst = false);
+
163  ModeLink(const ByteStream &src, bool inst = false);
+
164  ~ModeLink();
+
165 
+
166  // init the link and append another link
+
167  bool init(const Mode *mode = nullptr);
+
168  bool append(const Mode *next);
+
169  bool append(const ByteStream &next);
170 
-
171  // unlink self from the chain, returns link that takes position
-
172  ModeLink *unlinkSelf();
+
171  // play the instantiated mode inside
+
172  void play();
173 
-
174  // link in a node before or after self
-
175  void linkAfter(ModeLink *link);
-
176  void linkBefore(ModeLink *link);
-
177 
-
178  // instantiate/destroy the mode
-
179  Mode *instantiate();
-
180  void uninstantiate();
-
181 
-
182  // if the mode is instantiated and the instantiated version
-
183  // has changed at all then save will re-save it to the buffer
-
184  bool save();
-
185 
-
186  // accessors
- - -
189  ModeLink *next() { return m_next; }
-
190  ModeLink *prev() { return m_prev; }
-
191 
-
192  operator ByteStream &() { return m_storedMode; }
-
193  operator ByteStream() { return m_storedMode; }
-
194  operator Mode *() { return m_pInstantiatedMode; }
-
195  private:
- - - - -
200  };
-
201 
-
202  // fetch a link from the chain by index
-
203  static ModeLink *getModeLink(uint32_t index);
+
174  // unlink self from the chain, returns link that takes position
+
175  ModeLink *unlinkSelf();
+
176 
+
177  // link in a node before or after self
+
178  void linkAfter(ModeLink *link);
+
179  void linkBefore(ModeLink *link);
+
180 
+
181  // instantiate/destroy the mode
+
182  Mode *instantiate();
+
183  void uninstantiate();
+
184 
+
185  // if the mode is instantiated and the instantiated version
+
186  // has changed at all then save will re-save it to the buffer
+
187  bool save();
+
188 
+
189  // accessors
+ + +
192  ModeLink *next() { return m_next; }
+
193  ModeLink *prev() { return m_prev; }
+
194 
+
195  operator ByteStream &() { return m_storedMode; }
+
196  operator ByteStream() { return m_storedMode; }
+
197  operator Mode *() { return m_pInstantiatedMode; }
+
198  private:
+ + + + +
203  };
204 
-
205  // initialize current mode from ByteStream, optionally force re-init which
-
206  // will destroy the current instantiated mode and re-load it from serial
-
207  static Mode *initCurMode(bool force = false);
-
208  static bool saveCurMode();
-
209 
-
210  // the current mode we're on
-
211  static uint8_t m_curMode;
+
205  // fetch a link from the chain by index
+
206  static ModeLink *getModeLink(uint32_t index);
+
207 
+
208  // initialize current mode from ByteStream, optionally force re-init which
+
209  // will destroy the current instantiated mode and re-load it from serial
+
210  static Mode *initCurMode(bool force = false);
+
211  static bool saveCurMode();
212 
-
213  // the number of modes loaded
-
214  static uint8_t m_numModes;
+
213  // the current mode we're on
+
214  static uint8_t m_curMode;
215 
-
216  // the current instantiated mode and it's respective link
- +
216  // the number of modes loaded
+
217  static uint8_t m_numModes;
218 
-
219  // list of serialized version of bufers
- +
219  // the current instantiated mode and it's respective link
+
221 
-
222  // global flags for all modes
-
223  static uint8_t m_globalFlags;
+
222  // list of serialized version of bufers
+
224 
-
225  // the last switch time of the modes
-
226  static uint32_t m_lastSwitchTime;
-
227 };
-
228 
-
229 #endif
+
225  // global flags for all modes
+
226  static uint8_t m_globalFlags;
+
227 
+
228  // the last switch time of the modes
+
229  static uint32_t m_lastSwitchTime;
+
230 };
+
231 
+
232 #endif
#define RGB_OFF
#define MODES_FLAG_LOCKED
Definition: Modes.h:18
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
@@ -325,75 +328,77 @@
Definition: Mode.h:38
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
Definition: Modes.h:29
-
static ModeLink * m_storedModes
Definition: Modes.h:220
+
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:523
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static void deleteCurMode()
Definition: Modes.cpp:592
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static bool saveStorage()
Definition: Modes.cpp:205
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static bool saveCurMode()
Definition: Modes.cpp:692
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:307
-
static uint8_t startupMode()
Definition: Modes.cpp:566
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:376
+
static uint8_t startupMode()
Definition: Modes.cpp:635
static bool setOneClickMode(bool enable, bool save=true)
Definition: Modes.h:115
-
static void resetFlags()
Definition: Modes.cpp:590
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static void resetFlags()
Definition: Modes.cpp:659
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static bool keychainModeEnabled()
Definition: Modes.h:139
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:325
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:394
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static Mode * nextMode()
Definition: Modes.cpp:491
+
static Mode * nextMode()
Definition: Modes.cpp:560
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:149
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:168
static bool advancedMenusEnabled()
Definition: Modes.h:132
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static uint8_t m_curMode
Definition: Modes.h:214
static bool setKeychainMode(bool active, bool save=true)
Definition: Modes.h:136
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static Mode * previousMode()
Definition: Modes.cpp:501
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
+
static Mode * previousMode()
Definition: Modes.cpp:570
diff --git a/docs/handle/PatternBuilder_8cpp_source.html b/docs/handle/PatternBuilder_8cpp_source.html index fd72de109b..bfe61283ee 100644 --- a/docs/handle/PatternBuilder_8cpp_source.html +++ b/docs/handle/PatternBuilder_8cpp_source.html @@ -242,12 +242,12 @@
153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/handle/PatternSelect_8cpp__incl.md5 b/docs/handle/PatternSelect_8cpp__incl.md5 index 7813213c66..c6a36fe221 100644 --- a/docs/handle/PatternSelect_8cpp__incl.md5 +++ b/docs/handle/PatternSelect_8cpp__incl.md5 @@ -1 +1 @@ -d0a4e229d6fc9aa357aaa1a8178c2977 \ No newline at end of file +4944730470c39f71591b563e85e0b8fa \ No newline at end of file diff --git a/docs/handle/PatternSelect_8cpp__incl.svg b/docs/handle/PatternSelect_8cpp__incl.svg index 0943143024..33d8ef621a 100644 --- a/docs/handle/PatternSelect_8cpp__incl.svg +++ b/docs/handle/PatternSelect_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -68,628 +68,622 @@ var sectionId = 'dynsection-0'; Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/PatternArgs.h + +../../Patterns/PatternArgs.h - + Node1->Node14 - - + + Node15 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node15 - - + + Node16 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h - + Node1->Node16 - - + + Node17 - -../Log/Log.h + +../Log/Log.h - + Node1->Node17 - - + + Node19 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node19 - - + + Node20 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node20 - - + + Node21 - -../../Random/Random.h + +../../Random/Random.h - + Node1->Node21 - - + + Node23 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node23 - - + + Node24 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node24 - - + + Node25 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node25 - - + + Node26 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node26 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node4 - - + + - + Node15->Node8 - - + + - + Node15->Node11 - - + + - + Node15->Node12 - - + + - + Node15->Node14 - - + + - + Node16->Node4 - - + + - + Node16->Node17 - - + + - + Node17->Node6 - - + + - + Node17->Node9 - - + + Node18 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node17->Node18 - - + + - + Node18->Node4 - - + + - + Node18->Node6 - - + + - + Node19->Node4 - - + + - + Node19->Node6 - - + + - + Node19->Node8 - - + + - + Node20->Node4 - - + + Node22 - -stdint.h + +stdint.h - + Node21->Node22 - - + + - + Node23->Node6 - - + + - + Node23->Node19 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node6 - - + + - + Node24->Node11 - - + + - + Node24->Node16 - - + + - + Node24->Node25 - - + + - + Node25->Node4 - - + + - + Node25->Node5 - - + + - + Node25->Node8 - - + + - + Node26->Node4 - - + + - + Node26->Node5 - - + + - + Node26->Node8 - - + + - + Node26->Node10 - - + + diff --git a/docs/handle/PatternSelect_8cpp__incl_org.svg b/docs/handle/PatternSelect_8cpp__incl_org.svg index 6c01a5618d..b510df3047 100644 --- a/docs/handle/PatternSelect_8cpp__incl_org.svg +++ b/docs/handle/PatternSelect_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.cpp Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -22,628 +22,622 @@ Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/PatternArgs.h + +../../Patterns/PatternArgs.h - + Node1->Node14 - - + + Node15 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node15 - - + + Node16 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h - + Node1->Node16 - - + + Node17 - -../Log/Log.h + +../Log/Log.h - + Node1->Node17 - - + + Node19 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node19 - - + + Node20 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node20 - - + + Node21 - -../../Random/Random.h + +../../Random/Random.h - + Node1->Node21 - - + + Node23 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node23 - - + + Node24 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node24 - - + + Node25 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node25 - - + + Node26 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node26 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node4 - - + + - + Node15->Node8 - - + + - + Node15->Node11 - - + + - + Node15->Node12 - - + + - + Node15->Node14 - - + + - + Node16->Node4 - - + + - + Node16->Node17 - - + + - + Node17->Node6 - - + + - + Node17->Node9 - - + + Node18 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node17->Node18 - - + + - + Node18->Node4 - - + + - + Node18->Node6 - - + + - + Node19->Node4 - - + + - + Node19->Node6 - - + + - + Node19->Node8 - - + + - + Node20->Node4 - - + + Node22 - -stdint.h + +stdint.h - + Node21->Node22 - - + + - + Node23->Node6 - - + + - + Node23->Node19 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node6 - - + + - + Node24->Node11 - - + + - + Node24->Node16 - - + + - + Node24->Node25 - - + + - + Node25->Node4 - - + + - + Node25->Node5 - - + + - + Node25->Node8 - - + + - + Node26->Node4 - - + + - + Node26->Node5 - - + + - + Node26->Node8 - - + + - + Node26->Node10 - - + + diff --git a/docs/handle/PatternSelect_8cpp_source.html b/docs/handle/PatternSelect_8cpp_source.html index cf1f81edda..b438103fde 100644 --- a/docs/handle/PatternSelect_8cpp_source.html +++ b/docs/handle/PatternSelect_8cpp_source.html @@ -255,14 +255,14 @@
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
- - + +
void onLongClick() override
void onLedSelected() override
bool init() override
-
uint8_t m_argIndex
Definition: PatternSelect.h:31
+
uint8_t m_argIndex
Definition: PatternSelect.h:30
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
void onShortClick() override
diff --git a/docs/handle/PatternSelect_8h.html b/docs/handle/PatternSelect_8h.html index 576eeb2e0c..e16b18b63c 100644 --- a/docs/handle/PatternSelect_8h.html +++ b/docs/handle/PatternSelect_8h.html @@ -91,12 +91,11 @@
Include dependency graph for PatternSelect.h:
-
+
diff --git a/docs/handle/PatternSelect_8h__incl.md5 b/docs/handle/PatternSelect_8h__incl.md5 index 785c554411..0a715a9133 100644 --- a/docs/handle/PatternSelect_8h__incl.md5 +++ b/docs/handle/PatternSelect_8h__incl.md5 @@ -1 +1 @@ -b134790e4ecb9b5af9f544529d10b884 \ No newline at end of file +e80755631e50a604a644cc59be4f4b24 \ No newline at end of file diff --git a/docs/handle/PatternSelect_8h__incl.svg b/docs/handle/PatternSelect_8h__incl.svg index d1c16b1a1c..c492a03cdc 100644 --- a/docs/handle/PatternSelect_8h__incl.svg +++ b/docs/handle/PatternSelect_8h__incl.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.h Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h @@ -22,217 +22,211 @@ Node2 - -../Menu.h + +../Menu.h Node1->Node2 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h - -Node1->Node9 - - - - - -Node10 - - -../Patterns/Patterns.h - - - - -Node1->Node10 - - +Node1->Node9 + + Node11 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node1->Node11 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + + + + +Node10 + + +../Patterns/Patterns.h + + Node9->Node10 - - + + Node10->Node3 - - + + Node11->Node4 - - + + Node11->Node5 - - + + diff --git a/docs/handle/PatternSelect_8h_source.html b/docs/handle/PatternSelect_8h_source.html index 7c9dd91034..c95f1ffb65 100644 --- a/docs/handle/PatternSelect_8h_source.html +++ b/docs/handle/PatternSelect_8h_source.html @@ -93,49 +93,48 @@
4 #include "../Menu.h"
5 
6 #include "../../Colors/Colorset.h"
-
7 #include "../../Patterns/Patterns.h"
-
8 #include "../../Modes/Mode.h"
-
9 
-
10 class PatternSelect : public Menu
-
11 {
-
12 public:
-
13  PatternSelect(const RGBColor &col, bool advanced);
- -
15 
-
16  bool init() override;
-
17  MenuAction run() override;
-
18 
-
19  // callback after the user selects the target led
-
20  void onLedSelected() override;
-
21 
-
22  // handlers for clicks
-
23  void onShortClick() override;
-
24  void onLongClick() override;
-
25 
-
26 private:
-
27  // helpful member
- -
29 
-
30  // used for adv pat select
-
31  uint8_t m_argIndex;
-
32 
-
33  // the pat select starts by showing the current pattern
-
34  // then the first click begin cycling the list of pats
-
35  bool m_started;
-
36 };
-
37 
-
38 #endif
+
7 #include "../../Modes/Mode.h"
+
8 
+
9 class PatternSelect : public Menu
+
10 {
+
11 public:
+
12  PatternSelect(const RGBColor &col, bool advanced);
+ +
14 
+
15  bool init() override;
+
16  MenuAction run() override;
+
17 
+
18  // callback after the user selects the target led
+
19  void onLedSelected() override;
+
20 
+
21  // handlers for clicks
+
22  void onShortClick() override;
+
23  void onLongClick() override;
+
24 
+
25 private:
+
26  // helpful member
+ +
28 
+
29  // used for adv pat select
+
30  uint8_t m_argIndex;
+
31 
+
32  // the pat select starts by showing the current pattern
+
33  // then the first click begin cycling the list of pats
+
34  bool m_started;
+
35 };
+
36 
+
37 #endif
LedPos
Definition: LedTypes.h:11
Definition: Menu.h:11
MenuAction
Definition: Menu.h:19
- + - - + +
void onLongClick() override
void onLedSelected() override
bool init() override
-
uint8_t m_argIndex
Definition: PatternSelect.h:31
+
uint8_t m_argIndex
Definition: PatternSelect.h:30
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
void onShortClick() override
diff --git a/docs/handle/Patterns_8h__dep__incl.md5 b/docs/handle/Patterns_8h__dep__incl.md5 index 1033ee9c48..2a0cec6c38 100644 --- a/docs/handle/Patterns_8h__dep__incl.md5 +++ b/docs/handle/Patterns_8h__dep__incl.md5 @@ -1 +1 @@ -e68a2973410d50e03e79205436f3cc94 \ No newline at end of file +f61abfe1829e56d257be14bbf407be61 \ No newline at end of file diff --git a/docs/handle/Patterns_8h__dep__incl.svg b/docs/handle/Patterns_8h__dep__incl.svg index f694f4cb3f..9b0e88b4e8 100644 --- a/docs/handle/Patterns_8h__dep__incl.svg +++ b/docs/handle/Patterns_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,1160 +58,1154 @@ var sectionId = 'dynsection-1'; Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - - - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h - +Node6->Node13 + + - - - -Node9->Node14 - - - - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node15 - - + + +Node6->Node18 + + - - -Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - + -Node9->Node20 - - +Node6->Node19 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + - + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + + + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + - + + +Node14->Node11 + + + + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + + + + +Node20 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + + + + +Node23->Node11 + + - + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - + Node39->Node3 - - + + - - -Node39->Node6 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node10 + + - - -Node39->Node13 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/handle/Patterns_8h__dep__incl_org.svg b/docs/handle/Patterns_8h__dep__incl_org.svg index 4c42ad502f..3dd828105b 100644 --- a/docs/handle/Patterns_8h__dep__incl_org.svg +++ b/docs/handle/Patterns_8h__dep__incl_org.svg @@ -4,1168 +4,1162 @@ - + VortexEngine/src/Patterns/Patterns.h Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - - - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h - +Node6->Node13 + + - - - -Node9->Node14 - - - - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node15 - - + + +Node6->Node18 + + - - -Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - + -Node9->Node20 - - +Node6->Node19 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + - + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + + + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + - + + +Node14->Node11 + + + + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + + + + +Node20 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + + + + +Node23->Node11 + + - + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - + Node39->Node3 - - + + - - -Node39->Node6 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node10 + + - - -Node39->Node13 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/handle/Randomizer_8cpp_source.html b/docs/handle/Randomizer_8cpp_source.html index c2bbfac2eb..69dee90f69 100644 --- a/docs/handle/Randomizer_8cpp_source.html +++ b/docs/handle/Randomizer_8cpp_source.html @@ -458,8 +458,8 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
uint8_t arg7
Definition: PatternArgs.h:89
diff --git a/docs/handle/Storage_8cpp.html b/docs/handle/Storage_8cpp.html index 57f9e89012..42a6bc9aba 100644 --- a/docs/handle/Storage_8cpp.html +++ b/docs/handle/Storage_8cpp.html @@ -97,7 +97,6 @@ #include "../Memory/Memory.h"
#include "../Serial/ByteStream.h"
#include "../Log/Log.h"
-#include <unistd.h>
#include <Arduino.h>
Include dependency graph for Storage.cpp:
@@ -135,7 +134,7 @@

-

Definition at line 21 of file Storage.cpp.

+

Definition at line 23 of file Storage.cpp.

@@ -151,7 +150,7 @@

-

Definition at line 32 of file Storage.cpp.

+

Definition at line 34 of file Storage.cpp.

@@ -167,7 +166,7 @@

-

Definition at line 27 of file Storage.cpp.

+

Definition at line 29 of file Storage.cpp.

diff --git a/docs/handle/Storage_8cpp__incl.md5 b/docs/handle/Storage_8cpp__incl.md5 index ce4e21bebd..82c57d4023 100644 --- a/docs/handle/Storage_8cpp__incl.md5 +++ b/docs/handle/Storage_8cpp__incl.md5 @@ -1 +1 @@ -30abeadf33f54ab158fcaf6708aa72a4 \ No newline at end of file +34956bc2a5d1f8bb2547797f76a8714a \ No newline at end of file diff --git a/docs/handle/Storage_8cpp__incl.svg b/docs/handle/Storage_8cpp__incl.svg index 038012fc7c..b907c73d89 100644 --- a/docs/handle/Storage_8cpp__incl.svg +++ b/docs/handle/Storage_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -76,236 +76,221 @@ var sectionId = 'dynsection-0'; Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - -unistd.h + +Arduino.h Node1->Node13 - - - - - -Node14 - - -Arduino.h - - - - - -Node1->Node14 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/handle/Storage_8cpp__incl_org.svg b/docs/handle/Storage_8cpp__incl_org.svg index 9d42d41281..f9bca53760 100644 --- a/docs/handle/Storage_8cpp__incl_org.svg +++ b/docs/handle/Storage_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Storage/Storage.cpp Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -30,236 +30,221 @@ Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - -unistd.h + +Arduino.h Node1->Node13 - - - - - -Node14 - - -Arduino.h - - - - - -Node1->Node14 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/handle/Storage_8cpp_source.html b/docs/handle/Storage_8cpp_source.html index c1263d961e..47cb4ce84f 100644 --- a/docs/handle/Storage_8cpp_source.html +++ b/docs/handle/Storage_8cpp_source.html @@ -101,208 +101,236 @@
12 #include "VortexLib.h"
13 #endif
14 
-
15 #ifdef _WIN32
-
16 #include <Windows.h>
-
17 #else
-
18 #include <unistd.h>
-
19 #endif
-
20 
-
21 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
15 #ifndef VORTEX_EMBEDDED
+
16 #ifdef _WIN32
+
17 #include <Windows.h>
+
18 #else
+
19 #include <unistd.h>
+
20 #endif
+
21 #endif
22 
-
23 #ifdef VORTEX_LIB
-
24 std::string Storage::m_storageFilename;
-
25 #define STORAGE_FILENAME m_storageFilename.c_str()
-
26 #else
-
27 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
-
28 #endif
-
29 
-
30 #ifdef VORTEX_EMBEDDED
-
31 #include <Arduino.h>
-
32 #define PAGE_SIZE 64
-
33 __attribute__((__aligned__(256)))
-
34 const uint8_t _storagedata[(STORAGE_SIZE+255)/256*256] = { };
-
35 #endif
-
36 
-
37 uint32_t Storage::m_lastSaveSize = 0;
+
23 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
24 
+
25 #ifdef VORTEX_LIB
+
26 std::string Storage::m_storageFilename;
+
27 #define STORAGE_FILENAME m_storageFilename.c_str()
+
28 #else
+
29 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
+
30 #endif
+
31 
+
32 #ifdef VORTEX_EMBEDDED
+
33 #include <Arduino.h>
+
34 #define PAGE_SIZE 64
+
35 __attribute__((__aligned__(256)))
+
36 const uint8_t _storagedata[(STORAGE_SIZE+255)/256*256] = { };
+
37 #endif
38 
- -
40 {
-
41 }
-
42 
- -
44 {
-
45 #ifdef VORTEX_LIB
-
46  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
47  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
48  }
-
49 #endif
-
50  return true;
-
51 }
-
52 
- -
54 {
-
55 }
-
56 
-
57 // store a serial buffer to storage
- -
59 {
-
60 #ifdef VORTEX_LIB
-
61  if (!Vortex::storageEnabled()) {
-
62  // success so the system thinks it all worked
-
63  return true;
-
64  }
-
65 #endif
-
66  // check size
-
67  if (buffer.rawSize() > STORAGE_SIZE) {
-
68  ERROR_LOG("Buffer too big for storage space");
-
69  return false;
-
70  }
-
71 #ifdef VORTEX_EMBEDDED
-
72  // clear existing storage
-
73  NVMCTRL->ADDR.reg = ((uint32_t)_storagedata) / 2;
-
74  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
-
75  while (!NVMCTRL->INTFLAG.bit.READY) {}
-
76 
-
77  // set the last save size
-
78  m_lastSaveSize = buffer.size();
-
79 
-
80  // write out the buffer to storage
-
81  // Calculate data boundaries
-
82  uint32_t size = (buffer.rawSize() + 3) / 4;
-
83  volatile uint32_t *dst_addr = (volatile uint32_t *)_storagedata;
-
84  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
-
85 
-
86  // Disable automatic page write
-
87  NVMCTRL->CTRLB.bit.MANW = 1;
-
88 
-
89  // Do writes in pages
-
90  while (size) {
-
91  // Execute "PBC" Page Buffer Clear
-
92  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
-
93  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
94 
-
95  // Fill page buffer
-
96  uint32_t i;
-
97  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
-
98  *dst_addr = *(uint32_t *)(src_addr);
-
99  src_addr += sizeof(uint32_t);
-
100  dst_addr++;
-
101  size--;
-
102  }
-
103 
-
104  // Execute "WP" Write Page
-
105  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
-
106  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
107  }
-
108 #elif defined(_WIN32)
-
109  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
110  if (hFile == INVALID_HANDLE_VALUE) {
-
111  // error
-
112  return false;
-
113  }
-
114  DWORD written = 0;
-
115  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
116  // error
-
117  return false;
-
118  }
-
119  CloseHandle(hFile);
-
120 #else
-
121  FILE *f = fopen(STORAGE_FILENAME, "w");
-
122  if (!f) {
-
123  return false;
+
39 uint32_t Storage::m_lastSaveSize = 0;
+
40 
+ +
42 {
+
43 }
+
44 
+ +
46 {
+
47 #ifdef VORTEX_LIB
+
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
50  }
+
51 #endif
+
52  return true;
+
53 }
+
54 
+ +
56 {
+
57 }
+
58 
+
59 // store a serial buffer to storage
+
60 bool Storage::write(uint16_t slot, ByteStream &buffer)
+
61 {
+
62 #ifdef VORTEX_LIB
+
63  if (!Vortex::storageEnabled()) {
+
64  // success so the system thinks it all worked
+
65  return true;
+
66  }
+
67 #endif
+
68  // check size
+
69  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
70  ERROR_LOG("Buffer too big for storage space");
+
71  return false;
+
72  }
+
73  if (slot >= NUM_MODE_SLOTS) {
+
74  return false;
+
75  }
+
76  // just in case
+
77  buffer.recalcCRC();
+
78 #ifdef VORTEX_EMBEDDED
+
79  // the target slot to store in
+
80  uint32_t storage_slot = (uint32_t)_storagedata + (slot * MAX_MODE_SIZE);
+
81 
+
82  // Number of rows to erase for one slot
+
83  uint16_t rows_to_erase = MAX_MODE_SIZE / (PAGE_SIZE * 4);
+
84  // Erase only the rows containing the slot
+
85  for (uint16_t i = 0; i < rows_to_erase; ++i) {
+
86  // Set the address for the row to erase
+
87  NVMCTRL->ADDR.reg = (uint32_t)(storage_slot + (i * PAGE_SIZE * 4)) / 2;
+
88  // Execute the erase command
+
89  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
+
90  // Wait for the erase operation to complete
+
91  while (!NVMCTRL->INTFLAG.bit.READY) {}
+
92  }
+
93 
+
94  // set the last save size
+
95  m_lastSaveSize = buffer.size();
+
96 
+
97  // write out the buffer to storage
+
98  // Calculate data boundaries
+
99  uint32_t size = (buffer.rawSize() + 3) / 4;
+
100  volatile uint32_t *dst_addr = (volatile uint32_t *)storage_slot;
+
101  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
+
102 
+
103  // Disable automatic page write
+
104  NVMCTRL->CTRLB.bit.MANW = 1;
+
105 
+
106  // Do writes in pages
+
107  while (size) {
+
108  // Execute "PBC" Page Buffer Clear
+
109  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
+
110  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
+
111 
+
112  // Fill page buffer
+
113  uint32_t i;
+
114  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
+
115  *dst_addr = *(uint32_t *)(src_addr);
+
116  src_addr += sizeof(uint32_t);
+
117  dst_addr++;
+
118  size--;
+
119  }
+
120 
+
121  // Execute "WP" Write Page
+
122  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
+
123  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
124  }
-
125  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
-
126  return false;
-
127  }
-
128  fclose(f);
-
129 #endif // VORTEX_EMBEDDED
-
130  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
131  return true;
-
132 }
-
133 
-
134 // read a serial buffer from storage
- -
136 {
-
137 #ifdef VORTEX_LIB
-
138  if (!Vortex::storageEnabled()) {
-
139  // return false here, but true in write because we don't want to return
-
140  // an empty buffer after returning true
-
141  return false;
-
142  }
-
143 #endif
-
144  uint32_t size = STORAGE_SIZE;
-
145  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
146  return false;
-
147  }
-
148  if (!buffer.init(size)) {
-
149  return false;
-
150  }
-
151 #ifdef VORTEX_EMBEDDED
-
152  // read directly into the raw data of the byte array
-
153  memcpy(buffer.rawData(), (const void *)_storagedata, size);
-
154 #elif defined(_WIN32)
-
155  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
156  if (hFile == INVALID_HANDLE_VALUE) {
-
157  // error
-
158  return false;
-
159  }
-
160  DWORD bytesRead = 0;
-
161  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
162  // error
-
163  return false;
-
164  }
-
165  CloseHandle(hFile);
-
166 #else
-
167  FILE *f = fopen(STORAGE_FILENAME, "r");
-
168  if (!f) {
-
169  return false;
-
170  }
-
171  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
172  return false;
-
173  }
-
174  fclose(f);
-
175 #endif
-
176  // ensure the internal buffer is sane after reading it out, this
-
177  // prevents segfaults if the internal size reports larger than capacity
-
178  buffer.sanity();
-
179  // check crc immediately since we read into raw data copying the
-
180  // array could be dangerous
-
181  if (!buffer.checkCRC()) {
-
182  buffer.clear();
-
183  ERROR_LOG("Could not verify buffer");
-
184  return false;
-
185  }
-
186  m_lastSaveSize = size;
-
187  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
188  return true;
-
189 }
-
190 
- -
192 {
-
193  return m_lastSaveSize;
-
194 }
+
125 #elif defined(_WIN32)
+
126  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
127  if (hFile == INVALID_HANDLE_VALUE) {
+
128  // error
+
129  return false;
+
130  }
+
131  DWORD written = 0;
+
132  DWORD offset = slot * MAX_MODE_SIZE;
+
133  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
134  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
135  // error
+
136  return false;
+
137  }
+
138  CloseHandle(hFile);
+
139 #else
+
140  FILE *f = fopen(STORAGE_FILENAME, "w");
+
141  if (!f) {
+
142  return false;
+
143  }
+
144  long offset = slot * MAX_MODE_SIZE;
+
145  fseek(f, offset, SEEK_SET);
+
146  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
147  return false;
+
148  }
+
149  fclose(f);
+
150 #endif // VORTEX_EMBEDDED
+
151  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
152  return true;
+
153 }
+
154 
+
155 // read a serial buffer from storage
+
156 bool Storage::read(uint16_t slot, ByteStream &buffer)
+
157 {
+
158 #ifdef VORTEX_LIB
+
159  if (!Vortex::storageEnabled()) {
+
160  // return false here, but true in write because we don't want to return
+
161  // an empty buffer after returning true
+
162  return false;
+
163  }
+
164 #endif
+
165  uint32_t size = MAX_MODE_SIZE;
+
166  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
+
167  return false;
+
168  }
+
169  if (!buffer.init(size)) {
+
170  return false;
+
171  }
+
172 #ifdef VORTEX_EMBEDDED
+
173  // read directly into the raw data of the byte array
+
174  memcpy(buffer.rawData(), (const void *)(_storagedata + (slot * MAX_MODE_SIZE)), size);
+
175 #elif defined(_WIN32)
+
176  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
177  if (hFile == INVALID_HANDLE_VALUE) {
+
178  // error
+
179  return false;
+
180  }
+
181  DWORD bytesRead = 0;
+
182  DWORD offset = slot * MAX_MODE_SIZE;
+
183  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
184  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
185  // error
+
186  return false;
+
187  }
+
188  CloseHandle(hFile);
+
189 #else
+
190  FILE *f = fopen(STORAGE_FILENAME, "r");
+
191  if (!f) {
+
192  return false;
+
193  }
+
194  long offset = slot * MAX_MODE_SIZE;
+
195  fseek(f, offset, SEEK_SET);
+
196  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
197  return false;
+
198  }
+
199  fclose(f);
+
200 #endif
+
201  // ensure the internal buffer is sane after reading it out, this
+
202  // prevents segfaults if the internal size reports larger than capacity
+
203  buffer.sanity();
+
204  // check crc immediately since we read into raw data copying the
+
205  // array could be dangerous
+
206  if (!buffer.checkCRC()) {
+
207  buffer.clear();
+
208  ERROR_LOG("Could not verify buffer");
+
209  return false;
+
210  }
+
211  m_lastSaveSize = size;
+
212  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
213  return true;
+
214 }
+
215 
+ +
217 {
+
218  return m_lastSaveSize;
+
219 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define PAGE_SIZE
Definition: Storage.cpp:32
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define PAGE_SIZE
Definition: Storage.cpp:34
__attribute__((__aligned__(256))) const uint8_t _storagedata[(STORAGE_SIZE+255)/256 *256]
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:502
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
void * rawData() const
Definition: ByteStream.h:121
uint32_t rawSize() const
Definition: ByteStream.h:122
void clear()
Definition: ByteStream.cpp:107
uint32_t size() const
Definition: ByteStream.h:123
bool checkCRC() const
Definition: ByteStream.cpp:327
void sanity()
Definition: ByteStream.cpp:319
-
static bool init()
Definition: Storage.cpp:43
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static void cleanup()
Definition: Storage.cpp:53
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
-
Storage()
Definition: Storage.cpp:39
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
+
Storage()
Definition: Storage.cpp:41
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/handle/Storage_8h_source.html b/docs/handle/Storage_8h_source.html index 217d4da398..ab1b6d07e4 100644 --- a/docs/handle/Storage_8h_source.html +++ b/docs/handle/Storage_8h_source.html @@ -108,9 +108,9 @@
19  static void cleanup();
20 
21  // store a serial buffer to storage
-
22  static bool write(ByteStream &buffer);
+
22  static bool write(uint16_t slot, ByteStream &buffer);
23  // read a serial buffer from storage
-
24  static bool read(ByteStream &buffer);
+
24  static bool read(uint16_t slot, ByteStream &buffer);
25 
26  // the last save size (use STORAGE_SIZE For total space)
27  static uint32_t lastSaveSize();
@@ -132,12 +132,12 @@
43 #endif
-
static bool init()
Definition: Storage.cpp:43
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static void cleanup()
Definition: Storage.cpp:53
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
-
Storage()
Definition: Storage.cpp:39
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
+
Storage()
Definition: Storage.cpp:41
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/handle/TimeControl_8cpp_source.html b/docs/handle/TimeControl_8cpp_source.html index 7520e64fae..4900dec198 100644 --- a/docs/handle/TimeControl_8cpp_source.html +++ b/docs/handle/TimeControl_8cpp_source.html @@ -199,7 +199,7 @@
110  uint32_t sleepTime = 0;
111  if (required > elapsed_us) {
112  // in vortex lib on linux we can just sleep instead of spinning
-
113  // but on arduino we must spin and on windows it actually ends
+
113  // but on embedded we must spin and on windows it actually ends
114  // up being more accurate to poll QPF + QPC via microseconds()
115  sleepTime = required - elapsed_us;
116  }
@@ -423,7 +423,7 @@
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static bool init()
Definition: TimeControl.cpp:50
static void delayMicroseconds(uint32_t us)
static uint32_t getRealCurtime()
diff --git a/docs/handle/Timings_8h_source.html b/docs/handle/Timings_8h_source.html index 941ed01628..28b9a3ace2 100644 --- a/docs/handle/Timings_8h_source.html +++ b/docs/handle/Timings_8h_source.html @@ -98,17 +98,17 @@
9 // through the MS_TO_TICKS macro which calculates the corresponding number of ticks for
10 // the given duration at the current tickrate, on embedded this is 1 to 1 but in vortexlib
11 // the tickrate can be adjusted so these will expand out to function calls to millisecondsToTicks()
-
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
-
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
-
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
-
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
-
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
-
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
-
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
-
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
-
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
-
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
-
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
+
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
+
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
+
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
+
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
+
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
+
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
+
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
+
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
+
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
+
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
+
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
23 
24 // Strobe Timings
25 //
diff --git a/docs/handle/VortexConfig_8h.html b/docs/handle/VortexConfig_8h.html index 09dac2b718..e7ce2bbecb 100644 --- a/docs/handle/VortexConfig_8h.html +++ b/docs/handle/VortexConfig_8h.html @@ -137,7 +137,7 @@   #define AUTO_RANDOM_DELAY   1875   -#define AUTO_CYCLE_MODES_CLICKS   ((MAX_MODES > 2) ? (MAX_MODES * 2) : 4) +#define AUTO_CYCLE_MODES_CLICKS   10   #define AUTO_CYCLE_RANDOMIZER_CLICKS   3   @@ -155,7 +155,7 @@   #define DEFAULT_BRIGHTNESS   185   -#define MAX_MODES   0 +#define MAX_MODES   5   #define DEFAULT_TICKRATE   1000   @@ -269,7 +269,11 @@   #define EDITOR_VERB_GOODBYE   "l"   -#define STORAGE_SIZE   4096 +#define MAX_MODE_SIZE   512 +  +#define NUM_MODE_SLOTS   (MAX_MODES + 1) +  +#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)   #define VORTEX_EMBEDDED   1   @@ -323,7 +327,7 @@

-

Definition at line 274 of file VortexConfig.h.

+

Definition at line 273 of file VortexConfig.h.

@@ -334,7 +338,7 @@

- +
#define AUTO_CYCLE_MODES_CLICKS   ((MAX_MODES > 2) ? (MAX_MODES * 2) : 4)#define AUTO_CYCLE_MODES_CLICKS   10
@@ -403,7 +407,7 @@

-

Definition at line 281 of file VortexConfig.h.

+

Definition at line 280 of file VortexConfig.h.

@@ -419,7 +423,7 @@

-

Definition at line 282 of file VortexConfig.h.

+

Definition at line 281 of file VortexConfig.h.

@@ -435,7 +439,7 @@

-

Definition at line 283 of file VortexConfig.h.

+

Definition at line 282 of file VortexConfig.h.

@@ -499,7 +503,7 @@

-

Definition at line 391 of file VortexConfig.h.

+

Definition at line 390 of file VortexConfig.h.

@@ -531,7 +535,7 @@

-

Definition at line 332 of file VortexConfig.h.

+

Definition at line 331 of file VortexConfig.h.

@@ -563,7 +567,7 @@

-

Definition at line 199 of file VortexConfig.h.

+

Definition at line 198 of file VortexConfig.h.

@@ -579,7 +583,7 @@

-

Definition at line 189 of file VortexConfig.h.

+

Definition at line 188 of file VortexConfig.h.

@@ -595,7 +599,7 @@

-

Definition at line 321 of file VortexConfig.h.

+

Definition at line 320 of file VortexConfig.h.

@@ -627,7 +631,7 @@

-

Definition at line 486 of file VortexConfig.h.

+

Definition at line 485 of file VortexConfig.h.

@@ -643,7 +647,7 @@

-

Definition at line 488 of file VortexConfig.h.

+

Definition at line 487 of file VortexConfig.h.

@@ -659,7 +663,7 @@

-

Definition at line 481 of file VortexConfig.h.

+

Definition at line 480 of file VortexConfig.h.

@@ -675,7 +679,7 @@

-

Definition at line 483 of file VortexConfig.h.

+

Definition at line 482 of file VortexConfig.h.

@@ -691,7 +695,7 @@

-

Definition at line 492 of file VortexConfig.h.

+

Definition at line 491 of file VortexConfig.h.

@@ -707,7 +711,7 @@

-

Definition at line 457 of file VortexConfig.h.

+

Definition at line 456 of file VortexConfig.h.

@@ -723,7 +727,7 @@

-

Definition at line 456 of file VortexConfig.h.

+

Definition at line 455 of file VortexConfig.h.

@@ -739,7 +743,7 @@

-

Definition at line 455 of file VortexConfig.h.

+

Definition at line 454 of file VortexConfig.h.

@@ -755,7 +759,7 @@

-

Definition at line 460 of file VortexConfig.h.

+

Definition at line 459 of file VortexConfig.h.

@@ -771,7 +775,7 @@

-

Definition at line 469 of file VortexConfig.h.

+

Definition at line 468 of file VortexConfig.h.

@@ -787,7 +791,7 @@

-

Definition at line 473 of file VortexConfig.h.

+

Definition at line 472 of file VortexConfig.h.

@@ -803,7 +807,7 @@

-

Definition at line 471 of file VortexConfig.h.

+

Definition at line 470 of file VortexConfig.h.

@@ -819,7 +823,7 @@

-

Definition at line 476 of file VortexConfig.h.

+

Definition at line 475 of file VortexConfig.h.

@@ -835,7 +839,7 @@

-

Definition at line 478 of file VortexConfig.h.

+

Definition at line 477 of file VortexConfig.h.

@@ -851,7 +855,7 @@

-

Definition at line 466 of file VortexConfig.h.

+

Definition at line 465 of file VortexConfig.h.

@@ -867,7 +871,7 @@

-

Definition at line 384 of file VortexConfig.h.

+

Definition at line 383 of file VortexConfig.h.

@@ -903,7 +907,7 @@

-

Definition at line 312 of file VortexConfig.h.

+

Definition at line 311 of file VortexConfig.h.

@@ -919,7 +923,7 @@

-

Definition at line 377 of file VortexConfig.h.

+

Definition at line 376 of file VortexConfig.h.

@@ -935,7 +939,7 @@

-

Definition at line 254 of file VortexConfig.h.

+

Definition at line 253 of file VortexConfig.h.

@@ -951,7 +955,7 @@

-

Definition at line 261 of file VortexConfig.h.

+

Definition at line 260 of file VortexConfig.h.

@@ -967,7 +971,7 @@

-

Definition at line 268 of file VortexConfig.h.

+

Definition at line 267 of file VortexConfig.h.

@@ -999,7 +1003,7 @@

-

Definition at line 225 of file VortexConfig.h.

+

Definition at line 224 of file VortexConfig.h.

@@ -1015,7 +1019,7 @@

-

Definition at line 230 of file VortexConfig.h.

+

Definition at line 229 of file VortexConfig.h.

@@ -1031,7 +1035,7 @@

-

Definition at line 219 of file VortexConfig.h.

+

Definition at line 218 of file VortexConfig.h.

@@ -1063,7 +1067,23 @@

-

Definition at line 207 of file VortexConfig.h.

+

Definition at line 206 of file VortexConfig.h.

+ + + + +

◆ MAX_MODE_SIZE

+ +
+
+ + + + +
#define MAX_MODE_SIZE   512
+
+ +

Definition at line 499 of file VortexConfig.h.

@@ -1074,12 +1094,12 @@

- +
#define MAX_MODES   0#define MAX_MODES   5
-

Definition at line 168 of file VortexConfig.h.

+

Definition at line 167 of file VortexConfig.h.

@@ -1111,7 +1131,23 @@

-

Definition at line 405 of file VortexConfig.h.

+

Definition at line 404 of file VortexConfig.h.

+ + + + +

◆ NUM_MODE_SLOTS

+ +
+
+ + + + +
#define NUM_MODE_SLOTS   (MAX_MODES + 1)
+
+ +

Definition at line 502 of file VortexConfig.h.

@@ -1143,7 +1179,7 @@

-

Definition at line 440 of file VortexConfig.h.

+

Definition at line 439 of file VortexConfig.h.

@@ -1159,7 +1195,7 @@

-

Definition at line 434 of file VortexConfig.h.

+

Definition at line 433 of file VortexConfig.h.

@@ -1175,7 +1211,7 @@

-

Definition at line 431 of file VortexConfig.h.

+

Definition at line 430 of file VortexConfig.h.

@@ -1191,7 +1227,7 @@

-

Definition at line 443 of file VortexConfig.h.

+

Definition at line 442 of file VortexConfig.h.

@@ -1207,7 +1243,7 @@

-

Definition at line 428 of file VortexConfig.h.

+

Definition at line 427 of file VortexConfig.h.

@@ -1223,7 +1259,7 @@

-

Definition at line 437 of file VortexConfig.h.

+

Definition at line 436 of file VortexConfig.h.

@@ -1239,7 +1275,7 @@

-

Definition at line 425 of file VortexConfig.h.

+

Definition at line 424 of file VortexConfig.h.

@@ -1255,7 +1291,7 @@

-

Definition at line 289 of file VortexConfig.h.

+

Definition at line 288 of file VortexConfig.h.

@@ -1271,7 +1307,7 @@

-

Definition at line 290 of file VortexConfig.h.

+

Definition at line 289 of file VortexConfig.h.

@@ -1287,7 +1323,7 @@

-

Definition at line 291 of file VortexConfig.h.

+

Definition at line 290 of file VortexConfig.h.

@@ -1303,7 +1339,7 @@

-

Definition at line 292 of file VortexConfig.h.

+

Definition at line 291 of file VortexConfig.h.

@@ -1335,7 +1371,7 @@

-

Definition at line 397 of file VortexConfig.h.

+

Definition at line 396 of file VortexConfig.h.

@@ -1346,12 +1382,12 @@

- +
#define STORAGE_SIZE   4096#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)
-

Definition at line 501 of file VortexConfig.h.

+

Definition at line 506 of file VortexConfig.h.

@@ -1367,7 +1403,7 @@

-

Definition at line 411 of file VortexConfig.h.

+

Definition at line 410 of file VortexConfig.h.

@@ -1383,7 +1419,7 @@

-

Definition at line 298 of file VortexConfig.h.

+

Definition at line 297 of file VortexConfig.h.

@@ -1399,7 +1435,7 @@

-

Definition at line 299 of file VortexConfig.h.

+

Definition at line 298 of file VortexConfig.h.

@@ -1415,7 +1451,7 @@

-

Definition at line 300 of file VortexConfig.h.

+

Definition at line 299 of file VortexConfig.h.

@@ -1431,7 +1467,7 @@

-

Definition at line 301 of file VortexConfig.h.

+

Definition at line 300 of file VortexConfig.h.

@@ -1447,7 +1483,7 @@

-

Definition at line 346 of file VortexConfig.h.

+

Definition at line 345 of file VortexConfig.h.

@@ -1463,7 +1499,7 @@

-

Definition at line 512 of file VortexConfig.h.

+

Definition at line 517 of file VortexConfig.h.

@@ -1479,7 +1515,7 @@

-

Definition at line 365 of file VortexConfig.h.

+

Definition at line 364 of file VortexConfig.h.

@@ -1511,7 +1547,7 @@

-

Definition at line 235 of file VortexConfig.h.

+

Definition at line 234 of file VortexConfig.h.

diff --git a/docs/handle/VortexConfig_8h.js b/docs/handle/VortexConfig_8h.js index 59c86b3f1b..5f6d05480b 100644 --- a/docs/handle/VortexConfig_8h.js +++ b/docs/handle/VortexConfig_8h.js @@ -49,9 +49,11 @@ var VortexConfig_8h = [ "LOGGING_LEVEL", "VortexConfig_8h.html#aaff29f732338b733b8d1fee0e8df32ab", null ], [ "MAX_COLOR_SLOTS", "VortexConfig_8h.html#a1a0b694e2871554a4066f8d61f577c4c", null ], [ "MAX_MEMORY", "VortexConfig_8h.html#add0367147bdc878651ddf447424b50d5", null ], + [ "MAX_MODE_SIZE", "VortexConfig_8h.html#a4d5f0e0392f00d31715ddf81eb87434a", null ], [ "MAX_MODES", "VortexConfig_8h.html#a95b270e9c99aea216b47fd1e95b2cf34", null ], [ "MENU_TRIGGER_TIME", "VortexConfig_8h.html#adda1b08b81d68fa6a4a6109701f9dd57", null ], [ "MODES_TEST", "VortexConfig_8h.html#a9c95eccf51317b46e19269c6dbc7628e", null ], + [ "NUM_MODE_SLOTS", "VortexConfig_8h.html#ab0c5cc9223512ec01c405592b6741898", null ], [ "RESET_HOLD_TIME", "VortexConfig_8h.html#a18f22a5b8ac9dfe404fd4b83e502eda2", null ], [ "RGB_MENU_BRIGHTNESS_SELECT", "VortexConfig_8h.html#a3fd5d16a2fea0175b3b34083c6dfb42f", null ], [ "RGB_MENU_COLOR_SELECT", "VortexConfig_8h.html#a3b335e17dcc12be29e18e3373e5352cb", null ], diff --git a/docs/handle/VortexConfig_8h_source.html b/docs/handle/VortexConfig_8h_source.html index be02426f8c..4d18a54ef4 100644 --- a/docs/handle/VortexConfig_8h_source.html +++ b/docs/handle/VortexConfig_8h_source.html @@ -185,7 +185,7 @@
96 // as the auto random delay. This number is intentionally high because we really
97 // don't want it activated automatically but it's there for demo purposes and as
98 // a fun little easter egg to anybody that might come across it
-
99 #define AUTO_CYCLE_MODES_CLICKS ((MAX_MODES > 2) ? (MAX_MODES * 2) : 4)
+
99 #define AUTO_CYCLE_MODES_CLICKS 10
100 
101 // Randomizer Auto Cycle Modes Clicks
102 //
@@ -250,434 +250,439 @@
161 // two fold the issues with space because they are already limited
162 // and the lack of compression makes their save files bigger
163 //
-
164 // This is set to 0 by default which allows for any number of modes
-
165 // to be stored, however this is not recommended for production and
-
166 // a specific maximum should be chosen for each device
-
167 //
-
168 #define MAX_MODES 0
-
169 
-
170 // Default Tickrate in Ticks Per Second (TPS)
-
171 //
-
172 // The valid range for this is 1 <= x <= 1000000 (default 1000)
-
173 //
-
174 // Any value near or above 10000 will most likely be too fast for
-
175 // the processor to handle.
-
176 //
-
177 // Any value less than 100 and you risk a single tick taking longer
-
178 // than some pattern timings which results in very weird behaviour
-
179 //
-
180 // It's probably best that you leave this at 1000
-
181 //
-
182 // WARNING:
-
183 //
-
184 // The timer system was not designed to handle ticks that are not
-
185 // exactly 1 ms. This means that if you change the tickrate to any
-
186 // value other than 1000 the timer system will miss alarms, patterns
-
187 // will not look correct and there is no fix at the moment.
-
188 //
-
189 #define DEFAULT_TICKRATE 1000
-
190 
-
191 // Pair time offset in ticks
-
192 //
-
193 // This changes how many ticks out of sync each finger will run.
-
194 // So 33 means each finger runs 33 ticks out of sync with the
-
195 // previous finger.
-
196 //
-
197 // This was an early feature that fell into disrepair, I don't
-
198 // think it works anymore and really hasn't proven to be useful
-
199 #define DEFAULT_TICK_OFFSET 0
-
200 
-
201 // Max Memory Usage
-
202 //
-
203 // The maximum memory usage allowed by the memory tracker.
-
204 // The memory tracker isn't present in final builds, only debug
-
205 // so this number doesn't actually do anything in production.
-
206 // Mostly for catching leaks or high memory usage in development.
-
207 #define MAX_MEMORY 8000
-
208 
-
209 // Log Level
-
210 //
-
211 // Set the logging level to control info/error/debug logs accordingly
-
212 // The available logging levels are:
-
213 //
-
214 // 0 Off All logging is disabled
-
215 // 1 Info Only info logs are present
-
216 // 2 Errors Info and error logs are present
-
217 // 3 Debug All logs are present, info, error, and debug
-
218 //
-
219 #define LOGGING_LEVEL 0
-
220 
-
221 // Log to Console
-
222 //
-
223 // Enable logging to console, still need to change LOGGING_LEVEL
-
224 // this only enables the console output connection
-
225 #define LOG_TO_CONSOLE 0
-
226 
-
227 // Log to File
-
228 //
-
229 // Enable this configuration to enable logging to the file
-
230 #define LOG_TO_FILE 0
-
231 
-
232 // Log Name
-
233 //
-
234 // The name of the file on disk that will receive the log info
-
235 #define VORTEX_LOG_NAME "vortexlog"
-
236 
-
237 // HSV to RGB Conversion Algorithm
-
238 //
-
239 // Here you can choose the HSV to RGB conversion algorithm, this will
-
240 // control the overall appearance of all colours produced with HSV.
-
241 // The available options are:
-
242 //
-
243 // 1 FastLED 'hsv to rgb rainbow'
-
244 // 2 FastLED 'hsv to rgb raw C'
-
245 // 3 generic hsv to rgb 'pastel'
-
246 //
-
247 // Option 1 is the default and legacy choice, also looks best because
-
248 // it puts even weight into every color of the rainbow which involves
-
249 // stretching some segments like yellow to take up more hue space.
-
250 //
-
251 // Note you can still call the other routines from your pattern code,
-
252 // for example blend and complementary blend use hsv to rgb 'pastel'
-
253 // because it looks better than hsv to rgb rainbow
-
254 #define HSV_TO_RGB_ALGORITHM 3
-
255 
-
256 // IR Receiver Time-out Duration (ms)
-
257 //
-
258 // This is the amount of time in ms for the IR receiver to wait
-
259 // before reseting itself in the case that communication gets
-
260 // interrupted.
-
261 #define IR_RECEIVER_TIMEOUT_DURATION 2000
-
262 
-
263 // IR Sender Wait Duration (ms)
-
264 //
-
265 // This is the amount of time in ms for the IR sender to wait
-
266 // between IR sends. This duration allows the user to give input
-
267 // as it is not possible to give input during a send.
-
268 #define IR_SENDER_WAIT_DURATION 2000
-
269 
-
270 // Enter Advanced Menus Click Duration (ms)
-
271 //
-
272 // How long the user must long click on the menu item to enter the
-
273 // 'advanced' version of the menu
-
274 #define ADVANCED_MENU_ENTER_DURATION 1500
-
275 
-
276 // Brightness Options
-
277 //
-
278 // These are the four options available in the global brightness menu
-
279 // There is only four options, be careful not to go too low
-
280 #define BRIGHTNESS_OPTION_1 40
-
281 #define BRIGHTNESS_OPTION_2 120
-
282 #define BRIGHTNESS_OPTION_3 185
-
283 #define BRIGHTNESS_OPTION_4 255
-
284 
-
285 // Saturation Options
-
286 //
-
287 // These are the four saturations available in the color selection menu
-
288 // Any color can be picked with any of these 4 saturations
-
289 #define SAT_OPTION_1 0
-
290 #define SAT_OPTION_2 85
-
291 #define SAT_OPTION_3 170
-
292 #define SAT_OPTION_4 255
-
293 
-
294 // Value/Luminance Options
-
295 //
-
296 // These are the four values/luminance options in the color selection menu
-
297 // Any color can be picked with any of these 4 values
-
298 #define VAL_OPTION_1 0
-
299 #define VAL_OPTION_2 85
-
300 #define VAL_OPTION_3 170
-
301 #define VAL_OPTION_4 255
-
302 
-
303 // ===================================================================
-
304 // Boolean Configurations (0 or 1)
-
305 
-
306 // Fill From Thumb
-
307 //
-
308 // The ring menu will fill from the thumb if this is present, otherwise
-
309 // it will fill from the pinkie.
-
310 //
-
311 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
-
312 #define FILL_FROM_THUMB 1
-
313 
-
314 // Demo All Patterns
-
315 //
-
316 // The default modes that are set on the gloveset will be dynamically
-
317 // generated with one mode per pattern in the patterns list
-
318 //
-
319 // This can be used to quickly demo all possible patterns, mostly useful
-
320 // for testing and development
-
321 #define DEMO_ALL_PATTERNS 0
-
322 
-
323 // Debug Allocations
-
324 //
-
325 // Tracks all memory allocations and logs them, useful for finding leaks
-
326 //
-
327 // Note tracking allocations while using the test framework will be inaccurate
-
328 // because the test framework allocations will be caught as well.
-
329 //
-
330 // When the test framework does things like display a color for the first time
-
331 // it will allocate space permanently for the new brush and never free it
-
332 #define DEBUG_ALLOCATIONS 0
-
333 
-
334 // Variable Tickrate
-
335 //
-
336 // This controls whether the setTickrate function is available and
-
337 // whether changing the tickrate is allowed. This goes hand-in-hand
-
338 // with the Default Tickrate configuration above
-
339 //
-
340 // The tickrate should always be fixed in final builds because this
-
341 // functionality induces extra performance costs and the intended
-
342 // tickrate for the final build should already be known.
-
343 //
-
344 // However there may be some clever uses for variable tickrate in
-
345 // the final build? I'm not sure.
-
346 #define VARIABLE_TICKRATE 0
-
347 
-
348 // Error Blinker System
-
349 //
-
350 // This toggles the vortex error blinker system, this system reports
-
351 // fatal errors as a series of blinks. If an error is encountered the
-
352 // chip will only blink out the error code from there forward.
-
353 //
-
354 // Note that enabling this system takes a non-negligible amount
-
355 // of space for all of the code, it really should only be used
-
356 // for debug settings or given tiers like logging level.
-
357 //
-
358 // This is mainly useful for tracking down issues on devices that don't
-
359 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
-
360 // set the error code and then the device will blink out the error
-
361 //
-
362 // for ex: red red green blue blue blue is code 213
-
363 //
-
364 // See Log/ErrorBlinker.h for details on the error codes
-
365 #define VORTEX_ERROR_BLINK 0
-
366 
-
367 // Fixed LED Count
-
368 //
-
369 // Do not allow the Mode loader to dynamically load however many modes
-
370 // are saved in the savefile. This should be enabled for arduino or vortex
-
371 // device builds because they cannot change their number of LEDs. However
-
372 // other tools like the editor or vortex emulator may be able to make use
-
373 // of this to dynamically adjust the number of leds that a mode can handle
-
374 //
-
375 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
-
376 // a mode will stretch it's list of patterns to match the number of leds
-
377 #define FIXED_LED_COUNT 1
-
378 
-
379 // Enable Editor Connection
-
380 //
-
381 // Turn on the editor connection, some devices are capable of connecting to
-
382 // the pc-based editor, this controls whether the engine exposes the purple
-
383 // editor connection menu or not
-
384 #define ENABLE_EDITOR_CONNECTION 1
-
385 
-
386 // Compression Test
-
387 //
-
388 // Run the built-in compression test that will find any faults
-
389 // in the compressor or decompressor. This is useful if you install
-
390 // a new compressor or want to test any changes to the compressor
-
391 #define COMPRESSION_TEST 0
-
392 
-
393 // Serialization Test
-
394 //
-
395 // Run the serializer/unserializer test which will find any objects
-
396 // which don't serialize and unserialize cleanly
-
397 #define SERIALIZATION_TEST 0
-
398 
-
399 // Modes Test
-
400 //
-
401 // Run unit tests on the Modes class which manages the list of Modes.
-
402 // If any patterns fail to instantiate or perform basic operations
-
403 // it should show up in the modes test. Also if the Modes api has been
-
404 // updated then this will test for any issues
-
405 #define MODES_TEST 0
-
406 
-
407 // Timer Test
-
408 //
-
409 // Tests the timers, time control, and timestep system to ensure they
-
410 // are all working as expected and behaving properly
-
411 #define TIMER_TEST 0
+
164 // This should not be set to 0, it should be a specific maximum for
+
165 // each separate device
+
166 //
+
167 #define MAX_MODES 5
+
168 
+
169 // Default Tickrate in Ticks Per Second (TPS)
+
170 //
+
171 // The valid range for this is 1 <= x <= 1000000 (default 1000)
+
172 //
+
173 // Any value near or above 10000 will most likely be too fast for
+
174 // the processor to handle.
+
175 //
+
176 // Any value less than 100 and you risk a single tick taking longer
+
177 // than some pattern timings which results in very weird behaviour
+
178 //
+
179 // It's probably best that you leave this at 1000
+
180 //
+
181 // WARNING:
+
182 //
+
183 // The timer system was not designed to handle ticks that are not
+
184 // exactly 1 ms. This means that if you change the tickrate to any
+
185 // value other than 1000 the timer system will miss alarms, patterns
+
186 // will not look correct and there is no fix at the moment.
+
187 //
+
188 #define DEFAULT_TICKRATE 1000
+
189 
+
190 // Pair time offset in ticks
+
191 //
+
192 // This changes how many ticks out of sync each finger will run.
+
193 // So 33 means each finger runs 33 ticks out of sync with the
+
194 // previous finger.
+
195 //
+
196 // This was an early feature that fell into disrepair, I don't
+
197 // think it works anymore and really hasn't proven to be useful
+
198 #define DEFAULT_TICK_OFFSET 0
+
199 
+
200 // Max Memory Usage
+
201 //
+
202 // The maximum memory usage allowed by the memory tracker.
+
203 // The memory tracker isn't present in final builds, only debug
+
204 // so this number doesn't actually do anything in production.
+
205 // Mostly for catching leaks or high memory usage in development.
+
206 #define MAX_MEMORY 8000
+
207 
+
208 // Log Level
+
209 //
+
210 // Set the logging level to control info/error/debug logs accordingly
+
211 // The available logging levels are:
+
212 //
+
213 // 0 Off All logging is disabled
+
214 // 1 Info Only info logs are present
+
215 // 2 Errors Info and error logs are present
+
216 // 3 Debug All logs are present, info, error, and debug
+
217 //
+
218 #define LOGGING_LEVEL 0
+
219 
+
220 // Log to Console
+
221 //
+
222 // Enable logging to console, still need to change LOGGING_LEVEL
+
223 // this only enables the console output connection
+
224 #define LOG_TO_CONSOLE 0
+
225 
+
226 // Log to File
+
227 //
+
228 // Enable this configuration to enable logging to the file
+
229 #define LOG_TO_FILE 0
+
230 
+
231 // Log Name
+
232 //
+
233 // The name of the file on disk that will receive the log info
+
234 #define VORTEX_LOG_NAME "vortexlog"
+
235 
+
236 // HSV to RGB Conversion Algorithm
+
237 //
+
238 // Here you can choose the HSV to RGB conversion algorithm, this will
+
239 // control the overall appearance of all colours produced with HSV.
+
240 // The available options are:
+
241 //
+
242 // 1 FastLED 'hsv to rgb rainbow'
+
243 // 2 FastLED 'hsv to rgb raw C'
+
244 // 3 generic hsv to rgb 'pastel'
+
245 //
+
246 // Option 1 is the default and legacy choice, also looks best because
+
247 // it puts even weight into every color of the rainbow which involves
+
248 // stretching some segments like yellow to take up more hue space.
+
249 //
+
250 // Note you can still call the other routines from your pattern code,
+
251 // for example blend and complementary blend use hsv to rgb 'pastel'
+
252 // because it looks better than hsv to rgb rainbow
+
253 #define HSV_TO_RGB_ALGORITHM 3
+
254 
+
255 // IR Receiver Time-out Duration (ms)
+
256 //
+
257 // This is the amount of time in ms for the IR receiver to wait
+
258 // before reseting itself in the case that communication gets
+
259 // interrupted.
+
260 #define IR_RECEIVER_TIMEOUT_DURATION 2000
+
261 
+
262 // IR Sender Wait Duration (ms)
+
263 //
+
264 // This is the amount of time in ms for the IR sender to wait
+
265 // between IR sends. This duration allows the user to give input
+
266 // as it is not possible to give input during a send.
+
267 #define IR_SENDER_WAIT_DURATION 2000
+
268 
+
269 // Enter Advanced Menus Click Duration (ms)
+
270 //
+
271 // How long the user must long click on the menu item to enter the
+
272 // 'advanced' version of the menu
+
273 #define ADVANCED_MENU_ENTER_DURATION 1500
+
274 
+
275 // Brightness Options
+
276 //
+
277 // These are the four options available in the global brightness menu
+
278 // There is only four options, be careful not to go too low
+
279 #define BRIGHTNESS_OPTION_1 40
+
280 #define BRIGHTNESS_OPTION_2 120
+
281 #define BRIGHTNESS_OPTION_3 185
+
282 #define BRIGHTNESS_OPTION_4 255
+
283 
+
284 // Saturation Options
+
285 //
+
286 // These are the four saturations available in the color selection menu
+
287 // Any color can be picked with any of these 4 saturations
+
288 #define SAT_OPTION_1 0
+
289 #define SAT_OPTION_2 85
+
290 #define SAT_OPTION_3 170
+
291 #define SAT_OPTION_4 255
+
292 
+
293 // Value/Luminance Options
+
294 //
+
295 // These are the four values/luminance options in the color selection menu
+
296 // Any color can be picked with any of these 4 values
+
297 #define VAL_OPTION_1 0
+
298 #define VAL_OPTION_2 85
+
299 #define VAL_OPTION_3 170
+
300 #define VAL_OPTION_4 255
+
301 
+
302 // ===================================================================
+
303 // Boolean Configurations (0 or 1)
+
304 
+
305 // Fill From Thumb
+
306 //
+
307 // The ring menu will fill from the thumb if this is present, otherwise
+
308 // it will fill from the pinkie.
+
309 //
+
310 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
+
311 #define FILL_FROM_THUMB 1
+
312 
+
313 // Demo All Patterns
+
314 //
+
315 // The default modes that are set on the gloveset will be dynamically
+
316 // generated with one mode per pattern in the patterns list
+
317 //
+
318 // This can be used to quickly demo all possible patterns, mostly useful
+
319 // for testing and development
+
320 #define DEMO_ALL_PATTERNS 0
+
321 
+
322 // Debug Allocations
+
323 //
+
324 // Tracks all memory allocations and logs them, useful for finding leaks
+
325 //
+
326 // Note tracking allocations while using the test framework will be inaccurate
+
327 // because the test framework allocations will be caught as well.
+
328 //
+
329 // When the test framework does things like display a color for the first time
+
330 // it will allocate space permanently for the new brush and never free it
+
331 #define DEBUG_ALLOCATIONS 0
+
332 
+
333 // Variable Tickrate
+
334 //
+
335 // This controls whether the setTickrate function is available and
+
336 // whether changing the tickrate is allowed. This goes hand-in-hand
+
337 // with the Default Tickrate configuration above
+
338 //
+
339 // The tickrate should always be fixed in final builds because this
+
340 // functionality induces extra performance costs and the intended
+
341 // tickrate for the final build should already be known.
+
342 //
+
343 // However there may be some clever uses for variable tickrate in
+
344 // the final build? I'm not sure.
+
345 #define VARIABLE_TICKRATE 0
+
346 
+
347 // Error Blinker System
+
348 //
+
349 // This toggles the vortex error blinker system, this system reports
+
350 // fatal errors as a series of blinks. If an error is encountered the
+
351 // chip will only blink out the error code from there forward.
+
352 //
+
353 // Note that enabling this system takes a non-negligible amount
+
354 // of space for all of the code, it really should only be used
+
355 // for debug settings or given tiers like logging level.
+
356 //
+
357 // This is mainly useful for tracking down issues on devices that don't
+
358 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
+
359 // set the error code and then the device will blink out the error
+
360 //
+
361 // for ex: red red green blue blue blue is code 213
+
362 //
+
363 // See Log/ErrorBlinker.h for details on the error codes
+
364 #define VORTEX_ERROR_BLINK 0
+
365 
+
366 // Fixed LED Count
+
367 //
+
368 // Do not allow the Mode loader to dynamically load however many modes
+
369 // are saved in the savefile. This should be enabled for embedded or vortex
+
370 // device builds because they cannot change their number of LEDs. However
+
371 // other tools like the editor or vortex emulator may be able to make use
+
372 // of this to dynamically adjust the number of leds that a mode can handle
+
373 //
+
374 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
+
375 // a mode will stretch it's list of patterns to match the number of leds
+
376 #define FIXED_LED_COUNT 1
+
377 
+
378 // Enable Editor Connection
+
379 //
+
380 // Turn on the editor connection, some devices are capable of connecting to
+
381 // the pc-based editor, this controls whether the engine exposes the purple
+
382 // editor connection menu or not
+
383 #define ENABLE_EDITOR_CONNECTION 1
+
384 
+
385 // Compression Test
+
386 //
+
387 // Run the built-in compression test that will find any faults
+
388 // in the compressor or decompressor. This is useful if you install
+
389 // a new compressor or want to test any changes to the compressor
+
390 #define COMPRESSION_TEST 0
+
391 
+
392 // Serialization Test
+
393 //
+
394 // Run the serializer/unserializer test which will find any objects
+
395 // which don't serialize and unserialize cleanly
+
396 #define SERIALIZATION_TEST 0
+
397 
+
398 // Modes Test
+
399 //
+
400 // Run unit tests on the Modes class which manages the list of Modes.
+
401 // If any patterns fail to instantiate or perform basic operations
+
402 // it should show up in the modes test. Also if the Modes api has been
+
403 // updated then this will test for any issues
+
404 #define MODES_TEST 0
+
405 
+
406 // Timer Test
+
407 //
+
408 // Tests the timers, time control, and timestep system to ensure they
+
409 // are all working as expected and behaving properly
+
410 #define TIMER_TEST 0
+
411 
412 
-
413 
-
414 // ===================================================================
-
415 // Menu Colors
-
416 //
-
417 // These are the colors for the respective menus, each color should
-
418 // be unique and distinct from the others. It should also be bright
-
419 // enough to be seen on the lowest brightness setting of the device
-
420 //
-
421 // See the below header for all of the available color constants
-
422 #include "Colors/ColorConstants.h"
-
423 
-
424 // Randomizer Menu Color
-
425 #define RGB_MENU_RANDOMIZER RGB_WHITE1
-
426 
-
427 // Mode Sharing Menu Color
-
428 #define RGB_MENU_MODE_SHARING RGB_CYAN1
-
429 
-
430 // Editor Connection Menu Color
-
431 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
-
432 
-
433 // Color Select Menu Color
-
434 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
-
435 
-
436 // Pattern Select Menu Color
-
437 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
-
438 
-
439 // Global Brightness Menu Color
-
440 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
-
441 
-
442 // Factory Reset Menu Color
-
443 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
413 // ===================================================================
+
414 // Menu Colors
+
415 //
+
416 // These are the colors for the respective menus, each color should
+
417 // be unique and distinct from the others. It should also be bright
+
418 // enough to be seen on the lowest brightness setting of the device
+
419 //
+
420 // See the below header for all of the available color constants
+
421 #include "Colors/ColorConstants.h"
+
422 
+
423 // Randomizer Menu Color
+
424 #define RGB_MENU_RANDOMIZER RGB_WHITE1
+
425 
+
426 // Mode Sharing Menu Color
+
427 #define RGB_MENU_MODE_SHARING RGB_CYAN1
+
428 
+
429 // Editor Connection Menu Color
+
430 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
+
431 
+
432 // Color Select Menu Color
+
433 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
+
434 
+
435 // Pattern Select Menu Color
+
436 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
+
437 
+
438 // Global Brightness Menu Color
+
439 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
+
440 
+
441 // Factory Reset Menu Color
+
442 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
443 
444 
-
445 
-
446 // ===================================================================
-
447 // Editor Verbs
-
448 //
-
449 // These are the commands used in the protocol with the editor.
-
450 // They are defined here so the editor can access them easily,
-
451 // also so you can configure them at your own free will.
-
452 
-
453 // the initial hello from the gloveset to the editor
-
454 // is the full name of this build of vortex
-
455 #define EDITOR_VERB_GREETING_PREFIX "== "
-
456 #define EDITOR_VERB_GREETING_POSTFIX " =="
-
457 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
-
458 
-
459 // the hello from the editor to the gloves
-
460 #define EDITOR_VERB_HELLO "a"
-
461 
-
462 // the response from the gloveset when it's ready to receive something
-
463 // after the editor has given it a command to do something the gloveset
-
464 // will respond with this then once it's done doing the action it will
-
465 // send a different finished response for each action
-
466 #define EDITOR_VERB_READY "b"
-
467 
-
468 // the command from the editor to send modes over
-
469 #define EDITOR_VERB_PULL_MODES "c"
-
470 // the response from the editor once modes are received
-
471 #define EDITOR_VERB_PULL_MODES_DONE "d"
-
472 // the response from the gloves once it acknowledges the editor got the modes
-
473 #define EDITOR_VERB_PULL_MODES_ACK "e"
-
474 
-
475 // the command from the editor to send modes over
-
476 #define EDITOR_VERB_PUSH_MODES "f"
-
477 // the response from the gloveset when it received the mode
-
478 #define EDITOR_VERB_PUSH_MODES_ACK "g"
-
479 
-
480 // the command from the editor to tell the gloveset to demo a mode
-
481 #define EDITOR_VERB_DEMO_MODE "h"
-
482 // the response from the gloveset when it's received the mode to demo
-
483 #define EDITOR_VERB_DEMO_MODE_ACK "i"
-
484 
-
485 // the command from the editor to tell the gloveset to clear the demo
-
486 #define EDITOR_VERB_CLEAR_DEMO "j"
-
487 // the response from the gloveset when it's received disabled the demo
-
488 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
-
489 
-
490 // when the gloveset is leaving the menu and needs to tell the editor
-
491 // that it's no longer listening
-
492 #define EDITOR_VERB_GOODBYE "l"
-
493 
-
494 // ===================================================================
-
495 // Manually Configured Sizes
-
496 //
-
497 // These are the various storage space constants of the vortex device
-
498 
-
499 // the space available for storing modes, we can't make this too big
-
500 // otherwise we will have trouble loading it into memory
-
501 #define STORAGE_SIZE 4096
-
502 
-
503 // ===================================================================
-
504 // Test Framework configurations
-
505 //
-
506 // * Unless you are using the test framework, don't touch these! *
+
445 // ===================================================================
+
446 // Editor Verbs
+
447 //
+
448 // These are the commands used in the protocol with the editor.
+
449 // They are defined here so the editor can access them easily,
+
450 // also so you can configure them at your own free will.
+
451 
+
452 // the initial hello from the gloveset to the editor
+
453 // is the full name of this build of vortex
+
454 #define EDITOR_VERB_GREETING_PREFIX "== "
+
455 #define EDITOR_VERB_GREETING_POSTFIX " =="
+
456 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
+
457 
+
458 // the hello from the editor to the gloves
+
459 #define EDITOR_VERB_HELLO "a"
+
460 
+
461 // the response from the gloveset when it's ready to receive something
+
462 // after the editor has given it a command to do something the gloveset
+
463 // will respond with this then once it's done doing the action it will
+
464 // send a different finished response for each action
+
465 #define EDITOR_VERB_READY "b"
+
466 
+
467 // the command from the editor to send modes over
+
468 #define EDITOR_VERB_PULL_MODES "c"
+
469 // the response from the editor once modes are received
+
470 #define EDITOR_VERB_PULL_MODES_DONE "d"
+
471 // the response from the gloves once it acknowledges the editor got the modes
+
472 #define EDITOR_VERB_PULL_MODES_ACK "e"
+
473 
+
474 // the command from the editor to send modes over
+
475 #define EDITOR_VERB_PUSH_MODES "f"
+
476 // the response from the gloveset when it received the mode
+
477 #define EDITOR_VERB_PUSH_MODES_ACK "g"
+
478 
+
479 // the command from the editor to tell the gloveset to demo a mode
+
480 #define EDITOR_VERB_DEMO_MODE "h"
+
481 // the response from the gloveset when it's received the mode to demo
+
482 #define EDITOR_VERB_DEMO_MODE_ACK "i"
+
483 
+
484 // the command from the editor to tell the gloveset to clear the demo
+
485 #define EDITOR_VERB_CLEAR_DEMO "j"
+
486 // the response from the gloveset when it's received disabled the demo
+
487 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
+
488 
+
489 // when the gloveset is leaving the menu and needs to tell the editor
+
490 // that it's no longer listening
+
491 #define EDITOR_VERB_GOODBYE "l"
+
492 
+
493 // ===================================================================
+
494 // Manually Configured Sizes
+
495 //
+
496 // These are the various storage space constants of the vortex device
+
497 
+
498 // maximum size of a mode here
+
499 #define MAX_MODE_SIZE 512
+
500 
+
501 // the number of storage slots for modes, add 1 for the header
+
502 #define NUM_MODE_SLOTS (MAX_MODES + 1)
+
503 
+
504 // the space available for storing modes, we can't make this too big
+
505 // otherwise we will have trouble loading it into memory
+
506 #define STORAGE_SIZE (MAX_MODE_SIZE * NUM_MODE_SLOTS)
507 
-
508 // These defines come from the project settings for preprocessor, an
-
509 // entry for $(SolutionName) produces preprocessor definitions that
-
510 // match the solution that is compiling the engine
-
511 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
-
512 #define VORTEX_EMBEDDED 1
-
513 #endif
-
514 
-
515 // if building for editor or test framework then we're building vortex lib, it should
-
516 // be defined in the project settings but sometimes it's not for example if a cpp file
-
517 // from the test framework includes a header from the engine it might not have VORTEX_LIB
-
518 // this will ensure that anything which includes this config file will have VORTEX_LIB
-
519 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
-
520 #undef VORTEX_LIB
-
521 #define VORTEX_LIB
-
522 #endif
-
523 
-
524 #ifdef VORTEX_LIB
-
525 #undef VORTEX_SLIM
-
526 #define VORTEX_SLIM 0
-
527 
-
528 // The test framework needs brighter menu colors can't really see them on the screen
-
529 #undef RGB_MENU_RANDOMIZER
-
530 #undef RGB_MENU_MODE_SHARING
-
531 #undef RGB_MENU_EDITOR_CONNECTION
-
532 #undef RGB_MENU_COLOR_SELECT
-
533 #undef RGB_MENU_PATTERN_SELECT
-
534 #undef RGB_MENU_BRIGHTNESS_SELECT
-
535 #undef RGB_MENU_FACTORY_RESET
-
536 #define RGB_MENU_RANDOMIZER RGB_WHITE4
-
537 #define RGB_MENU_MODE_SHARING RGB_CYAN4
-
538 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
-
539 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
-
540 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
-
541 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
-
542 #define RGB_MENU_FACTORY_RESET RGB_RED4
-
543 
-
544 #endif // ifdef VORTEX_LIB
-
545 
-
546 // This will be defined if the project is being built inside the test framework
-
547 #ifdef PROJECT_NAME_VortexTestingFramework
+
508 // ===================================================================
+
509 // Test Framework configurations
+
510 //
+
511 // * Unless you are using the test framework, don't touch these! *
+
512 
+
513 // These defines come from the project settings for preprocessor, an
+
514 // entry for $(SolutionName) produces preprocessor definitions that
+
515 // match the solution that is compiling the engine
+
516 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
+
517 #define VORTEX_EMBEDDED 1
+
518 #endif
+
519 
+
520 // if building for editor or test framework then we're building vortex lib, it should
+
521 // be defined in the project settings but sometimes it's not for example if a cpp file
+
522 // from the test framework includes a header from the engine it might not have VORTEX_LIB
+
523 // this will ensure that anything which includes this config file will have VORTEX_LIB
+
524 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
+
525 #undef VORTEX_LIB
+
526 #define VORTEX_LIB
+
527 #endif
+
528 
+
529 #ifdef VORTEX_LIB
+
530 #undef VORTEX_SLIM
+
531 #define VORTEX_SLIM 0
+
532 
+
533 // The test framework needs brighter menu colors can't really see them on the screen
+
534 #undef RGB_MENU_RANDOMIZER
+
535 #undef RGB_MENU_MODE_SHARING
+
536 #undef RGB_MENU_EDITOR_CONNECTION
+
537 #undef RGB_MENU_COLOR_SELECT
+
538 #undef RGB_MENU_PATTERN_SELECT
+
539 #undef RGB_MENU_BRIGHTNESS_SELECT
+
540 #undef RGB_MENU_FACTORY_RESET
+
541 #define RGB_MENU_RANDOMIZER RGB_WHITE4
+
542 #define RGB_MENU_MODE_SHARING RGB_CYAN4
+
543 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
+
544 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
+
545 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
+
546 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
+
547 #define RGB_MENU_FACTORY_RESET RGB_RED4
548 
-
549 // In the test framework variable tickrate must be enabled to allow
-
550 // the tickrate slider to function, also the test framework never runs
-
551 // at full tickrate, maximum is 500 tps
-
552 #undef VARIABLE_TICKRATE
-
553 #define VARIABLE_TICKRATE 1
-
554 
-
555 #undef DEFAULT_BRIGHTNESS
-
556 #define DEFAULT_BRIGHTNESS 255
-
557 
-
558 // test framework needs more time to click idk
-
559 #undef CONSECUTIVE_WINDOW
-
560 #define CONSECUTIVE_WINDOW 300
-
561 
-
562 // force logging to 3 on linux build
-
563 #ifndef _WIN32
-
564 #undef LOGGING_LEVEL
-
565 #define LOGGING_LEVEL 3
-
566 #endif
-
567 
-
568 #endif // VortexTestingFramework
-
569 
-
570 // This will be defined if the project is being built inside the editor
-
571 #ifdef PROJECT_NAME_VortexEditor
+
549 #endif // ifdef VORTEX_LIB
+
550 
+
551 // This will be defined if the project is being built inside the test framework
+
552 #ifdef PROJECT_NAME_VortexTestingFramework
+
553 
+
554 // In the test framework variable tickrate must be enabled to allow
+
555 // the tickrate slider to function, also the test framework never runs
+
556 // at full tickrate, maximum is 500 tps
+
557 #undef VARIABLE_TICKRATE
+
558 #define VARIABLE_TICKRATE 1
+
559 
+
560 #undef DEFAULT_BRIGHTNESS
+
561 #define DEFAULT_BRIGHTNESS 255
+
562 
+
563 // test framework needs more time to click idk
+
564 #undef CONSECUTIVE_WINDOW
+
565 #define CONSECUTIVE_WINDOW 300
+
566 
+
567 // force logging to 3 on linux build
+
568 #ifndef _WIN32
+
569 #undef LOGGING_LEVEL
+
570 #define LOGGING_LEVEL 3
+
571 #endif
572 
-
573 // The editor needs an unfixed led count in order to load any mode
-
574 #undef FIXED_LED_COUNT
-
575 #define FIXED_LED_COUNT 0
-
576 
-
577 #endif // VortexEditor
-
578 
-
579 // When running in the test framework with demo all patterns enabled
-
580 // we should change the max patterns to the total pattern count because
-
581 // the test framework can handle the memory usage and we can't demo
-
582 // all the patterns without the increased limit
-
583 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
-
584  #undef MAX_MODES
-
585  #include "Patterns/Patterns.h"
-
586  #define MAX_MODES 0
-
587  #undef LOGGING_LEVEL
-
588  #define LOGGING_LEVEL 3
-
589 #endif
-
590 
-
591 #endif // VORTEX_CONFIG_H
+
573 #endif // VortexTestingFramework
+
574 
+
575 // This will be defined if the project is being built inside the editor
+
576 #ifdef PROJECT_NAME_VortexEditor
+
577 
+
578 // The editor needs an unfixed led count in order to load any mode
+
579 #undef FIXED_LED_COUNT
+
580 #define FIXED_LED_COUNT 0
+
581 
+
582 #endif // VortexEditor
+
583 
+
584 // When running in the test framework with demo all patterns enabled
+
585 // we should change the max patterns to the total pattern count because
+
586 // the test framework can handle the memory usage and we can't demo
+
587 // all the patterns without the increased limit
+
588 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
+
589  #undef MAX_MODES
+
590  #include "Patterns/Patterns.h"
+
591  #define MAX_MODES 0
+
592  #undef LOGGING_LEVEL
+
593  #define LOGGING_LEVEL 3
+
594 #endif
+
595 
+
596 #endif // VORTEX_CONFIG_H
diff --git a/docs/handle/VortexEngine_8cpp_source.html b/docs/handle/VortexEngine_8cpp_source.html index d6f7a96fd7..2632c184e6 100644 --- a/docs/handle/VortexEngine_8cpp_source.html +++ b/docs/handle/VortexEngine_8cpp_source.html @@ -176,7 +176,7 @@
88 {
89  // cleanup in reverse order
-
90  // NOTE: the arduino doesn't actually cleanup,
+
90  // NOTE: the embedded doesn't actually cleanup,
91  // but the test frameworks do
92 #ifdef VORTEX_LIB
@@ -531,7 +531,7 @@
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
#define DEVICE_LOCK_CLICKS
Definition: VortexConfig.h:65
#define VORTEX_VERSION_MINOR
Definition: VortexConfig.h:17
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
#define AUTO_CYCLE_MODES_CLICKS
Definition: VortexConfig.h:99
#define VORTEX_VERSION_MAJOR
Definition: VortexConfig.h:10
#define AUTO_RANDOM_DELAY
Definition: VortexConfig.h:90
@@ -578,21 +578,21 @@
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static bool init()
Definition: Modes.cpp:30
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
uint8_t numArgs
Definition: PatternArgs.h:121
static PatternArgs getDefaultArgs(PatternID id)
@@ -600,9 +600,9 @@
Definition: Random.h:6
static void cleanup()
Definition: Serial.cpp:30
static bool init()
Definition: Serial.cpp:23
-
static bool init()
Definition: Storage.cpp:43
-
static void cleanup()
Definition: Storage.cpp:53
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
static bool init()
Definition: TimeControl.cpp:50
static uint32_t getCurtime()
Definition: TimeControl.h:40
static void tickClock()
Definition: TimeControl.cpp:75
diff --git a/docs/handle/classBlendPattern.html b/docs/handle/classBlendPattern.html index 40c3937368..917e684955 100644 --- a/docs/handle/classBlendPattern.html +++ b/docs/handle/classBlendPattern.html @@ -468,7 +468,7 @@

46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -478,7 +478,7 @@

56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/handle/classByteStream.html b/docs/handle/classByteStream.html index 058737c296..15272dc224 100644 --- a/docs/handle/classByteStream.html +++ b/docs/handle/classByteStream.html @@ -440,7 +440,7 @@

References isCRCDirty(), m_pData, and ByteStream::RawBuffer::verify().

-

Referenced by Storage::read().

+

Referenced by Storage::read().

@@ -472,7 +472,7 @@

References m_capacity, m_pData, m_position, and vfree.

-

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

+

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

@@ -549,7 +549,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, compress_buffer, compress_size, DEBUG_LOG, DEBUG_LOGF, ByteStream::RawBuffer::flags, is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), recalcCRC(), shrink(), and ByteStream::RawBuffer::size.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

@@ -687,7 +687,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, DEBUG_LOG, DEBUG_LOGF, decompress_buffer, ERROR_LOGF, ByteStream::RawBuffer::flags, init(), is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), sanity(), shrink(), ByteStream::RawBuffer::size, and ByteStream::RawBuffer::verify().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

+

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

@@ -904,7 +904,7 @@

References ByteStream::RawBuffer::buf, clear(), ByteStream::RawBuffer::crc32, ERROR_OUT_OF_MEMORY, ByteStream::RawBuffer::flags, m_capacity, m_pData, ByteStream::RawBuffer::recalcCRC(), size(), ByteStream::RawBuffer::size, and vcalloc.

-

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

+

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

@@ -1406,7 +1406,7 @@

References m_pData.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1492,7 +1492,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1532,7 +1532,7 @@

References BUFFER_FLAG_DIRTY, ByteStream::RawBuffer::crc32, ByteStream::RawBuffer::flags, m_pData, ByteStream::RawBuffer::recalcCRC(), and ByteStream::RawBuffer::size.

-

Referenced by compress(), Randomizer::init(), and SerialComs::write().

+

Referenced by compress(), Randomizer::init(), SerialComs::write(), and Storage::write().

@@ -1559,7 +1559,7 @@

References moveUnserializer().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), and EditorConnection::receiveModes().

+

Referenced by Mode::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), and Modes::unserializeSaveHeader().

@@ -1588,7 +1588,7 @@

References m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by decompress(), rawInit(), and Storage::read().

+

Referenced by decompress(), rawInit(), and Storage::read().

@@ -1698,7 +1698,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_DIRTY, extend(), ByteStream::RawBuffer::flags, m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by operator+=(), SerialComs::read(), Modes::saveToBuffer(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), and VortexEngine::serializeVersion().

+

Referenced by operator+=(), SerialComs::read(), Modes::saveStorage(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), Modes::serializeSaveHeader(), and VortexEngine::serializeVersion().

@@ -1769,7 +1769,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), Modes::unserialize(), and Storage::write().

+

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), Modes::unserialize(), and Storage::write().

@@ -1903,7 +1903,7 @@

References ByteStream::RawBuffer::buf, m_pData, m_position, and ByteStream::RawBuffer::size.

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), and unserialize8().

+

Referenced by Mode::loadFromBuffer(), Modes::loadStorage(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), unserialize8(), and Modes::unserializeSaveHeader().

diff --git a/docs/handle/classColorSelect.html b/docs/handle/classColorSelect.html index ee675e9312..448b6c4be4 100644 --- a/docs/handle/classColorSelect.html +++ b/docs/handle/classColorSelect.html @@ -383,9 +383,9 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
bool isEmpty() const
Definition: Mode.cpp:735
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

@@ -429,7 +429,7 @@

LedMap m_targetLeds
Definition: Menu.h:53
const Colorset getColorset(LedPos pos=LED_ANY) const
Definition: Mode.cpp:467
-

References Modes::curMode(), Mode::getColorset(), m_colorset, Menu::m_targetLeds, MAP_LED_ALL, and mapGetFirstLed().

+

References Modes::curMode(), Mode::getColorset(), m_colorset, Menu::m_targetLeds, MAP_LED_ALL, and mapGetFirstLed().

@@ -472,7 +472,7 @@

122  }
123  // reuse these variables lots
124  uint8_t numColors = m_colorset.numColors();
-
125  uint8_t holdDur = g_pButton->holdDuration();
+
125  uint32_t holdDur = g_pButton->holdDuration();
126  switch (m_state) {
127  case STATE_INIT:
128  // nothing
@@ -545,7 +545,7 @@

virtual void init()
Definition: Mode.cpp:120
bool setColorsetMap(LedMap map, const Colorset &set)
Definition: Mode.cpp:616
-

References Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, Menu::m_curSelection, m_newColor, m_state, m_targetHue1, Menu::m_targetLeds, m_targetSlot, MAX_COLOR_SLOTS, Colorset::numColors(), Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorsetMap(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

+

References Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, Menu::m_curSelection, m_newColor, m_state, m_targetHue1, Menu::m_targetLeds, m_targetSlot, MAX_COLOR_SLOTS, Colorset::numColors(), Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorsetMap(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

@@ -1018,10 +1018,10 @@

SAT_OPTION_2,
}
-
#define SAT_OPTION_3
Definition: VortexConfig.h:291
-
#define SAT_OPTION_2
Definition: VortexConfig.h:290
-
#define SAT_OPTION_4
Definition: VortexConfig.h:292
-
#define SAT_OPTION_1
Definition: VortexConfig.h:289
+
#define SAT_OPTION_3
Definition: VortexConfig.h:290
+
#define SAT_OPTION_2
Definition: VortexConfig.h:289
+
#define SAT_OPTION_4
Definition: VortexConfig.h:291
+
#define SAT_OPTION_1
Definition: VortexConfig.h:288

Definition at line 40 of file ColorSelect.h.

@@ -1054,10 +1054,10 @@

VAL_OPTION_2,
}
-
#define VAL_OPTION_1
Definition: VortexConfig.h:298
-
#define VAL_OPTION_2
Definition: VortexConfig.h:299
-
#define VAL_OPTION_4
Definition: VortexConfig.h:301
-
#define VAL_OPTION_3
Definition: VortexConfig.h:300
+
#define VAL_OPTION_1
Definition: VortexConfig.h:297
+
#define VAL_OPTION_2
Definition: VortexConfig.h:298
+
#define VAL_OPTION_4
Definition: VortexConfig.h:300
+
#define VAL_OPTION_3
Definition: VortexConfig.h:299

Definition at line 48 of file ColorSelect.h.

diff --git a/docs/handle/classColorset.html b/docs/handle/classColorset.html index 0399e394ba..d280e8bc93 100644 --- a/docs/handle/classColorset.html +++ b/docs/handle/classColorset.html @@ -1506,7 +1506,7 @@

References addColorWithValueStyle(), clear(), Random::next8(), numColors(), and VAL_STYLE_COUNT.

-

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

+

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

diff --git a/docs/handle/classEditorConnection.html b/docs/handle/classEditorConnection.html index db8866a205..9a7370fa18 100644 --- a/docs/handle/classEditorConnection.html +++ b/docs/handle/classEditorConnection.html @@ -438,13 +438,13 @@

293  m_state = STATE_CLEAR_DEMO;
294  }
295 }
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:469
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:481
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:468
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:480
bool receiveMessage(const char *message)
-

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

+

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

Referenced by run().

@@ -525,11 +525,11 @@

187  SerialComs::write(EDITOR_VERB_GOODBYE);
188  Menu::leaveMenu(true);
189 }
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:492
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:491
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
static void write(const char *msg,...)
Definition: Serial.cpp:74
-

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

+

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

Referenced by onLongClick().

@@ -819,10 +819,10 @@

248  Modes::saveStorage();
249  return true;
250 }
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:144
-

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

+

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

Referenced by run().

@@ -955,13 +955,13 @@

167  }
168  return MENU_CONTINUE;
169 }
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:466
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:457
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:465
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:456
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:472
@@ -974,7 +974,7 @@

static bool checkSerial()
Definition: Serial.cpp:40
static bool isConnected()
Definition: Serial.cpp:34
-

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

+

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, and SerialComs::write().

@@ -1007,9 +1007,9 @@

218  Modes::saveToBuffer(modesBuffer);
219  SerialComs::write(modesBuffer);
220 }
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:126
-

References Modes::saveToBuffer(), and SerialComs::write().

+

References Modes::saveToBuffer(), and SerialComs::write().

Referenced by run().

diff --git a/docs/handle/classFactoryReset.html b/docs/handle/classFactoryReset.html index f8d5bc473b..7092227660 100644 --- a/docs/handle/classFactoryReset.html +++ b/docs/handle/classFactoryReset.html @@ -284,9 +284,9 @@

uint8_t m_curSelection
Definition: Menu.h:55
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, and MAP_LED.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, and MAP_LED.

@@ -331,7 +331,7 @@

78  if (m_advanced) {
79  uint8_t curModeIndex = Modes::curModeIndex();
80  // reset the target mode slot on the target led
-
81  const default_mode_entry &def = default_modes[curModeIndex];
+
81  const default_mode_entry &def = default_modes[curModeIndex];
82  Colorset set(def.numColors, def.cols);
83  Mode *cur = Modes::curMode();
84  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -347,7 +347,7 @@

94  leaveMenu(true);
95 }
Button * g_pButton
Definition: Buttons.cpp:16
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
#define FACTORY_RESET_THRESHOLD_TICKS
Definition: Timings.h:18
#define DEFAULT_BRIGHTNESS
Definition: VortexConfig.h:149
@@ -357,9 +357,9 @@

virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
virtual void init()
Definition: Mode.cpp:120
-
static void resetFlags()
Definition: Modes.cpp:590
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool setDefaults()
Definition: Modes.cpp:252
+
static void resetFlags()
Definition: Modes.cpp:659
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool setDefaults()
Definition: Modes.cpp:321
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
Definition: DefaultModes.h:9
@@ -367,7 +367,7 @@

PatternID patternID
Definition: DefaultModes.h:10
uint8_t numColors
Definition: DefaultModes.h:11
-

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

+

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

diff --git a/docs/handle/classGlobalBrightness.html b/docs/handle/classGlobalBrightness.html index 1dd7c2aeda..588587e643 100644 --- a/docs/handle/classGlobalBrightness.html +++ b/docs/handle/classGlobalBrightness.html @@ -479,10 +479,10 @@

BRIGHTNESS_OPTION_3,
}
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279

Definition at line 23 of file GlobalBrightness.h.

diff --git a/docs/handle/classLeds.html b/docs/handle/classLeds.html index d6636bf6c7..90a51cd6ee 100644 --- a/docs/handle/classLeds.html +++ b/docs/handle/classLeds.html @@ -1077,7 +1077,7 @@

References HSV_OFF, and setAll().

-

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ModeSharing::onShortClick(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), Menu::showExit(), FactoryReset::showReset(), ModeSharing::showSendModeIR(), ModeSharing::showSendModeVL(), VLSender::startPWM(), and VLSender::stopPWM().

+

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ModeSharing::onShortClick(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), Menu::showExit(), FactoryReset::showReset(), ModeSharing::showSendModeIR(), ModeSharing::showSendModeVL(), VLSender::startPWM(), and VLSender::stopPWM().

@@ -1463,7 +1463,7 @@

References m_brightness.

-

Referenced by GlobalBrightness::init(), Modes::saveToBuffer(), and VLSender::startPWM().

+

Referenced by GlobalBrightness::init(), Modes::serializeSaveHeader(), and VLSender::startPWM().

@@ -1793,7 +1793,7 @@

References m_brightness.

-

Referenced by Modes::loadFromBuffer(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), and VLSender::startPWM().

+

Referenced by FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), VLSender::startPWM(), and Modes::unserializeSaveHeader().

diff --git a/docs/handle/classMenu.html b/docs/handle/classMenu.html index 5b9f046020..42108d1977 100644 --- a/docs/handle/classMenu.html +++ b/docs/handle/classMenu.html @@ -333,12 +333,12 @@

@ PATTERN_STROBE
Definition: Patterns.h:25
Mode m_previewMode
Definition: Menu.h:48
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:474
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static Mode * curMode()
Definition: Modes.cpp:543
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
static uint8_t numModes()
Definition: Modes.h:92
-

References Modes::addMode(), Modes::curMode(), Mode::init(), m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, and RGB_OFF.

+

References Modes::addMode(), Modes::curMode(), Mode::init(), m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, and RGB_OFF.

Referenced by ColorSelect::init(), EditorConnection::init(), FactoryReset::init(), GlobalBrightness::init(), ModeSharing::init(), PatternSelect::init(), Randomizer::init(), and Menus::openMenu().

@@ -377,9 +377,9 @@

171  Modes::saveStorage();
172  }
173 }
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
-

References m_shouldClose, and Modes::saveStorage().

+

References m_shouldClose, and Modes::saveStorage().

Referenced by EditorConnection::leaveMenu(), onLongClick(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveModeIR().

@@ -455,7 +455,7 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-

References Modes::curMode(), Mode::isMultiLed(), LED_COUNT, LED_FIRST, LED_LAST, LED_MULTI, m_targetLeds, MAP_LED, MAP_LED_ALL, MAP_PAIR_EVENS, MAP_PAIR_ODDS, and mapGetFirstLed().

+

References Modes::curMode(), Mode::isMultiLed(), LED_COUNT, LED_FIRST, LED_LAST, LED_MULTI, m_targetLeds, MAP_LED, MAP_LED_ALL, MAP_PAIR_EVENS, MAP_PAIR_ODDS, and mapGetFirstLed().

Referenced by run().

diff --git a/docs/handle/classMode.html b/docs/handle/classMode.html index 925c21bf49..b94d50452d 100644 --- a/docs/handle/classMode.html +++ b/docs/handle/classMode.html @@ -917,7 +917,7 @@

References getPattern(), Pattern::getPatternID(), and PATTERN_NONE.

-

Referenced by isEmpty(), PatternSelect::onShortClick(), Randomizer::run(), and Modes::setCurMode().

+

Referenced by isEmpty(), PatternSelect::onShortClick(), Randomizer::run(), and Modes::setCurMode().

@@ -1137,7 +1137,7 @@

References Pattern::init(), LED_FIRST, m_multiPat, m_singlePats, and MODE_LEDCOUNT.

-

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and Randomizer::run().

+

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onShortClick(), Randomizer::reRoll(), and Randomizer::run().

@@ -1268,7 +1268,7 @@

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, init(), ByteStream::resetUnserializer(), unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), and IRReceiver::receiveMode().

+

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), and IRReceiver::receiveMode().

@@ -1473,7 +1473,7 @@

References ByteStream::compress(), DEBUG_LOGF, serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

-

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

+

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

@@ -1561,7 +1561,7 @@

References getFlags(), getSingleLedMap(), LED_FIRST, m_multiPat, m_singlePats, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, MODE_LEDCOUNT, Pattern::serialize(), and ByteStream::serialize().

-

Referenced by saveToBuffer(), and Modes::serialize().

+

Referenced by Modes::saveStorage(), saveToBuffer(), and Modes::serialize().

@@ -2030,7 +2030,7 @@

References Pattern::bind(), clearPattern(), PatternBuilder::dupe(), Pattern::init(), LED_ALL, LED_COUNT, LED_FIRST, m_multiPat, m_singlePats, MAP_FOREACH_LED, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, PatternBuilder::unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

+

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

diff --git a/docs/handle/classModeSharing.html b/docs/handle/classModeSharing.html index 94567f2cfe..f6e661709f 100644 --- a/docs/handle/classModeSharing.html +++ b/docs/handle/classModeSharing.html @@ -379,9 +379,9 @@

static bool send()
Definition: IRSender.cpp:83
void beginReceivingIR()
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, IRSender::isSending(), IRSender::loadMode(), m_sharingMode, IRSender::send(), and SHARE_SEND_IR.

+

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, IRSender::isSending(), IRSender::loadMode(), m_sharingMode, IRSender::send(), and SHARE_SEND_IR.

Referenced by onShortClick().

@@ -431,7 +431,7 @@

static bool send()
Definition: VLSender.cpp:76
static bool isSending()
Definition: VLSender.h:25
-

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, VLSender::isSending(), VLSender::loadMode(), m_sharingMode, VLSender::send(), and SHARE_SEND_VL.

+

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, VLSender::isSending(), VLSender::loadMode(), m_sharingMode, VLSender::send(), and SHARE_SEND_VL.

@@ -596,9 +596,9 @@

91 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
Mode m_previewMode
Definition: Menu.h:48
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
-

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

@@ -710,7 +710,7 @@

bool m_advanced
Definition: Menu.h:59
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

+

References IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

Referenced by run().

diff --git a/docs/handle/classModes-members.html b/docs/handle/classModes-members.html index c0ecd3ec61..acddb551c1 100644 --- a/docs/handle/classModes-members.html +++ b/docs/handle/classModes-members.html @@ -128,17 +128,19 @@ saveStorage()Modesstatic saveToBuffer(ByteStream &saveBuffer)Modesstatic serialize(ByteStream &buffer)Modesstatic - setAdvancedMenus(bool active, bool save=true)Modesinlinestatic - setCurMode(uint8_t index)Modesstatic - setDefaults()Modesstatic - setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic - setKeychainMode(bool active, bool save=true)Modesinlinestatic - setLocked(bool locked, bool save=true)Modesinlinestatic - setOneClickMode(bool enable, bool save=true)Modesinlinestatic - setStartupMode(uint8_t index)Modesstatic - shiftCurMode(int32_t offset=1)Modesstatic - startupMode()Modesstatic - unserialize(ByteStream &buffer)Modesstatic + serializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic + setAdvancedMenus(bool active, bool save=true)Modesinlinestatic + setCurMode(uint8_t index)Modesstatic + setDefaults()Modesstatic + setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic + setKeychainMode(bool active, bool save=true)Modesinlinestatic + setLocked(bool locked, bool save=true)Modesinlinestatic + setOneClickMode(bool enable, bool save=true)Modesinlinestatic + setStartupMode(uint8_t index)Modesstatic + shiftCurMode(int32_t offset=1)Modesstatic + startupMode()Modesstatic + unserialize(ByteStream &buffer)Modesstatic + unserializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic updateCurMode(const Mode *mode)Modesstatic diff --git a/docs/handle/classModes.html b/docs/handle/classModes.html index 62e2b8697c..df40359afd 100644 --- a/docs/handle/classModes.html +++ b/docs/handle/classModes.html @@ -198,6 +198,10 @@ + + + + @@ -274,36 +278,36 @@

-

Definition at line 390 of file Modes.cpp.

-
391 {
-
392 #if MAX_MODES != 0
-
393  // max modes
-
394  if (m_numModes >= MAX_MODES) {
-
395  return false;
-
396  }
-
397 #endif
-
398  if (!m_storedModes) {
-
399  m_storedModes = new ModeLink(mode);
-
400  if (!m_storedModes) {
- -
402  return false;
-
403  }
-
404  } else {
-
405  if (!m_storedModes->append(mode)) {
- -
407  return false;
-
408  }
-
409  }
-
410  m_numModes++;
-
411  return true;
-
412 }
+

Definition at line 459 of file Modes.cpp.

+
460 {
+
461 #if MAX_MODES != 0
+
462  // max modes
+
463  if (m_numModes >= MAX_MODES) {
+
464  return false;
+
465  }
+
466 #endif
+
467  if (!m_storedModes) {
+
468  m_storedModes = new ModeLink(mode);
+
469  if (!m_storedModes) {
+ +
471  return false;
+
472  }
+
473  } else {
+
474  if (!m_storedModes->append(mode)) {
+ +
476  return false;
+
477  }
+
478  }
+
479  m_numModes++;
+
480  return true;
+
481 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
-
#define MAX_MODES
Definition: VortexConfig.h:168
- -
static ModeLink * m_storedModes
Definition: Modes.h:220
-
static uint8_t m_numModes
Definition: Modes.h:214
+
#define MAX_MODES
Definition: VortexConfig.h:167
+ +
static ModeLink * m_storedModes
Definition: Modes.h:223
+
static uint8_t m_numModes
Definition: Modes.h:217
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -347,29 +351,29 @@

-

Definition at line 371 of file Modes.cpp.

-
372 {
-
373  // max modes
-
374 #if MAX_MODES != 0
-
375  if (m_numModes >= MAX_MODES) {
-
376  return false;
-
377  }
-
378 #endif
-
379  if (id >= PATTERN_COUNT) {
-
380  return false;
-
381  }
-
382  Mode tmpMode(id, args, set);
-
383  // must init the mode so that it can be serialized
-
384  tmpMode.init();
-
385  // not a very good way to do this but it ensures the mode is
-
386  // added in the same way
-
387  return addMode(&tmpMode);
-
388 }
+

Definition at line 440 of file Modes.cpp.

+
441 {
+
442  // max modes
+
443 #if MAX_MODES != 0
+
444  if (m_numModes >= MAX_MODES) {
+
445  return false;
+
446  }
+
447 #endif
+
448  if (id >= PATTERN_COUNT) {
+
449  return false;
+
450  }
+
451  Mode tmpMode(id, args, set);
+
452  // must init the mode so that it can be serialized
+
453  tmpMode.init();
+
454  // not a very good way to do this but it ensures the mode is
+
455  // added in the same way
+
456  return addMode(&tmpMode);
+
457 }
@ PATTERN_COUNT
Definition: Patterns.h:101
Definition: Mode.h:38
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:364
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:433
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

@@ -449,14 +453,14 @@

-

Definition at line 364 of file Modes.cpp.

-
366 {
-
367  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
368  return addMode(id, nullptr, &set);
-
369 }
+

Definition at line 433 of file Modes.cpp.

+
435 {
+
436  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
437  return addMode(id, nullptr, &set);
+
438 }
-

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

+

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

@@ -484,23 +488,23 @@

-

Definition at line 307 of file Modes.cpp.

-
308 {
-
309 #if MAX_MODES != 0
-
310  if (m_numModes >= MAX_MODES) {
-
311  return false;
-
312  }
-
313 #endif
-
314  if (!m_storedModes->append(serializedMode)) {
- -
316  return false;
-
317  }
-
318  // increment mode counter
-
319  m_numModes++;
-
320  return true;
-
321 }
+

Definition at line 376 of file Modes.cpp.

+
377 {
+
378 #if MAX_MODES != 0
+
379  if (m_numModes >= MAX_MODES) {
+
380  return false;
+
381  }
+
382 #endif
+
383  if (!m_storedModes->append(serializedMode)) {
+ +
385  return false;
+
386  }
+
387  // increment mode counter
+
388  m_numModes++;
+
389  return true;
+
390 }
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -528,31 +532,31 @@

-

Definition at line 287 of file Modes.cpp.

-
288 {
-
289 #if MAX_MODES != 0
-
290  if (m_numModes >= MAX_MODES) {
-
291  return false;
-
292  }
-
293 #endif
-
294  // we must unserialize then re-serialize here because the
-
295  // input argument may contain other patterns in the buffer
-
296  // so we cannot just append the input arg to m_storedModes
-
297  Mode tmpMode;
-
298  if (!tmpMode.unserialize(serializedMode)) {
-
299  return false;
-
300  }
-
301  // initialize the mode because a pattern could theoretically serialize
-
302  // differently after it has initialized
-
303  tmpMode.init();
-
304  return addMode(&tmpMode);
-
305 }
+

Definition at line 356 of file Modes.cpp.

+
357 {
+
358 #if MAX_MODES != 0
+
359  if (m_numModes >= MAX_MODES) {
+
360  return false;
+
361  }
+
362 #endif
+
363  // we must unserialize then re-serialize here because the
+
364  // input argument may contain other patterns in the buffer
+
365  // so we cannot just append the input arg to m_storedModes
+
366  Mode tmpMode;
+
367  if (!tmpMode.unserialize(serializedMode)) {
+
368  return false;
+
369  }
+
370  // initialize the mode because a pattern could theoretically serialize
+
371  // differently after it has initialized
+
372  tmpMode.init();
+
373  return addMode(&tmpMode);
+
374 }
virtual void init()
Definition: Mode.cpp:120
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

-

Referenced by unserialize().

+

Referenced by loadStorage(), and unserialize().

@@ -584,9 +588,9 @@

133  return getFlag(MODES_FLAG_ADV_MENUS);
134  }
#define MODES_FLAG_ADV_MENUS
Definition: Modes.h:22
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:585
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:654
-

References getFlag(), and MODES_FLAG_ADV_MENUS.

+

References getFlag(), and MODES_FLAG_ADV_MENUS.

Referenced by Menus::runMenuSelection().

@@ -619,9 +623,9 @@

54 {
55  clearModes();
56 }
-
static void clearModes()
Definition: Modes.cpp:544
+
static void clearModes()
Definition: Modes.cpp:613
-

References clearModes().

+

References clearModes().

Referenced by VortexEngine::cleanup().

@@ -650,25 +654,25 @@

-

Definition at line 544 of file Modes.cpp.

-
545 {
-
546  if (!m_numModes || !m_storedModes) {
-
547  return;
-
548  }
-
549  // delete the first node and it will delete the entire chain
-
550  delete m_storedModes;
-
551  m_pCurModeLink = nullptr;
-
552  m_storedModes = nullptr;
-
553  m_numModes = 0;
-
554  // might as well clear the leds
-
555  Leds::clearAll();
-
556 }
+

Definition at line 613 of file Modes.cpp.

+
614 {
+
615  if (!m_numModes || !m_storedModes) {
+
616  return;
+
617  }
+
618  // delete the first node and it will delete the entire chain
+
619  delete m_storedModes;
+
620  m_pCurModeLink = nullptr;
+
621  m_storedModes = nullptr;
+
622  m_numModes = 0;
+
623  // might as well clear the leds
+
624  Leds::clearAll();
+
625 }
static void clearAll()
Definition: Leds.h:30
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
-

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

+

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

-

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

+

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

@@ -695,28 +699,28 @@

-

Definition at line 474 of file Modes.cpp.

-
475 {
-
476  // empty mode list
-
477  if (!m_numModes) {
-
478  return nullptr;
-
479  }
-
480  if (!m_pCurModeLink) {
-
481  if (!initCurMode()) {
-
482  ERROR_LOG("Failed to initialize current mode");
-
483  return nullptr;
-
484  }
-
485  }
-
486  // get current mode, instantiate it if necessary
-
487  return m_pCurModeLink->instantiate();
-
488 }
+

Definition at line 543 of file Modes.cpp.

+
544 {
+
545  // empty mode list
+
546  if (!m_numModes) {
+
547  return nullptr;
+
548  }
+
549  if (!m_pCurModeLink) {
+
550  if (!initCurMode()) {
+
551  ERROR_LOG("Failed to initialize current mode");
+
552  return nullptr;
+
553  }
+
554  }
+
555  // get current mode, instantiate it if necessary
+
556  return m_pCurModeLink->instantiate();
+
557 }
#define ERROR_LOG(msg)
Definition: Log.h:29
- -
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:672
+ +
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:741
-

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

+

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

-

Referenced by ModeSharing::beginSendingIR(), ModeSharing::beginSendingVL(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), Menu::nextBulbSelection(), nextModeSkipEmpty(), ColorSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), and updateCurMode().

+

Referenced by ModeSharing::beginSendingIR(), ModeSharing::beginSendingVL(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), Menu::nextBulbSelection(), nextModeSkipEmpty(), ColorSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), and updateCurMode().

@@ -745,9 +749,9 @@

Definition at line 93 of file Modes.h.

93 { return m_curMode; }
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static uint8_t m_curMode
Definition: Modes.h:214
-

References m_curMode.

+

References m_curMode.

Referenced by VortexEngine::enterSleep(), and FactoryReset::onLongClick().

@@ -776,29 +780,29 @@

-

Definition at line 523 of file Modes.cpp.

-
524 {
-
525  if (!m_numModes || !m_pCurModeLink) {
-
526  return;
-
527  }
-
528  // unlink the current mode so it can be deleted and
-
529  // update the current mode link accordingly
-
530  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
531  delete m_pCurModeLink;
-
532  m_pCurModeLink = newCur;
-
533  if (m_curMode) {
-
534  m_curMode--;
-
535  } else {
- -
537  }
-
538  m_numModes--;
-
539  if (!m_numModes) {
-
540  m_storedModes = nullptr;
-
541  }
-
542 }
- +

Definition at line 592 of file Modes.cpp.

+
593 {
+
594  if (!m_numModes || !m_pCurModeLink) {
+
595  return;
+
596  }
+
597  // unlink the current mode so it can be deleted and
+
598  // update the current mode link accordingly
+
599  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
600  delete m_pCurModeLink;
+
601  m_pCurModeLink = newCur;
+
602  if (m_curMode) {
+
603  m_curMode--;
+
604  } else {
+ +
606  }
+
607  m_numModes--;
+
608  if (!m_numModes) {
+
609  m_storedModes = nullptr;
+
610  }
+
611 }
+
-

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

+

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

@@ -826,13 +830,13 @@

-

Definition at line 585 of file Modes.cpp.

-
586 {
-
587  return ((m_globalFlags & flag) != 0);
-
588 }
-
static uint8_t m_globalFlags
Definition: Modes.h:223
+

Definition at line 654 of file Modes.cpp.

+
655 {
+
656  return ((m_globalFlags & flag) != 0);
+
657 }
+
static uint8_t m_globalFlags
Definition: Modes.h:226
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by advancedMenusEnabled(), keychainModeEnabled(), locked(), and oneClickModeEnabled().

@@ -862,23 +866,23 @@

-

Definition at line 659 of file Modes.cpp.

-
660 {
-
661  if (index >= m_numModes) {
-
662  return nullptr;
-
663  }
-
664  ModeLink *ptr = m_storedModes;
-
665  while (index > 0 && ptr) {
-
666  ptr = ptr->next();
-
667  index--;
-
668  }
-
669  return ptr;
-
670 }
- +

Definition at line 728 of file Modes.cpp.

+
729 {
+
730  if (index >= m_numModes) {
+
731  return nullptr;
+
732  }
+
733  ModeLink *ptr = m_storedModes;
+
734  while (index > 0 && ptr) {
+
735  ptr = ptr->next();
+
736  index--;
+
737  }
+
738  return ptr;
+
739 }
+
-

References m_numModes, m_storedModes, and Modes::ModeLink::next().

+

References m_numModes, m_storedModes, and Modes::ModeLink::next().

-

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

+

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

@@ -927,11 +931,11 @@

49 #endif
50  return true;
51 }
-
static bool saveStorage()
Definition: Modes.cpp:166
-
static bool setDefaults()
Definition: Modes.cpp:252
-
static bool loadStorage()
Definition: Modes.cpp:149
+
static bool saveStorage()
Definition: Modes.cpp:205
+
static bool setDefaults()
Definition: Modes.cpp:321
+
static bool loadStorage()
Definition: Modes.cpp:168
-

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

+

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

Referenced by VortexEngine::init().

@@ -961,31 +965,31 @@

-

Definition at line 672 of file Modes.cpp.

-
673 {
-
674  if (!m_numModes) {
-
675  return nullptr;
-
676  }
-
677  // cleanup the current mode link
-
678  if (m_pCurModeLink) {
- -
680  }
-
681  // update the current mode link based on the curmode index
- -
683  if (!m_pCurModeLink) {
-
684  return nullptr;
-
685  }
-
686  if (force) {
- -
688  }
-
689  return m_pCurModeLink->instantiate();
-
690 }
- -
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:659
+

Definition at line 741 of file Modes.cpp.

+
742 {
+
743  if (!m_numModes) {
+
744  return nullptr;
+
745  }
+
746  // cleanup the current mode link
+
747  if (m_pCurModeLink) {
+ +
749  }
+
750  // update the current mode link based on the curmode index
+ +
752  if (!m_pCurModeLink) {
+
753  return nullptr;
+
754  }
+
755  if (force) {
+ +
757  }
+
758  return m_pCurModeLink->instantiate();
+
759 }
+ +
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:728
-

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

+

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

-

Referenced by curMode(), play(), and updateCurMode().

+

Referenced by curMode(), play(), and updateCurMode().

@@ -1018,7 +1022,7 @@

141  }
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
-

References getFlag(), and MODES_FLAG_KEYCHAIN.

+

References getFlag(), and MODES_FLAG_KEYCHAIN.

@@ -1047,9 +1051,9 @@

Definition at line 96 of file Modes.h.

96 { return m_lastSwitchTime; }
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
-

References m_lastSwitchTime.

+

References m_lastSwitchTime.

Referenced by VortexEngine::runMainLogic().

@@ -1079,59 +1083,38 @@

-

Definition at line 106 of file Modes.cpp.

-
107 {
-
108  if (!modesBuffer.decompress()) {
-
109  // failed to decompress?
-
110  return false;
-
111  }
-
112  // reset the unserializer index before unserializing anything
-
113  modesBuffer.resetUnserializer();
-
114  uint8_t major = 0;
-
115  uint8_t minor = 0;
-
116  // unserialize the vortex version
-
117  modesBuffer.unserialize(&major);
-
118  modesBuffer.unserialize(&minor);
-
119  // check the version for incompatibility
-
120  if (!VortexEngine::checkVersion(major, minor)) {
-
121  // incompatible version
-
122  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
123  return false;
-
124  }
-
125  // NOTE: instead of global brightness the duo uses this to store the
-
126  // startup mode ID. The duo doesn't offer a global brightness option
-
127  // unserialize the global brightness
-
128  modesBuffer.unserialize(&m_globalFlags);
-
129  // unserialize the global brightness
-
130  uint8_t brightness = 0;
-
131  modesBuffer.unserialize(&brightness);
-
132  if (brightness) {
-
133  Leds::setBrightness(brightness);
-
134  }
-
135  // now just unserialize the list of modes
-
136  if (!unserialize(modesBuffer)) {
-
137  return false;
-
138  }
-
139  // startupMode is 1-based offset that encodes both the index to start at and
-
140  // whether the system is enabled, hence why 0 cannot be used as an offset
-
141  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
142  if (oneClickModeEnabled() && startupMode > 0) {
-
143  // set the current mode to the startup mode
- -
145  }
-
146  return true;
-
147 }
-
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
-
static void setBrightness(uint8_t brightness)
Definition: Leds.h:105
+

Definition at line 144 of file Modes.cpp.

+
145 {
+
146  if (!modesBuffer.decompress()) {
+
147  // failed to decompress?
+
148  return false;
+
149  }
+
150  // read out the header first
+
151  if (!unserializeSaveHeader(modesBuffer)) {
+
152  return false;
+
153  }
+
154  // now just unserialize the list of modes
+
155  if (!unserialize(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // startupMode is 1-based offset that encodes both the index to start at and
+
159  // whether the system is enabled, hence why 0 cannot be used as an offset
+
160  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
161  if (oneClickModeEnabled() && startupMode > 0) {
+
162  // set the current mode to the startup mode
+ +
164  }
+
165  return true;
+
166 }
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static uint8_t startupMode()
Definition: Modes.cpp:566
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:434
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:222
-
static bool checkVersion(uint8_t major, uint8_t minor)
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:97
+
static uint8_t startupMode()
Definition: Modes.cpp:635
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:503
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:291
-

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, m_globalFlags, oneClickModeEnabled(), ByteStream::resetUnserializer(), Leds::setBrightness(), setCurMode(), startupMode(), unserialize(), and ByteStream::unserialize().

+

References ByteStream::decompress(), m_globalFlags, oneClickModeEnabled(), setCurMode(), startupMode(), unserialize(), and unserializeSaveHeader().

-

Referenced by loadStorage(), and EditorConnection::receiveModes().

+

Referenced by EditorConnection::receiveModes().

@@ -1158,27 +1141,50 @@

-

Definition at line 149 of file Modes.cpp.

-
150 {
-
151  // this is good on memory, but it erases what they have stored
-
152  // before we know whether there is something actually saved
-
153  clearModes();
-
154  ByteStream modesBuffer;
-
155  // only read storage if the modebuffer isn't filled
-
156  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
157  DEBUG_LOG("Empty buffer read from storage");
-
158  // this kinda sucks whatever they had loaded is gone
-
159  return false;
-
160  }
-
161  return loadFromBuffer(modesBuffer);
-
162 }
+

Definition at line 168 of file Modes.cpp.

+
169 {
+
170  ByteStream headerBuffer;
+
171  // only read storage if the modebuffer isn't filled
+
172  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
173  DEBUG_LOG("Empty buffer read from storage");
+
174  // this kinda sucks whatever they had loaded is gone
+
175  return false;
+
176  }
+
177  // this erases what is stored before we know whether there is data
+
178  // but it's the easiest way to just re-load new data from storage
+
179  clearModes();
+
180  // read the header and load the data
+
181  if (!unserializeSaveHeader(headerBuffer)) {
+
182  return false;
+
183  }
+
184  // unserialize the number of modes next
+
185  uint8_t numModes = 0;
+
186  headerBuffer.unserialize(&numModes);
+
187  if (!numModes) {
+
188  DEBUG_LOG("Did not find any modes");
+
189  // this kinda sucks whatever they had loaded is gone
+
190  return false;
+
191  }
+
192  // iterate each mode and read it out of it's storage slot then add it
+
193  for (uint8_t i = 0; i < numModes; ++i) {
+
194  ByteStream modeBuffer(MAX_MODE_SIZE);
+
195  // read each mode from a storage slot and load it
+
196  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
197  return false;
+
198  }
+
199  }
+
200  return true;
+
201 }
#define DEBUG_LOG(msg)
Definition: Log.h:40
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
bool unserialize(uint8_t *byte)
Definition: ByteStream.cpp:417
uint32_t size() const
Definition: ByteStream.h:123
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:106
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:356
+
static uint8_t numModes()
Definition: Modes.h:92
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
-

References clearModes(), DEBUG_LOG, loadFromBuffer(), Storage::read(), and ByteStream::size().

+

References addSerializedMode(), clearModes(), DEBUG_LOG, MAX_MODE_SIZE, numModes(), Storage::read(), ByteStream::size(), ByteStream::unserialize(), and unserializeSaveHeader().

Referenced by init().

@@ -1213,7 +1219,7 @@

127  }

#define MODES_FLAG_LOCKED
Definition: Modes.h:18
-

References getFlag(), and MODES_FLAG_LOCKED.

+

References getFlag(), and MODES_FLAG_LOCKED.

Referenced by setLocked(), and VortexEngine::tick().

@@ -1242,16 +1248,16 @@

-

Definition at line 491 of file Modes.cpp.

-
492 {
-
493  if (!m_numModes) {
-
494  return nullptr;
-
495  }
-
496  // iterate the cur mode forward
-
497  return setCurMode(m_curMode + 1);
-
498 }
+

Definition at line 560 of file Modes.cpp.

+
561 {
+
562  if (!m_numModes) {
+
563  return nullptr;
+
564  }
+
565  // iterate the cur mode forward
+
566  return setCurMode(m_curMode + 1);
+
567 }
-

References m_curMode, m_numModes, and setCurMode().

+

References m_curMode, m_numModes, and setCurMode().

@@ -1278,18 +1284,18 @@

-

Definition at line 513 of file Modes.cpp.

-
514 {
-
515  do {
-
516  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
517  break;
-
518  }
-
519  } while (m_curMode != 0);
-
520  return curMode();
-
521 }
-
static Mode * curMode()
Definition: Modes.cpp:474
+

Definition at line 582 of file Modes.cpp.

+
583 {
+
584  do {
+
585  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
586  break;
+
587  }
+
588  } while (m_curMode != 0);
+
589  return curMode();
+
590 }
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References curMode(), m_curMode, and setCurMode().

+

References curMode(), m_curMode, and setCurMode().

Referenced by play(), and VortexEngine::runMainLogic().

@@ -1321,9 +1327,9 @@

Definition at line 92 of file Modes.h.

92 { return m_numModes; }
-

References m_numModes.

+

References m_numModes.

-

Referenced by Menu::init(), previousMode(), and unserialize().

+

Referenced by Menu::init(), loadStorage(), previousMode(), and unserialize().

@@ -1356,9 +1362,9 @@

120  }
#define MODES_FLAG_ONE_CLICK
Definition: Modes.h:20
-

References getFlag(), and MODES_FLAG_ONE_CLICK.

+

References getFlag(), and MODES_FLAG_ONE_CLICK.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -1406,10 +1412,10 @@

76 }
Button * g_pButton
Definition: Buttons.cpp:16
bool onShortClick() const
Definition: Button.h:34
- -
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+ +
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
-

References Leds::clearAll(), DEBUG_LOG, g_pButton, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), and Modes::ModeLink::play().

+

References Leds::clearAll(), DEBUG_LOG, g_pButton, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), and Modes::ModeLink::play().

Referenced by VortexEngine::runMainLogic().

@@ -1438,20 +1444,19 @@

-

Definition at line 501 of file Modes.cpp.

-
502 {
-
503  if (!m_numModes) {
-
504  return nullptr;
-
505  }
-
506  // iterate the cur mode backwards
-
507  if (!m_curMode) {
-
508  return setCurMode(numModes() - 1);
-
509  }
-
510  return setCurMode(m_curMode - 1);
-
511 }
-
static uint8_t numModes()
Definition: Modes.h:92
+

Definition at line 570 of file Modes.cpp.

+
571 {
+
572  if (!m_numModes) {
+
573  return nullptr;
+
574  }
+
575  // iterate the cur mode backwards
+
576  if (!m_curMode) {
+
577  return setCurMode(numModes() - 1);
+
578  }
+
579  return setCurMode(m_curMode - 1);
+
580 }
-

References m_curMode, m_numModes, numModes(), and setCurMode().

+

References m_curMode, m_numModes, numModes(), and setCurMode().

@@ -1478,12 +1483,12 @@

-

Definition at line 590 of file Modes.cpp.

-
591 {
-
592  m_globalFlags = 0;
-
593 }
+

Definition at line 659 of file Modes.cpp.

+
660 {
+
661  m_globalFlags = 0;
+
662 }
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by FactoryReset::onLongClick().

@@ -1512,21 +1517,21 @@

-

Definition at line 692 of file Modes.cpp.

-
693 {
-
694  if (!m_pCurModeLink) {
-
695  // if there's no loaded mode currently then there's nothing
-
696  // to save so there's no error
-
697  return false;
-
698  }
-
699  // force the current mode to save back to serial to catch changes
-
700  return m_pCurModeLink->save();
-
701 }
- +

Definition at line 761 of file Modes.cpp.

+
762 {
+
763  if (!m_pCurModeLink) {
+
764  // if there's no loaded mode currently then there's nothing
+
765  // to save so there's no error
+
766  return false;
+
767  }
+
768  // force the current mode to save back to serial to catch changes
+
769  return m_pCurModeLink->save();
+
770 }
+
-

References m_pCurModeLink, and Modes::ModeLink::save().

+

References m_pCurModeLink, and Modes::ModeLink::save().

-

Referenced by serialize(), and updateCurMode().

+

Referenced by saveStorage(), serialize(), and updateCurMode().

@@ -1553,31 +1558,63 @@

-

Definition at line 166 of file Modes.cpp.

-
167 {
-
168  DEBUG_LOG("Saving modes...");
-
169  // A ByteStream to hold all the serialized data
-
170  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
171  // save data to the buffer
-
172  if (!saveToBuffer(modesBuffer)) {
-
173  return false;
-
174  }
-
175  // write the serial buffer to flash storage, this
-
176  // will compress the buffer and include crc/flags
-
177  if (!Storage::write(modesBuffer)) {
-
178  DEBUG_LOG("Failed to write storage");
-
179  return false;
-
180  }
-
181  DEBUG_LOG("Success saving modes to storage");
-
182  return true;
-
183 }
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:79
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
+

Definition at line 205 of file Modes.cpp.

+
206 {
+
207  DEBUG_LOG("Saving modes...");
+
208  ByteStream headerBuffer(MAX_MODE_SIZE);
+
209  if (!serializeSaveHeader(headerBuffer)) {
+
210  return false;
+
211  }
+
212  // serialize the number of modes
+
213  if (!headerBuffer.serialize(m_numModes)) {
+
214  return false;
+
215  }
+
216  if (!Storage::write(0, headerBuffer)) {
+
217  return false;
+
218  }
+
219  // make sure the current mode is saved in case it has changed somehow
+
220  saveCurMode();
+
221  // uninstantiate cur mode so we have stack space to serialize
+
222  if (m_pCurModeLink) {
+ +
224  }
+
225  uint16_t i = 0;
+
226  ModeLink *ptr = m_storedModes;
+
227  while (ptr && i < MAX_MODES) {
+
228  ByteStream modeBuffer(MAX_MODE_SIZE);
+
229  // instantiate the mode temporarily
+
230  Mode *mode = ptr->instantiate();
+
231  if (!mode) {
+ +
233  return false;
+
234  }
+
235  // serialize it into the target modes buffer
+
236  mode->serialize(modeBuffer);
+
237  // just uninstansiate the mode after serializing
+
238  ptr->uninstantiate();
+
239  // next mode
+
240  ptr = ptr->next();
+
241  // now write this mode into a storage slot (skip first slot, that's header)
+
242  if (!Storage::write(++i, modeBuffer)) {
+
243  return false;
+
244  }
+
245  }
+
246  // reinstanstiate the current mode
+ +
248  return false;
+
249  }
+
250  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
251  return true;
+
252 }
+
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
+
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
+
static bool saveCurMode()
Definition: Modes.cpp:761
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:78
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
-

References DEBUG_LOG, saveToBuffer(), STORAGE_SIZE, and Storage::write().

+

References DEBUG_LOG, DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, MAX_MODE_SIZE, MAX_MODES, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), serializeSaveHeader(), Modes::ModeLink::uninstantiate(), and Storage::write().

-

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

+

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

@@ -1605,39 +1642,27 @@

-

Definition at line 79 of file Modes.cpp.

-
80 {
-
81  // serialize the engine version into the modes buffer
-
82  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
83  return false;
-
84  }
-
85  // NOTE: instead of global brightness the duo uses this to store the
-
86  // startup mode ID. The duo doesn't offer a global brightness option
-
87  if (!modesBuffer.serialize(m_globalFlags)) {
-
88  return false;
-
89  }
-
90  // serialize the global brightness
-
91  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
92  return false;
-
93  }
-
94  // serialize all modes data into the modesBuffer
-
95  if (!serialize(modesBuffer)) {
-
96  return false;
-
97  }
-
98  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
99  if (!modesBuffer.compress()) {
-
100  return false;
-
101  }
-
102  return true;
-
103 }
-
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
-
static uint8_t getBrightness()
Definition: Leds.h:104
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:186
-
static bool serializeVersion(ByteStream &stream)
+

Definition at line 126 of file Modes.cpp.

+
127 {
+
128  // first write out the header
+
129  if (!serializeSaveHeader(modesBuffer)) {
+
130  return false;
+
131  }
+
132  // serialize all modes data into the modesBuffer
+
133  if (!serialize(modesBuffer)) {
+
134  return false;
+
135  }
+
136  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
137  if (!modesBuffer.compress()) {
+
138  return false;
+
139  }
+
140  return true;
+
141 }
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:255
-

References ByteStream::compress(), DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, serialize(), ByteStream::serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

+

References ByteStream::compress(), DEBUG_LOGF, serialize(), serializeSaveHeader(), and ByteStream::size().

-

Referenced by saveStorage(), and EditorConnection::sendModes().

+

Referenced by EditorConnection::sendModes().

@@ -1665,46 +1690,96 @@

-

Definition at line 186 of file Modes.cpp.

-
187 {
-
188  // serialize the number of modes
-
189  if (!modesBuffer.serialize(m_numModes)) {
-
190  return false;
-
191  }
-
192  // make sure the current mode is saved in case it has changed somehow
-
193  saveCurMode();
-
194  // uninstantiate cur mode so we have stack space to serialize
-
195  if (m_pCurModeLink) {
- -
197  }
-
198  ModeLink *ptr = m_storedModes;
-
199  while (ptr) {
-
200  // instantiate the mode temporarily
-
201  Mode *mode = ptr->instantiate();
-
202  if (!mode) {
- -
204  return false;
-
205  }
-
206  // serialize it into the target modes buffer
-
207  mode->serialize(modesBuffer);
-
208  // just uninstansiate the mode after serializing
-
209  ptr->uninstantiate();
-
210  // next mode
-
211  ptr = ptr->next();
-
212  }
-
213  // reinstanstiate the current mode
- -
215  return false;
-
216  }
-
217  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
218  return true;
-
219 }
-
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
-
static bool saveCurMode()
Definition: Modes.cpp:692
+

Definition at line 255 of file Modes.cpp.

+
256 {
+
257  // serialize the number of modes
+
258  if (!modesBuffer.serialize(m_numModes)) {
+
259  return false;
+
260  }
+
261  // make sure the current mode is saved in case it has changed somehow
+
262  saveCurMode();
+
263  // uninstantiate cur mode so we have stack space to serialize
+
264  if (m_pCurModeLink) {
+ +
266  }
+
267  ModeLink *ptr = m_storedModes;
+
268  while (ptr) {
+
269  // instantiate the mode temporarily
+
270  Mode *mode = ptr->instantiate();
+
271  if (!mode) {
+ +
273  return false;
+
274  }
+
275  // serialize it into the target modes buffer
+
276  mode->serialize(modesBuffer);
+
277  // just uninstansiate the mode after serializing
+
278  ptr->uninstantiate();
+
279  // next mode
+
280  ptr = ptr->next();
+
281  }
+
282  // reinstanstiate the current mode
+ +
284  return false;
+
285  }
+
286  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
287  return true;
+
288 }
+
+

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+ +

Referenced by saveToBuffer().

+ +
+ + +

◆ serializeSaveHeader()

+ +
+
+

Static Private Member Functions

static bool serializeSaveHeader (ByteStream &saveBuffer)
 
static bool unserializeSaveHeader (ByteStream &saveBuffer)
 
static ModeLinkgetModeLink (uint32_t index)
 
static ModeinitCurMode (bool force=false)
+ + + + +
+ + + + + + + + +
bool Modes::serializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 78 of file Modes.cpp.

+
79 {
+
80  // serialize the engine version into the modes buffer
+
81  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
82  return false;
+
83  }
+
84  // NOTE: instead of global brightness the duo uses this to store the
+
85  // startup mode ID. The duo doesn't offer a global brightness option
+
86  if (!saveBuffer.serialize(m_globalFlags)) {
+
87  return false;
+
88  }
+
89  // serialize the global brightness
+
90  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
91  return false;
+
92  }
+
93  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
94  return true;
+
95 }
+
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
+
static uint8_t getBrightness()
Definition: Leds.h:104
+
static bool serializeVersion(ByteStream &stream)
-

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+

References DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, ByteStream::serialize(), and VortexEngine::serializeVersion().

-

Referenced by saveToBuffer().

+

Referenced by saveStorage(), and saveToBuffer().

@@ -1746,9 +1821,9 @@

129  {
130  return setFlag(MODES_FLAG_ADV_MENUS, active, save);
131  }
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:572
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:641
-

References MODES_FLAG_ADV_MENUS, and setFlag().

+

References MODES_FLAG_ADV_MENUS, and setFlag().

Referenced by Menus::runMenuSelection().

@@ -1778,51 +1853,51 @@

-

Definition at line 434 of file Modes.cpp.

-
435 {
-
436  if (!m_numModes) {
-
437  return nullptr;
-
438  }
-
439  // clear the LEDs when switching modes
-
440  Leds::clearAll();
-
441  // if we have a current mode open, close it
-
442  if (m_pCurModeLink) {
- -
444  }
-
445  int8_t newModeIdx = index % m_numModes;
-
446  // lookup the new mode link
-
447  ModeLink *newCurLink = getModeLink(newModeIdx);
-
448  if (!newCurLink) {
-
449  // what
-
450  return nullptr;
-
451  }
-
452  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
453  Mode *newCur = newCurLink->instantiate();
-
454  if (!newCur) {
- -
456  return nullptr;
-
457  }
-
458  // update to the new mode
-
459  m_curMode = newModeIdx;
-
460  m_pCurModeLink = newCurLink;
-
461  // record the current time as the last switch time
- -
463  // update the global startup mode to be this mode, if we turn off
-
464  // and turn back on into one click mode it will select this one
-
465  Modes::setStartupMode(newModeIdx);
-
466  // log the change
-
467  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
468  m_curMode, m_numModes - 1, newCur->getPatternID());
-
469  // return the new current mode
-
470  return newCur;
-
471 }
+

Definition at line 503 of file Modes.cpp.

+
504 {
+
505  if (!m_numModes) {
+
506  return nullptr;
+
507  }
+
508  // clear the LEDs when switching modes
+
509  Leds::clearAll();
+
510  // if we have a current mode open, close it
+
511  if (m_pCurModeLink) {
+ +
513  }
+
514  int8_t newModeIdx = index % m_numModes;
+
515  // lookup the new mode link
+
516  ModeLink *newCurLink = getModeLink(newModeIdx);
+
517  if (!newCurLink) {
+
518  // what
+
519  return nullptr;
+
520  }
+
521  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
522  Mode *newCur = newCurLink->instantiate();
+
523  if (!newCur) {
+ +
525  return nullptr;
+
526  }
+
527  // update to the new mode
+
528  m_curMode = newModeIdx;
+
529  m_pCurModeLink = newCurLink;
+
530  // record the current time as the last switch time
+ +
532  // update the global startup mode to be this mode, if we turn off
+
533  // and turn back on into one click mode it will select this one
+
534  Modes::setStartupMode(newModeIdx);
+
535  // log the change
+
536  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
537  m_curMode, m_numModes - 1, newCur->getPatternID());
+
538  // return the new current mode
+
539  return newCur;
+
540 }
PatternID getPatternID(LedPos pos=LED_ANY) const
Definition: Mode.cpp:481
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

+

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

-

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

+

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

@@ -1849,42 +1924,42 @@

-

Definition at line 252 of file Modes.cpp.

-
253 {
-
254  clearModes();
-
255 #if DEMO_ALL_PATTERNS == 1
-
256  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
257  PatternID default_start = PATTERN_FIRST;
-
258  PatternID default_end = PATTERN_LAST;
-
259  // add 65 randomized modes
-
260  for (int i = 0; i < 65; ++i) {
-
261  Mode tmpMode;
-
262  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
263  // create a random pattern ID from all patterns
- -
265  Colorset randSet;
-
266  randSet.randomize(8);
-
267  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
268  }
-
269  // add another mode with the given pattern and colorset
-
270  if (!addMode(&tmpMode)) {
-
271  ERROR_LOG("Failed to add mode");
-
272  // return false?
-
273  }
-
274  }
-
275  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
276 #else
-
277  // add each default mode with each of the given colors
-
278  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
279  const default_mode_entry &def = default_modes[i];
-
280  Colorset set(def.numColors, def.cols);
-
281  addMode(def.patternID, nullptr, &set);
-
282  }
-
283 #endif
-
284  return true;
-
285 }
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+

Definition at line 321 of file Modes.cpp.

+
322 {
+
323  clearModes();
+
324 #if DEMO_ALL_PATTERNS == 1
+
325  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
326  PatternID default_start = PATTERN_FIRST;
+
327  PatternID default_end = PATTERN_LAST;
+
328  // add 65 randomized modes
+
329  for (int i = 0; i < 65; ++i) {
+
330  Mode tmpMode;
+
331  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
332  // create a random pattern ID from all patterns
+ +
334  Colorset randSet;
+
335  randSet.randomize(8);
+
336  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
337  }
+
338  // add another mode with the given pattern and colorset
+
339  if (!addMode(&tmpMode)) {
+
340  ERROR_LOG("Failed to add mode");
+
341  // return false?
+
342  }
+
343  }
+
344  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
345 #else
+
346  // add each default mode with each of the given colors
+
347  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
348  const default_mode_entry &def = default_modes[i];
+
349  Colorset set(def.numColors, def.cols);
+
350  addMode(def.patternID, nullptr, &set);
+
351  }
+
352 #endif
+
353  return true;
+
354 }
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:21
@ LED_FIRST
Definition: LedTypes.h:13
@@ -1899,7 +1974,7 @@

PatternID patternID
Definition: DefaultModes.h:10

uint8_t numColors
Definition: DefaultModes.h:11
-

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

+

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

Referenced by init(), and FactoryReset::onLongClick().

@@ -1945,20 +2020,20 @@

-

Definition at line 572 of file Modes.cpp.

-
573 {
-
574  // then actually if it's enabled ensure the upper nibble is set
-
575  if (enable) {
-
576  // set the cur mode index as the upper nibble
-
577  m_globalFlags |= flag;
-
578  } else {
-
579  m_globalFlags &= ~flag;
-
580  }
-
581  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
582  return !save || saveStorage();
-
583 }
+

Definition at line 641 of file Modes.cpp.

+
642 {
+
643  // then actually if it's enabled ensure the upper nibble is set
+
644  if (enable) {
+
645  // set the cur mode index as the upper nibble
+
646  m_globalFlags |= flag;
+
647  } else {
+
648  m_globalFlags &= ~flag;
+
649  }
+
650  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
651  return !save || saveStorage();
+
652 }
-

References DEBUG_LOGF, m_globalFlags, and saveStorage().

+

References DEBUG_LOGF, m_globalFlags, and saveStorage().

Referenced by setAdvancedMenus(), setKeychainMode(), setLocked(), and setOneClickMode().

@@ -2003,7 +2078,7 @@

137  return setFlag(MODES_FLAG_KEYCHAIN, active, save);

138  }
-

References MODES_FLAG_KEYCHAIN, and setFlag().

+

References MODES_FLAG_KEYCHAIN, and setFlag().

@@ -2047,7 +2122,7 @@

124  }
static bool locked()
Definition: Modes.h:125
-

References locked(), MODES_FLAG_LOCKED, and setFlag().

+

References locked(), MODES_FLAG_LOCKED, and setFlag().

Referenced by VortexEngine::tick().

@@ -2092,7 +2167,7 @@

116  return setFlag(MODES_FLAG_ONE_CLICK, enable, save);
117  }
-

References MODES_FLAG_ONE_CLICK, and setFlag().

+

References MODES_FLAG_ONE_CLICK, and setFlag().

@@ -2120,17 +2195,17 @@

-

Definition at line 558 of file Modes.cpp.

-
559 {
-
560  // zero out the upper nibble to disable
-
561  m_globalFlags &= 0x0F;
-
562  // or in the index value shifted into the upper nibble
-
563  m_globalFlags |= (index << 4) & 0xF0;
-
564 }
+

Definition at line 627 of file Modes.cpp.

+
628 {
+
629  // zero out the upper nibble to disable
+
630  m_globalFlags &= 0x0F;
+
631  // or in the index value shifted into the upper nibble
+
632  m_globalFlags |= (index << 4) & 0xF0;
+
633 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by VortexEngine::enterSleep(), and setCurMode().

+

Referenced by VortexEngine::enterSleep(), and setCurMode().

@@ -2158,47 +2233,47 @@

-

Definition at line 325 of file Modes.cpp.

-
326 {
-
327  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
328  if (newPos >= m_numModes) {
-
329  return false;
-
330  }
-
331  if (newPos == m_curMode) {
-
332  return true;
-
333  }
-
334  // get the target mode at the position of the shift
-
335  ModeLink *target = getModeLink(newPos);
-
336  if (!target) {
-
337  // invalid new position?
-
338  return false;
-
339  }
-
340  // special case for moving first in list forward
-
341  if (!m_curMode && offset > 0) {
-
342  // update main list ptr
- -
344  }
-
345  // unlink the current link
- -
347  // update the current position to reflect our new pos
-
348  m_curMode = newPos;
-
349  // then re-link the mode at the new spot
-
350  if (offset < 0) {
-
351  // link the link before our target link
-
352  target->linkBefore(m_pCurModeLink);
-
353  // special case for moving into first in list
-
354  if (!m_curMode) {
- -
356  }
-
357  } else {
-
358  // link the link after our target link
-
359  target->linkAfter(m_pCurModeLink);
-
360  }
-
361  return true;
-
362 }
- +

Definition at line 394 of file Modes.cpp.

+
395 {
+
396  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
397  if (newPos >= m_numModes) {
+
398  return false;
+
399  }
+
400  if (newPos == m_curMode) {
+
401  return true;
+
402  }
+
403  // get the target mode at the position of the shift
+
404  ModeLink *target = getModeLink(newPos);
+
405  if (!target) {
+
406  // invalid new position?
+
407  return false;
+
408  }
+
409  // special case for moving first in list forward
+
410  if (!m_curMode && offset > 0) {
+
411  // update main list ptr
+ +
413  }
+
414  // unlink the current link
+ +
416  // update the current position to reflect our new pos
+
417  m_curMode = newPos;
+
418  // then re-link the mode at the new spot
+
419  if (offset < 0) {
+
420  // link the link before our target link
+
421  target->linkBefore(m_pCurModeLink);
+
422  // special case for moving into first in list
+
423  if (!m_curMode) {
+ +
425  }
+
426  } else {
+
427  // link the link after our target link
+
428  target->linkAfter(m_pCurModeLink);
+
429  }
+
430  return true;
+
431 }
+
-

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

+

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

@@ -2225,15 +2300,15 @@

-

Definition at line 566 of file Modes.cpp.

-
567 {
-
568  // zero out the upper nibble to disable
-
569  return (m_globalFlags & 0xF0) >> 4;
-
570 }
+

Definition at line 635 of file Modes.cpp.

+
636 {
+
637  // zero out the upper nibble to disable
+
638  return (m_globalFlags & 0xF0) >> 4;
+
639 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -2261,40 +2336,100 @@

-

Definition at line 222 of file Modes.cpp.

-
223 {
-
224  DEBUG_LOG("Loading modes...");
-
225  // this is good on memory, but it erases what they have stored before we
-
226  // know whether there is something actually saved in the serial buffer
-
227  clearModes();
-
228  // unserialize the number of modes next
-
229  uint8_t numModes = 0;
-
230  modesBuffer.unserialize(&numModes);
-
231  if (!numModes) {
-
232  DEBUG_LOG("Did not find any modes");
-
233  // this kinda sucks whatever they had loaded is gone
-
234  return false;
-
235  }
-
236  // foreach expected mode
-
237  for (uint8_t i = 0; i < numModes; ++i) {
-
238  // just copy the serialized mode into the internal storage because
-
239  // we store the modes in a serialized manner so that they are smaller
-
240  // then we unpack them when we instantiate the mode
-
241  if (!addSerializedMode(modesBuffer)) {
-
242  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
243  // clear work so far?
-
244  clearModes();
-
245  return false;
-
246  }
-
247  }
-
248  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
249  return (m_numModes == numModes);
-
250 }
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:287
+

Definition at line 291 of file Modes.cpp.

+
292 {
+
293  DEBUG_LOG("Loading modes...");
+
294  // this is good on memory, but it erases what they have stored before we
+
295  // know whether there is something actually saved in the serial buffer
+
296  clearModes();
+
297  // unserialize the number of modes next
+
298  uint8_t numModes = 0;
+
299  modesBuffer.unserialize(&numModes);
+
300  if (!numModes) {
+
301  DEBUG_LOG("Did not find any modes");
+
302  // this kinda sucks whatever they had loaded is gone
+
303  return false;
+
304  }
+
305  // foreach expected mode
+
306  for (uint8_t i = 0; i < numModes; ++i) {
+
307  // just copy the serialized mode into the internal storage because
+
308  // we store the modes in a serialized manner so that they are smaller
+
309  // then we unpack them when we instantiate the mode
+
310  if (!addSerializedMode(modesBuffer)) {
+
311  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
312  // clear work so far?
+
313  clearModes();
+
314  return false;
+
315  }
+
316  }
+
317  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
318  return (m_numModes == numModes);
+
319 }
+
+

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+ +

Referenced by loadFromBuffer().

+ +
+ + +

◆ unserializeSaveHeader()

+ +
+
+ + + + + +
+ + + + + + + + +
bool Modes::unserializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 97 of file Modes.cpp.

+
98 {
+
99  // reset the unserializer index before unserializing anything
+
100  saveHeader.resetUnserializer();
+
101  uint8_t major = 0;
+
102  uint8_t minor = 0;
+
103  // unserialize the vortex version
+
104  saveHeader.unserialize(&major);
+
105  saveHeader.unserialize(&minor);
+
106  // check the version for incompatibility
+
107  if (!VortexEngine::checkVersion(major, minor)) {
+
108  // incompatible version
+
109  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
+
110  return false;
+
111  }
+
112  // NOTE: instead of global brightness the duo uses this to store the
+
113  // startup mode ID. The duo doesn't offer a global brightness option
+
114  // unserialize the global brightness
+
115  saveHeader.unserialize(&m_globalFlags);
+
116  // unserialize the global brightness
+
117  uint8_t brightness = 0;
+
118  saveHeader.unserialize(&brightness);
+
119  if (brightness) {
+
120  Leds::setBrightness(brightness);
+
121  }
+
122  return true;
+
123 }
+
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
+
static void setBrightness(uint8_t brightness)
Definition: Leds.h:105
+
static bool checkVersion(uint8_t major, uint8_t minor)
-

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+

References VortexEngine::checkVersion(), ERROR_LOGF, m_globalFlags, ByteStream::resetUnserializer(), Leds::setBrightness(), and ByteStream::unserialize().

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer(), and loadStorage().

@@ -2322,26 +2457,26 @@

-

Definition at line 414 of file Modes.cpp.

-
415 {
-
416  if (!mode) {
-
417  return false;
-
418  }
-
419  Mode *pCur = curMode();
-
420  if (!pCur) {
-
421  return false;
-
422  }
-
423  // utilize copy operator
-
424  *pCur = *mode;
-
425  // immediately save this mode to the internal mode storage
-
426  if (!saveCurMode()) {
-
427  return false;
-
428  }
-
429  // initialize the new mode
-
430  return initCurMode();
-
431 }
+

Definition at line 483 of file Modes.cpp.

+
484 {
+
485  if (!mode) {
+
486  return false;
+
487  }
+
488  Mode *pCur = curMode();
+
489  if (!pCur) {
+
490  return false;
+
491  }
+
492  // utilize copy operator
+
493  *pCur = *mode;
+
494  // immediately save this mode to the internal mode storage
+
495  if (!saveCurMode()) {
+
496  return false;
+
497  }
+
498  // initialize the new mode
+
499  return initCurMode();
+
500 }
-

References curMode(), initCurMode(), and saveCurMode().

+

References curMode(), initCurMode(), and saveCurMode().

Referenced by ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveModeIR().

@@ -2368,9 +2503,9 @@

-

Definition at line 211 of file Modes.h.

+

Definition at line 214 of file Modes.h.

-

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

+

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

@@ -2394,9 +2529,9 @@

-

Definition at line 223 of file Modes.h.

+

Definition at line 226 of file Modes.h.

-

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), saveToBuffer(), setFlag(), setStartupMode(), and startupMode().

+

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), serializeSaveHeader(), setFlag(), setStartupMode(), startupMode(), and unserializeSaveHeader().

@@ -2420,9 +2555,9 @@

-

Definition at line 226 of file Modes.h.

+

Definition at line 229 of file Modes.h.

-

Referenced by lastSwitchTime(), and setCurMode().

+

Referenced by lastSwitchTime(), and setCurMode().

@@ -2446,9 +2581,9 @@

-

Definition at line 214 of file Modes.h.

+

Definition at line 217 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

+

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), saveStorage(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

@@ -2472,9 +2607,9 @@

-

Definition at line 217 of file Modes.h.

+

Definition at line 220 of file Modes.h.

-

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), serialize(), setCurMode(), and shiftCurMode().

+

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), saveStorage(), serialize(), setCurMode(), and shiftCurMode().

@@ -2498,9 +2633,9 @@

-

Definition at line 220 of file Modes.h.

+

Definition at line 223 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), serialize(), and shiftCurMode().

+

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), saveStorage(), serialize(), and shiftCurMode().

diff --git a/docs/handle/classModes.js b/docs/handle/classModes.js index ae97a62325..0622c676b3 100644 --- a/docs/handle/classModes.js +++ b/docs/handle/classModes.js @@ -33,6 +33,7 @@ var classModes = [ "saveStorage", "classModes.html#a1756081ee85dbcf672ddad5a3dcb4690", null ], [ "saveToBuffer", "classModes.html#a9b64018ed3d72c3667f0eaef5fd6495f", null ], [ "serialize", "classModes.html#afb881f5315e4197bb01625b1268eca9d", null ], + [ "serializeSaveHeader", "classModes.html#a4432825def9ab0a3edb0c480e21c14e1", null ], [ "setAdvancedMenus", "classModes.html#ad4938ad48f465a7a59d9bcdaa2f8eaca", null ], [ "setCurMode", "classModes.html#a65f088d9076706c4976f7282be323e50", null ], [ "setDefaults", "classModes.html#a790f299aa425bdc73af7f584ee30472b", null ], @@ -44,6 +45,7 @@ var classModes = [ "shiftCurMode", "classModes.html#a7cb704d905f26b1d1e9e748c87b547a1", null ], [ "startupMode", "classModes.html#a354ffb53eeff1a351ef81ce55eae472a", null ], [ "unserialize", "classModes.html#ae5c68f28c424a2a08ba659e9373898e3", null ], + [ "unserializeSaveHeader", "classModes.html#a0e4a896bf673ecc51bf52f3efabf8aca", null ], [ "updateCurMode", "classModes.html#a263cf02fb83d954b91c85d2d1e5411ee", null ], [ "m_curMode", "classModes.html#aee36ec773858cf347b90bd1538b0a2b8", null ], [ "m_globalFlags", "classModes.html#a9929c8efa425648fa8a2e85028b1b303", null ], diff --git a/docs/handle/classModes_1_1ModeLink.html b/docs/handle/classModes_1_1ModeLink.html index bee2154308..16eca3bc1b 100644 --- a/docs/handle/classModes_1_1ModeLink.html +++ b/docs/handle/classModes_1_1ModeLink.html @@ -154,7 +154,7 @@

Detailed Description

-

Definition at line 156 of file Modes.h.

+

Definition at line 159 of file Modes.h.

Constructor & Destructor Documentation

◆ ModeLink() [1/2]

@@ -182,28 +182,28 @@

-

Definition at line 703 of file Modes.cpp.

-
703  :
-
704  m_pInstantiatedMode(nullptr),
-
705  m_storedMode(),
-
706  m_next(nullptr),
-
707  m_prev(nullptr)
-
708 {
-
709  if (src) {
-
710  init(src);
-
711  }
-
712  if (src && inst) {
-
713  instantiate();
-
714  }
-
715 }
- - - - - - +

Definition at line 772 of file Modes.cpp.

+
772  :
+
773  m_pInstantiatedMode(nullptr),
+
774  m_storedMode(),
+
775  m_next(nullptr),
+
776  m_prev(nullptr)
+
777 {
+
778  if (src) {
+
779  init(src);
+
780  }
+
781  if (src && inst) {
+
782  instantiate();
+
783  }
+
784 }
+ + + + + +
-

References init(), and instantiate().

+

References init(), and instantiate().

@@ -233,20 +233,20 @@

-

Definition at line 717 of file Modes.cpp.

-
717  :
-
718  m_pInstantiatedMode(nullptr),
-
719  m_storedMode(src),
-
720  m_next(nullptr),
-
721  m_prev(nullptr)
-
722 {
-
723  if (src.size() && inst) {
-
724  instantiate();
-
725  }
-
726 }
+

Definition at line 786 of file Modes.cpp.

+
786  :
+
787  m_pInstantiatedMode(nullptr),
+
788  m_storedMode(src),
+
789  m_next(nullptr),
+
790  m_prev(nullptr)
+
791 {
+
792  if (src.size() && inst) {
+
793  instantiate();
+
794  }
+
795 }
uint32_t size() const
Definition: ByteStream.h:123
-

References instantiate(), and ByteStream::size().

+

References instantiate(), and ByteStream::size().

@@ -265,15 +265,15 @@

-

Definition at line 728 of file Modes.cpp.

-
729 {
-
730  if (m_next) {
-
731  delete m_next;
-
732  }
-
733  if (m_pInstantiatedMode) {
-
734  delete m_pInstantiatedMode;
-
735  }
-
736 }
+

Definition at line 797 of file Modes.cpp.

+
798 {
+
799  if (m_next) {
+
800  delete m_next;
+
801  }
+
802  if (m_pInstantiatedMode) {
+
803  delete m_pInstantiatedMode;
+
804  }
+
805 }
@@ -294,27 +294,27 @@

-

Definition at line 769 of file Modes.cpp.

-
770 {
-
771  if (!next.size()) {
-
772  return false;
-
773  }
-
774  // if not end of chain, recurse on next link
-
775  if (m_next) {
-
776  return m_next->append(next);
-
777  }
-
778  m_next = new ModeLink(next);
-
779  if (!m_next) {
- -
781  return false;
-
782  }
-
783  m_next->m_prev = this;
-
784  return true;
-
785 }
+

Definition at line 838 of file Modes.cpp.

+
839 {
+
840  if (!next.size()) {
+
841  return false;
+
842  }
+
843  // if not end of chain, recurse on next link
+
844  if (m_next) {
+
845  return m_next->append(next);
+
846  }
+
847  m_next = new ModeLink(next);
+
848  if (!m_next) {
+ +
850  return false;
+
851  }
+
852  m_next->m_prev = this;
+
853  return true;
+
854 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
- - - + + +

References ERROR_OUT_OF_MEMORY, and ByteStream::size().

@@ -336,27 +336,27 @@

-

Definition at line 751 of file Modes.cpp.

-
752 {
-
753  if (!next) {
-
754  return false;
-
755  }
-
756  // if not end of chain, recurse on next link
-
757  if (m_next) {
-
758  return m_next->append(next);
-
759  }
-
760  m_next = new ModeLink(next);
-
761  if (!m_next) {
- -
763  return false;
-
764  }
-
765  m_next->m_prev = this;
-
766  return true;
-
767 }
+

Definition at line 820 of file Modes.cpp.

+
821 {
+
822  if (!next) {
+
823  return false;
+
824  }
+
825  // if not end of chain, recurse on next link
+
826  if (m_next) {
+
827  return m_next->append(next);
+
828  }
+
829  m_next = new ModeLink(next);
+
830  if (!m_next) {
+ +
832  return false;
+
833  }
+
834  m_next->m_prev = this;
+
835  return true;
+
836 }

References ERROR_OUT_OF_MEMORY.

-

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

+

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

@@ -383,10 +383,10 @@

-

Definition at line 187 of file Modes.h.

-
187 { return m_storedMode; }
+

Definition at line 190 of file Modes.h.

+
190 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -406,25 +406,25 @@

-

Definition at line 738 of file Modes.cpp.

-
739 {
-
740  if (!mode) {
-
741  return false;
-
742  }
- -
744  // serialize the mode so it can be instantiated anytime
-
745  if (!mode->saveToBuffer(m_storedMode)) {
-
746  return false;
-
747  }
-
748  return true;
-
749 }
+

Definition at line 807 of file Modes.cpp.

+
808 {
+
809  if (!mode) {
+
810  return false;
+
811  }
+ +
813  // serialize the mode so it can be instantiated anytime
+
814  if (!mode->saveToBuffer(m_storedMode)) {
+
815  return false;
+
816  }
+
817  return true;
+
818 }
void clear()
Definition: ByteStream.cpp:107
virtual bool saveToBuffer(ByteStream &saveBuffer, uint8_t numLeds=0) const
Definition: Mode.cpp:169
- +

References Mode::saveToBuffer().

-

Referenced by ModeLink().

+

Referenced by ModeLink().

@@ -443,30 +443,30 @@

-

Definition at line 838 of file Modes.cpp.

-
839 {
-
840  if (m_pInstantiatedMode) {
-
841  return m_pInstantiatedMode;
-
842  }
-
843  Mode *newMode = new Mode();
-
844  if (!newMode) {
- -
846  return nullptr;
-
847  }
- -
849  if (!newMode->loadFromBuffer(m_storedMode)) {
-
850  return nullptr;
-
851  }
-
852  m_pInstantiatedMode = newMode;
-
853  return m_pInstantiatedMode;
-
854 }
+

Definition at line 907 of file Modes.cpp.

+
908 {
+
909  if (m_pInstantiatedMode) {
+
910  return m_pInstantiatedMode;
+
911  }
+
912  Mode *newMode = new Mode();
+
913  if (!newMode) {
+ +
915  return nullptr;
+
916  }
+ +
918  if (!newMode->loadFromBuffer(m_storedMode)) {
+
919  return nullptr;
+
920  }
+
921  m_pInstantiatedMode = newMode;
+
922  return m_pInstantiatedMode;
+
923 }
void resetUnserializer()
Definition: ByteStream.cpp:391
Definition: Mode.h:38
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179

References ERROR_OUT_OF_MEMORY, and Mode::loadFromBuffer().

-

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -486,22 +486,22 @@

-

Definition at line 812 of file Modes.cpp.

-
813 {
-
814  if (!link) {
-
815  return;
-
816  }
-
817  if (m_next) {
-
818  m_next->m_prev = link;
-
819  link->m_next = m_next;
-
820  }
-
821  m_next = link;
-
822  link->m_prev = this;
-
823 }
+

Definition at line 881 of file Modes.cpp.

+
882 {
+
883  if (!link) {
+
884  return;
+
885  }
+
886  if (m_next) {
+
887  m_next->m_prev = link;
+
888  link->m_next = m_next;
+
889  }
+
890  m_next = link;
+
891  link->m_prev = this;
+
892 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -521,22 +521,22 @@

-

Definition at line 825 of file Modes.cpp.

-
826 {
-
827  if (!link) {
-
828  return;
-
829  }
-
830  if (m_prev) {
-
831  m_prev->m_next = link;
-
832  link->m_prev = m_prev;
-
833  }
-
834  m_prev = link;
-
835  link->m_next = this;
-
836 }
+

Definition at line 894 of file Modes.cpp.

+
895 {
+
896  if (!link) {
+
897  return;
+
898  }
+
899  if (m_prev) {
+
900  m_prev->m_next = link;
+
901  link->m_prev = m_prev;
+
902  }
+
903  m_prev = link;
+
904  link->m_next = this;
+
905 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -563,10 +563,10 @@

-

Definition at line 188 of file Modes.h.

-
188 { return m_pInstantiatedMode; }
+

Definition at line 191 of file Modes.h.

+
191 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -593,12 +593,12 @@

-

Definition at line 189 of file Modes.h.

-
189 { return m_next; }
+

Definition at line 192 of file Modes.h.

+
192 { return m_next; }
-

References m_next.

+

References m_next.

-

Referenced by Modes::getModeLink(), Modes::serialize(), and Modes::shiftCurMode().

+

Referenced by Modes::getModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::shiftCurMode().

@@ -625,10 +625,10 @@

-

Definition at line 193 of file Modes.h.

-
193 { return m_storedMode; }
+

Definition at line 196 of file Modes.h.

+
196 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -655,10 +655,10 @@

-

Definition at line 192 of file Modes.h.

-
192 { return m_storedMode; }
+

Definition at line 195 of file Modes.h.

+
195 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -685,10 +685,10 @@

-

Definition at line 194 of file Modes.h.

-
194 { return m_pInstantiatedMode; }
+

Definition at line 197 of file Modes.h.

+
197 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -707,13 +707,13 @@

-

Definition at line 787 of file Modes.cpp.

-
788 {
-
789  if (!m_pInstantiatedMode) {
-
790  return;
-
791  }
- -
793 }
+

Definition at line 856 of file Modes.cpp.

+
857 {
+
858  if (!m_pInstantiatedMode) {
+
859  return;
+
860  }
+ +
862 }
virtual void play()
Definition: Mode.cpp:139

Referenced by Modes::play().

@@ -743,10 +743,10 @@

-

Definition at line 190 of file Modes.h.

-
190 { return m_prev; }
+

Definition at line 193 of file Modes.h.

+
193 { return m_prev; }
-

References m_prev.

+

References m_prev.

@@ -765,16 +765,16 @@

-

Definition at line 864 of file Modes.cpp.

-
865 {
-
866  if (!m_pInstantiatedMode) {
-
867  return false;
-
868  }
- - -
871 }
+

Definition at line 933 of file Modes.cpp.

+
934 {
+
935  if (!m_pInstantiatedMode) {
+
936  return false;
+
937  }
+ + +
940 }
-

Referenced by Modes::saveCurMode().

+

Referenced by Modes::saveCurMode().

@@ -793,15 +793,15 @@

-

Definition at line 856 of file Modes.cpp.

-
857 {
-
858  if (m_pInstantiatedMode) {
-
859  delete m_pInstantiatedMode;
-
860  m_pInstantiatedMode = nullptr;
-
861  }
-
862 }
+

Definition at line 925 of file Modes.cpp.

+
926 {
+
927  if (m_pInstantiatedMode) {
+
928  delete m_pInstantiatedMode;
+
929  m_pInstantiatedMode = nullptr;
+
930  }
+
931 }
-

Referenced by Modes::initCurMode(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::initCurMode(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -820,26 +820,26 @@

-

Definition at line 795 of file Modes.cpp.

-
796 {
-
797  // unlink this node from the chain
-
798  if (m_prev) {
-
799  m_prev->m_next = m_next;
-
800  }
-
801  if (m_next) {
-
802  m_next->m_prev = m_prev;
-
803  }
-
804  // grab the new link that will take this place
-
805  ModeLink *newLink = m_prev ? m_prev : m_next;
-
806  // clear the links of this node
-
807  m_prev = nullptr;
-
808  m_next = nullptr;
-
809  return newLink;
-
810 }
+

Definition at line 864 of file Modes.cpp.

+
865 {
+
866  // unlink this node from the chain
+
867  if (m_prev) {
+
868  m_prev->m_next = m_next;
+
869  }
+
870  if (m_next) {
+
871  m_next->m_prev = m_prev;
+
872  }
+
873  // grab the new link that will take this place
+
874  ModeLink *newLink = m_prev ? m_prev : m_next;
+
875  // clear the links of this node
+
876  m_prev = nullptr;
+
877  m_next = nullptr;
+
878  return newLink;
+
879 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

+

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

@@ -864,9 +864,9 @@

-

Definition at line 198 of file Modes.h.

+

Definition at line 201 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

@@ -890,9 +890,9 @@

-

Definition at line 196 of file Modes.h.

+

Definition at line 199 of file Modes.h.

-

Referenced by mode(), and operator Mode *().

+

Referenced by mode(), and operator Mode *().

@@ -916,9 +916,9 @@

-

Definition at line 199 of file Modes.h.

+

Definition at line 202 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

@@ -942,9 +942,9 @@

-

Definition at line 197 of file Modes.h.

+

Definition at line 200 of file Modes.h.

-

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

+

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

diff --git a/docs/handle/classPatternBuilder.html b/docs/handle/classPatternBuilder.html index cf3df02cb2..2fc8c9d03f 100644 --- a/docs/handle/classPatternBuilder.html +++ b/docs/handle/classPatternBuilder.html @@ -426,12 +426,12 @@

153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/handle/classPatternSelect.html b/docs/handle/classPatternSelect.html index 9ec9ef341c..556bd4fec1 100644 --- a/docs/handle/classPatternSelect.html +++ b/docs/handle/classPatternSelect.html @@ -170,7 +170,7 @@

Detailed Description

-

Definition at line 10 of file PatternSelect.h.

+

Definition at line 9 of file PatternSelect.h.

Constructor & Destructor Documentation

◆ PatternSelect()

@@ -208,9 +208,9 @@

22 }
@ LED_FIRST
Definition: LedTypes.h:13
Menu(const RGBColor &col, bool advanced)
Definition: Menu.cpp:12
- - -
uint8_t m_argIndex
Definition: PatternSelect.h:31
+ + +
uint8_t m_argIndex
Definition: PatternSelect.h:30
@@ -308,7 +308,7 @@

LedPos mapGetFirstLed(LedMap map)
Definition: LedTypes.h:115
LedMap m_targetLeds
Definition: Menu.h:53
-

References m_srcLed, Menu::m_targetLeds, and mapGetFirstLed().

+

References m_srcLed, Menu::m_targetLeds, and mapGetFirstLed().

@@ -357,10 +357,10 @@

bool m_advanced
Definition: Menu.h:59
RGBColor m_menuColor
Definition: Menu.h:50
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
uint8_t getNumArgs() const
Definition: Pattern.h:87
-

References Pattern::getNumArgs(), Mode::getPattern(), Leds::holdAll(), Menu::leaveMenu(), Menu::m_advanced, m_argIndex, Menu::m_menuColor, Menu::m_previewMode, m_srcLed, and Modes::updateCurMode().

+

References Pattern::getNumArgs(), Mode::getPattern(), Leds::holdAll(), Menu::leaveMenu(), Menu::m_advanced, m_argIndex, Menu::m_menuColor, Menu::m_previewMode, m_srcLed, and Modes::updateCurMode().

@@ -470,7 +470,7 @@

bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
uint8_t & argRef(uint8_t index)
Definition: Pattern.cpp:106
-

References Pattern::argRef(), DEBUG_LOGF, g_pButton, Mode::getPattern(), Mode::getPatternID(), Leds::holdAll(), Mode::init(), isMultiLedPatternID(), LED_MULTI, Menu::m_advanced, m_argIndex, Menu::m_previewMode, m_srcLed, m_started, Menu::m_targetLeds, MAP_FOREACH_LED, MAP_LED, MAP_LED_ALL, Button::onConsecutivePresses(), PATTERN_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_LAST, RGB_RED, RGB_YELLOW1, Mode::setPattern(), and Mode::setPatternMap().

+

References Pattern::argRef(), DEBUG_LOGF, g_pButton, Mode::getPattern(), Mode::getPatternID(), Leds::holdAll(), Mode::init(), isMultiLedPatternID(), LED_MULTI, Menu::m_advanced, m_argIndex, Menu::m_previewMode, m_srcLed, m_started, Menu::m_targetLeds, MAP_FOREACH_LED, MAP_LED, MAP_LED_ALL, Button::onConsecutivePresses(), PATTERN_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_LAST, RGB_RED, RGB_YELLOW1, Mode::setPattern(), and Mode::setPatternMap().

@@ -544,7 +544,7 @@

-

Definition at line 31 of file PatternSelect.h.

+

Definition at line 30 of file PatternSelect.h.

Referenced by onLongClick(), and onShortClick().

@@ -570,7 +570,7 @@

-

Definition at line 28 of file PatternSelect.h.

+

Definition at line 27 of file PatternSelect.h.

Referenced by onLedSelected(), onLongClick(), and onShortClick().

@@ -596,7 +596,7 @@

-

Definition at line 35 of file PatternSelect.h.

+

Definition at line 34 of file PatternSelect.h.

Referenced by onShortClick().

diff --git a/docs/handle/classRandomizer.html b/docs/handle/classRandomizer.html index 75982443e7..c676cb9efa 100644 --- a/docs/handle/classRandomizer.html +++ b/docs/handle/classRandomizer.html @@ -542,14 +542,14 @@

Definition: Mode.h:38
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
bool hasMultiLed() const
Definition: Mode.cpp:682
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
void serialize(ByteStream &buffer) const
Definition: Pattern.cpp:57
void seed(uint32_t newseed)
Definition: Random.cpp:18
Random m_multiRandCtx
Definition: Randomizer.h:30
Random m_singlesRandCtx[LED_COUNT]
Definition: Randomizer.h:29
-

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

+

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

@@ -593,9 +593,9 @@

133 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:167
Mode m_previewMode
Definition: Menu.h:48
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:414
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:483
-

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

diff --git a/docs/handle/classStorage-members.html b/docs/handle/classStorage-members.html index 7c1a172466..a9a588b9ce 100644 --- a/docs/handle/classStorage-members.html +++ b/docs/handle/classStorage-members.html @@ -94,9 +94,9 @@ init()Storagestatic lastSaveSize()Storagestatic m_lastSaveSizeStorageprivatestatic - read(ByteStream &buffer)Storagestatic + read(uint16_t slot, ByteStream &buffer)Storagestatic Storage()Storageprivate - write(ByteStream &buffer)Storagestatic + write(uint16_t slot, ByteStream &buffer)Storagestatic diff --git a/docs/handle/classStorage.html b/docs/handle/classStorage.html index e6d3704192..47d79aec4a 100644 --- a/docs/handle/classStorage.html +++ b/docs/handle/classStorage.html @@ -101,10 +101,10 @@   static void cleanup ()   -static bool write (ByteStream &buffer) -  -static bool read (ByteStream &buffer) -  +static bool write (uint16_t slot, ByteStream &buffer) +  +static bool read (uint16_t slot, ByteStream &buffer) +  static uint32_t lastSaveSize ()   @@ -145,9 +145,9 @@

-

Definition at line 39 of file Storage.cpp.

-
40 {
-
41 }
+

Definition at line 41 of file Storage.cpp.

+
42 {
+
43 }
@@ -175,9 +175,9 @@

-

Definition at line 53 of file Storage.cpp.

-
54 {
-
55 }
+

Definition at line 55 of file Storage.cpp.

+
56 {
+
57 }

Referenced by VortexEngine::cleanup().

@@ -206,18 +206,18 @@

-

Definition at line 43 of file Storage.cpp.

-
44 {
-
45 #ifdef VORTEX_LIB
-
46  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
47  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
48  }
-
49 #endif
-
50  return true;
-
51 }
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
+

Definition at line 45 of file Storage.cpp.

+
46 {
+
47 #ifdef VORTEX_LIB
+
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
50  }
+
51 #endif
+
52  return true;
+
53 }
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
-

References DEFAULT_STORAGE_FILENAME.

+

References DEFAULT_STORAGE_FILENAME.

Referenced by VortexEngine::init().

@@ -246,18 +246,18 @@

-

Definition at line 191 of file Storage.cpp.

-
192 {
-
193  return m_lastSaveSize;
-
194 }
+

Definition at line 216 of file Storage.cpp.

+
217 {
+
218  return m_lastSaveSize;
+
219 }
static uint32_t m_lastSaveSize
Definition: Storage.h:40

References m_lastSaveSize.

- -

◆ read()

+ +

◆ read()

@@ -268,9 +268,19 @@

bool Storage::read

+ + + + + + - + + + + +
(uint16_t slot,
ByteStreambuffer)buffer 
)
@@ -280,65 +290,71 @@

-

Definition at line 135 of file Storage.cpp.

-
136 {
-
137 #ifdef VORTEX_LIB
-
138  if (!Vortex::storageEnabled()) {
-
139  // return false here, but true in write because we don't want to return
-
140  // an empty buffer after returning true
-
141  return false;
-
142  }
-
143 #endif
-
144  uint32_t size = STORAGE_SIZE;
-
145  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
146  return false;
-
147  }
-
148  if (!buffer.init(size)) {
-
149  return false;
-
150  }
-
151 #ifdef VORTEX_EMBEDDED
-
152  // read directly into the raw data of the byte array
-
153  memcpy(buffer.rawData(), (const void *)_storagedata, size);
-
154 #elif defined(_WIN32)
-
155  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
156  if (hFile == INVALID_HANDLE_VALUE) {
-
157  // error
-
158  return false;
-
159  }
-
160  DWORD bytesRead = 0;
-
161  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
162  // error
-
163  return false;
-
164  }
-
165  CloseHandle(hFile);
-
166 #else
-
167  FILE *f = fopen(STORAGE_FILENAME, "r");
-
168  if (!f) {
-
169  return false;
-
170  }
-
171  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
172  return false;
-
173  }
-
174  fclose(f);
-
175 #endif
-
176  // ensure the internal buffer is sane after reading it out, this
-
177  // prevents segfaults if the internal size reports larger than capacity
-
178  buffer.sanity();
-
179  // check crc immediately since we read into raw data copying the
-
180  // array could be dangerous
-
181  if (!buffer.checkCRC()) {
-
182  buffer.clear();
-
183  ERROR_LOG("Could not verify buffer");
-
184  return false;
-
185  }
-
186  m_lastSaveSize = size;
-
187  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
188  return true;
-
189 }
+

Definition at line 156 of file Storage.cpp.

+
157 {
+
158 #ifdef VORTEX_LIB
+
159  if (!Vortex::storageEnabled()) {
+
160  // return false here, but true in write because we don't want to return
+
161  // an empty buffer after returning true
+
162  return false;
+
163  }
+
164 #endif
+
165  uint32_t size = MAX_MODE_SIZE;
+
166  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
+
167  return false;
+
168  }
+
169  if (!buffer.init(size)) {
+
170  return false;
+
171  }
+
172 #ifdef VORTEX_EMBEDDED
+
173  // read directly into the raw data of the byte array
+
174  memcpy(buffer.rawData(), (const void *)(_storagedata + (slot * MAX_MODE_SIZE)), size);
+
175 #elif defined(_WIN32)
+
176  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
177  if (hFile == INVALID_HANDLE_VALUE) {
+
178  // error
+
179  return false;
+
180  }
+
181  DWORD bytesRead = 0;
+
182  DWORD offset = slot * MAX_MODE_SIZE;
+
183  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
184  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
185  // error
+
186  return false;
+
187  }
+
188  CloseHandle(hFile);
+
189 #else
+
190  FILE *f = fopen(STORAGE_FILENAME, "r");
+
191  if (!f) {
+
192  return false;
+
193  }
+
194  long offset = slot * MAX_MODE_SIZE;
+
195  fseek(f, offset, SEEK_SET);
+
196  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
197  return false;
+
198  }
+
199  fclose(f);
+
200 #endif
+
201  // ensure the internal buffer is sane after reading it out, this
+
202  // prevents segfaults if the internal size reports larger than capacity
+
203  buffer.sanity();
+
204  // check crc immediately since we read into raw data copying the
+
205  // array could be dangerous
+
206  if (!buffer.checkCRC()) {
+
207  buffer.clear();
+
208  ERROR_LOG("Could not verify buffer");
+
209  return false;
+
210  }
+
211  m_lastSaveSize = size;
+
212  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
213  return true;
+
214 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:502
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
void * rawData() const
Definition: ByteStream.h:121
void clear()
Definition: ByteStream.cpp:107
@@ -347,14 +363,14 @@

void sanity()
Definition: ByteStream.cpp:319

-

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::loadStorage().

+

Referenced by Modes::loadStorage().

- -

◆ write()

+ +

◆ write()

@@ -365,9 +381,19 @@

bool Storage::write ( + uint16_t  + slot, + + + + ByteStream &  - buffer) + buffer  + + + ) + @@ -377,87 +403,107 @@

-

Definition at line 58 of file Storage.cpp.

-
59 {
-
60 #ifdef VORTEX_LIB
-
61  if (!Vortex::storageEnabled()) {
-
62  // success so the system thinks it all worked
-
63  return true;
-
64  }
-
65 #endif
-
66  // check size
-
67  if (buffer.rawSize() > STORAGE_SIZE) {
-
68  ERROR_LOG("Buffer too big for storage space");
-
69  return false;
-
70  }
-
71 #ifdef VORTEX_EMBEDDED
-
72  // clear existing storage
-
73  NVMCTRL->ADDR.reg = ((uint32_t)_storagedata) / 2;
-
74  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
-
75  while (!NVMCTRL->INTFLAG.bit.READY) {}
-
76 
-
77  // set the last save size
-
78  m_lastSaveSize = buffer.size();
-
79 
-
80  // write out the buffer to storage
-
81  // Calculate data boundaries
-
82  uint32_t size = (buffer.rawSize() + 3) / 4;
-
83  volatile uint32_t *dst_addr = (volatile uint32_t *)_storagedata;
-
84  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
-
85 
-
86  // Disable automatic page write
-
87  NVMCTRL->CTRLB.bit.MANW = 1;
-
88 
-
89  // Do writes in pages
-
90  while (size) {
-
91  // Execute "PBC" Page Buffer Clear
-
92  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
-
93  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
94 
-
95  // Fill page buffer
-
96  uint32_t i;
-
97  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
-
98  *dst_addr = *(uint32_t *)(src_addr);
-
99  src_addr += sizeof(uint32_t);
-
100  dst_addr++;
-
101  size--;
-
102  }
-
103 
-
104  // Execute "WP" Write Page
-
105  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
-
106  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
107  }
-
108 #elif defined(_WIN32)
-
109  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
110  if (hFile == INVALID_HANDLE_VALUE) {
-
111  // error
-
112  return false;
-
113  }
-
114  DWORD written = 0;
-
115  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
116  // error
-
117  return false;
-
118  }
-
119  CloseHandle(hFile);
-
120 #else
-
121  FILE *f = fopen(STORAGE_FILENAME, "w");
-
122  if (!f) {
-
123  return false;
+

Definition at line 60 of file Storage.cpp.

+
61 {
+
62 #ifdef VORTEX_LIB
+
63  if (!Vortex::storageEnabled()) {
+
64  // success so the system thinks it all worked
+
65  return true;
+
66  }
+
67 #endif
+
68  // check size
+
69  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
70  ERROR_LOG("Buffer too big for storage space");
+
71  return false;
+
72  }
+
73  if (slot >= NUM_MODE_SLOTS) {
+
74  return false;
+
75  }
+
76  // just in case
+
77  buffer.recalcCRC();
+
78 #ifdef VORTEX_EMBEDDED
+
79  // the target slot to store in
+
80  uint32_t storage_slot = (uint32_t)_storagedata + (slot * MAX_MODE_SIZE);
+
81 
+
82  // Number of rows to erase for one slot
+
83  uint16_t rows_to_erase = MAX_MODE_SIZE / (PAGE_SIZE * 4);
+
84  // Erase only the rows containing the slot
+
85  for (uint16_t i = 0; i < rows_to_erase; ++i) {
+
86  // Set the address for the row to erase
+
87  NVMCTRL->ADDR.reg = (uint32_t)(storage_slot + (i * PAGE_SIZE * 4)) / 2;
+
88  // Execute the erase command
+
89  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
+
90  // Wait for the erase operation to complete
+
91  while (!NVMCTRL->INTFLAG.bit.READY) {}
+
92  }
+
93 
+
94  // set the last save size
+
95  m_lastSaveSize = buffer.size();
+
96 
+
97  // write out the buffer to storage
+
98  // Calculate data boundaries
+
99  uint32_t size = (buffer.rawSize() + 3) / 4;
+
100  volatile uint32_t *dst_addr = (volatile uint32_t *)storage_slot;
+
101  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
+
102 
+
103  // Disable automatic page write
+
104  NVMCTRL->CTRLB.bit.MANW = 1;
+
105 
+
106  // Do writes in pages
+
107  while (size) {
+
108  // Execute "PBC" Page Buffer Clear
+
109  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
+
110  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
+
111 
+
112  // Fill page buffer
+
113  uint32_t i;
+
114  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
+
115  *dst_addr = *(uint32_t *)(src_addr);
+
116  src_addr += sizeof(uint32_t);
+
117  dst_addr++;
+
118  size--;
+
119  }
+
120 
+
121  // Execute "WP" Write Page
+
122  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
+
123  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
124  }
-
125  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
-
126  return false;
-
127  }
-
128  fclose(f);
-
129 #endif // VORTEX_EMBEDDED
-
130  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
131  return true;
-
132 }
-
#define PAGE_SIZE
Definition: Storage.cpp:32
+
125 #elif defined(_WIN32)
+
126  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
127  if (hFile == INVALID_HANDLE_VALUE) {
+
128  // error
+
129  return false;
+
130  }
+
131  DWORD written = 0;
+
132  DWORD offset = slot * MAX_MODE_SIZE;
+
133  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
134  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
135  // error
+
136  return false;
+
137  }
+
138  CloseHandle(hFile);
+
139 #else
+
140  FILE *f = fopen(STORAGE_FILENAME, "w");
+
141  if (!f) {
+
142  return false;
+
143  }
+
144  long offset = slot * MAX_MODE_SIZE;
+
145  fseek(f, offset, SEEK_SET);
+
146  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
147  return false;
+
148  }
+
149  fclose(f);
+
150 #endif // VORTEX_EMBEDDED
+
151  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
152  return true;
+
153 }
+
#define PAGE_SIZE
Definition: Storage.cpp:34
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
uint32_t rawSize() const
Definition: ByteStream.h:122
-

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, PAGE_SIZE, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, PAGE_SIZE, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::recalcCRC(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::saveStorage().

+

Referenced by Modes::saveStorage().

@@ -484,7 +530,7 @@

Definition at line 40 of file Storage.h.

-

Referenced by lastSaveSize(), read(), and write().

+

Referenced by lastSaveSize(), read(), and write().

diff --git a/docs/handle/classStorage.js b/docs/handle/classStorage.js index 8d55c03aba..12c499441b 100644 --- a/docs/handle/classStorage.js +++ b/docs/handle/classStorage.js @@ -4,7 +4,7 @@ var classStorage = [ "cleanup", "classStorage.html#a2a1ce108c9a17f6175bfb9a9aba51703", null ], [ "init", "classStorage.html#a065812a8dbd82d731291b5aa7ce3edf9", null ], [ "lastSaveSize", "classStorage.html#a79176e030af1f92f563c2b19316fe3dd", null ], - [ "read", "classStorage.html#a5f7d41fcbfbc0840addbaa0345e1594d", null ], - [ "write", "classStorage.html#a28703a07e21e576760f1b84202c55a01", null ], + [ "read", "classStorage.html#a463f451de890486dd483575e47defbc7", null ], + [ "write", "classStorage.html#a97a1b036dedd7b94a91899638c2248c1", null ], [ "m_lastSaveSize", "classStorage.html#ae85ca521ae89c408fb045d2890951458", null ] ]; \ No newline at end of file diff --git a/docs/handle/classTime.html b/docs/handle/classTime.html index d38afb5633..f14a143f70 100644 --- a/docs/handle/classTime.html +++ b/docs/handle/classTime.html @@ -311,7 +311,7 @@

References m_curTick, and SIMULATION_TICK.

-

Referenced by Timer::alarm(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkRange(), SerialComs::checkSerial(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveModeIR(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), ColorSelect::showFullSet(), ColorSelect::showSelection(), Timer::start(), and Button::update().

+

Referenced by Timer::alarm(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkRange(), SerialComs::checkSerial(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveModeIR(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), ColorSelect::showFullSet(), ColorSelect::showSelection(), Timer::start(), and Button::update().

@@ -424,11 +424,11 @@

68  return true;
69 }
uint64_t start
Definition: TimeControl.cpp:19
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static uint32_t m_firstTime
Definition: TimeControl.h:121
static uint32_t m_prevTime
Definition: TimeControl.h:118
-

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

+

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

Referenced by VortexEngine::init().

@@ -525,7 +525,7 @@

153 #endif
154 }
-

References DEFAULT_TICKRATE.

+

References DEFAULT_TICKRATE.

@@ -590,7 +590,7 @@

110  uint32_t sleepTime = 0;
111  if (required > elapsed_us) {
112  // in vortex lib on linux we can just sleep instead of spinning
-
113  // but on arduino we must spin and on windows it actually ends
+
113  // but on embedded we must spin and on windows it actually ends
114  // up being more accurate to poll QPF + QPC via microseconds()
115  sleepTime = required - elapsed_us;
116  }
diff --git a/docs/handle/classVortexEngine.html b/docs/handle/classVortexEngine.html index c4a17fb388..571059bf98 100644 --- a/docs/handle/classVortexEngine.html +++ b/docs/handle/classVortexEngine.html @@ -206,7 +206,7 @@

References VORTEX_VERSION_MAJOR.

-

Referenced by Mode::loadFromBuffer(), and Modes::loadFromBuffer().

+

Referenced by Mode::loadFromBuffer(), and Modes::unserializeSaveHeader().

@@ -236,7 +236,7 @@

Definition at line 87 of file VortexEngine.cpp.

88 {
89  // cleanup in reverse order
-
90  // NOTE: the arduino doesn't actually cleanup,
+
90  // NOTE: the embedded doesn't actually cleanup,
91  // but the test frameworks do
92 #ifdef VORTEX_LIB
@@ -258,11 +258,11 @@

static void cleanup()
Definition: Menus.cpp:77

static void cleanup()
Definition: Modes.cpp:53
static void cleanup()
Definition: Serial.cpp:30
-
static void cleanup()
Definition: Storage.cpp:53
+
static void cleanup()
Definition: Storage.cpp:55
static void cleanup()
Definition: TimeControl.cpp:71
static void cleanup()
Definition: VLSender.cpp:38
-

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), and VLSender::cleanup().

+

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), and VLSender::cleanup().

Referenced by wakeup().

@@ -300,9 +300,9 @@

202  return nullptr;
203 #endif
204 }
-
static Mode * curMode()
Definition: Modes.cpp:474
+
static Mode * curMode()
Definition: Modes.cpp:543
-

References Modes::curMode().

+

References Modes::curMode().

@@ -348,12 +348,12 @@

#define DEBUG_LOG(msg)
Definition: Log.h:40
static void clearAll()
Definition: Leds.h:30
static void update()
Definition: Leds.cpp:258
-
static bool saveStorage()
Definition: Modes.cpp:166
+
static bool saveStorage()
Definition: Modes.cpp:205
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:558
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:627
static volatile bool m_sleeping
Definition: VortexEngine.h:52
-

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

+

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

@@ -445,11 +445,11 @@

static bool init()
Definition: Menus.cpp:70
static bool init()
Definition: Modes.cpp:30
static bool init()
Definition: Serial.cpp:23
-
static bool init()
Definition: Storage.cpp:43
+
static bool init()
Definition: Storage.cpp:45
static bool init()
Definition: TimeControl.cpp:50
static bool init()
Definition: VLSender.cpp:33
-

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), and VLSender::init().

+

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), and VLSender::init().

Referenced by wakeup().

@@ -522,13 +522,13 @@

static void holdAll(RGBColor col)
Definition: Leds.cpp:251
static bool openMenuSelection()
Definition: Menus.cpp:203
static bool run()
Definition: Menus.cpp:88
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:513
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:582
static void play()
Definition: Modes.cpp:58
static uint32_t lastSwitchTime()
Definition: Modes.h:96
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool m_autoCycle
Definition: VortexEngine.h:55
-

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

+

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

Referenced by tick().

@@ -569,7 +569,7 @@

References ByteStream::serialize(), VORTEX_VERSION_MAJOR, and VORTEX_VERSION_MINOR.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Mode::saveToBuffer(), and Modes::serializeSaveHeader().

diff --git a/docs/handle/dir_000007_000010.html b/docs/handle/dir_000007_000010.html index 866c42c064..1430664a52 100644 --- a/docs/handle/dir_000007_000010.html +++ b/docs/handle/dir_000007_000010.html @@ -83,7 +83,7 @@ +

Menus → Patterns Relation

File in VortexEngine/src/MenusIncludes file in VortexEngine/src/Patterns
MenuList / ColorSelect.cppPattern.h
MenuList / EditorConnection.cppPatternArgs.h
MenuList / FactoryReset.cppPattern.h
MenuList / PatternSelect.cppPattern.h
MenuList / PatternSelect.cppPatternArgs.h
MenuList / PatternSelect.cppPatternBuilder.h
MenuList / Randomizer.cppPattern.h
MenuList / Randomizer.cppPatternBuilder.h
+

MenuList → Patterns Relation

File in VortexEngine/src/Menus/MenuListIncludes file in VortexEngine/src/Patterns
ColorSelect.cppPattern.h
EditorConnection.cppPatternArgs.h
FactoryReset.cppPattern.h
PatternSelect.cppPattern.h
PatternSelect.cppPatternArgs.h
PatternSelect.cppPatternBuilder.h
Randomizer.cppPattern.h
Randomizer.cppPatternBuilder.h
@@ -138,7 +138,7 @@

Definition at line 11 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -156,7 +156,7 @@

Definition at line 10 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

diff --git a/docs/orbit/BlendPattern_8cpp_source.html b/docs/orbit/BlendPattern_8cpp_source.html index fb42157a0e..7360e27f75 100644 --- a/docs/orbit/BlendPattern_8cpp_source.html +++ b/docs/orbit/BlendPattern_8cpp_source.html @@ -135,7 +135,7 @@
46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -145,7 +145,7 @@
56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/orbit/Buttons_8h_source.html b/docs/orbit/Buttons_8h_source.html index fbb88585ef..17a908d9a8 100644 --- a/docs/orbit/Buttons_8h_source.html +++ b/docs/orbit/Buttons_8h_source.html @@ -92,7 +92,7 @@
3 
4 #include "Button.h"
5 
-
6 // the number of buttons, this isn't an arduino config because
+
6 // the number of buttons, this isn't in VortexConfig.h because
7 // changing it won't really work without updating other things
8 // like which pins the buttons are attached to. So this is more
9 // of a hardcoded constant than a configuration setting
diff --git a/docs/orbit/ColorSelect_8cpp_source.html b/docs/orbit/ColorSelect_8cpp_source.html index c596ec7357..1fd5e1dd49 100644 --- a/docs/orbit/ColorSelect_8cpp_source.html +++ b/docs/orbit/ColorSelect_8cpp_source.html @@ -580,7 +580,7 @@
virtual void init()
Definition: Mode.cpp:120
bool isEmpty() const
Definition: Mode.cpp:735
bool setColorsetMap(LedMap map, const Colorset &set)
Definition: Mode.cpp:616
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
diff --git a/docs/orbit/ColorTypes_8cpp.html b/docs/orbit/ColorTypes_8cpp.html index 0569efb9e5..a8c5fa356c 100644 --- a/docs/orbit/ColorTypes_8cpp.html +++ b/docs/orbit/ColorTypes_8cpp.html @@ -363,7 +363,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/orbit/ColorTypes_8cpp_source.html b/docs/orbit/ColorTypes_8cpp_source.html index f14b4a322c..7f3a95f091 100644 --- a/docs/orbit/ColorTypes_8cpp_source.html +++ b/docs/orbit/ColorTypes_8cpp_source.html @@ -330,7 +330,7 @@
241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/orbit/ColorTypes_8h.html b/docs/orbit/ColorTypes_8h.html index 3c625cc8c2..df1920c97e 100644 --- a/docs/orbit/ColorTypes_8h.html +++ b/docs/orbit/ColorTypes_8h.html @@ -282,7 +282,7 @@

241 
242  // Gscale: what to scale green down by.
243  // Depends GREATLY on your particular LEDs
-
244  const uint8_t Gscale = 0;
+
244  const uint8_t Gscale = 185;
245 
246 
247  uint8_t hue = rhs.hue;
diff --git a/docs/orbit/DefaultModes_8cpp.html b/docs/orbit/DefaultModes_8cpp.html index 52bd5a8b4a..05c863bc01 100644 --- a/docs/orbit/DefaultModes_8cpp.html +++ b/docs/orbit/DefaultModes_8cpp.html @@ -102,27 +102,27 @@ - - - + + +

Variables

const default_mode_entry default_modes []
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

- +
const default_mode_entry default_modes[]const default_mode_entry default_modes[MAX_MODES]

Definition at line 7 of file DefaultModes.cpp.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -133,14 +133,14 @@

- +
const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]))
diff --git a/docs/orbit/DefaultModes_8cpp.js b/docs/orbit/DefaultModes_8cpp.js index 6fa5e6eaa9..d71b7f5f31 100644 --- a/docs/orbit/DefaultModes_8cpp.js +++ b/docs/orbit/DefaultModes_8cpp.js @@ -1,5 +1,5 @@ var DefaultModes_8cpp = [ - [ "default_modes", "DefaultModes_8cpp.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8cpp.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8cpp.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/orbit/DefaultModes_8cpp_source.html b/docs/orbit/DefaultModes_8cpp_source.html index 7fe79ed6b9..f7fca32d4b 100644 --- a/docs/orbit/DefaultModes_8cpp_source.html +++ b/docs/orbit/DefaultModes_8cpp_source.html @@ -93,7 +93,7 @@
4 
5 // Here is the array of 'default modes' that are assigned to
6 // the gloveset upon factory reset
- +
8  {
9  PATTERN_BOUNCE, 3, {
10  HSV(0, 255, 255),
@@ -240,21 +240,22 @@
151 };
152 
153 // exposed size of the default modes array
-
154 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
+
154 const uint8_t num_default_modes = (sizeof(default_modes) / sizeof(default_modes[0]));
#define RGB_BLUE
#define RGB_OFF
#define HSV(h, s, v)
#define RGB_RED
#define RGB_GREEN
#define RGB_WHITE
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ PATTERN_STROBE
Definition: Patterns.h:25
@ PATTERN_COMPLEMENTARY_BLEND
Definition: Patterns.h:53
@ PATTERN_GHOSTCRUSH
Definition: Patterns.h:38
@ PATTERN_ULTRADOPS
Definition: Patterns.h:30
@ PATTERN_BOUNCE
Definition: Patterns.h:89
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
diff --git a/docs/orbit/DefaultModes_8h.html b/docs/orbit/DefaultModes_8h.html index 41db8a6e7f..a084375619 100644 --- a/docs/orbit/DefaultModes_8h.html +++ b/docs/orbit/DefaultModes_8h.html @@ -114,14 +114,14 @@ - - + +

Variables

const default_mode_entry default_modes []
 
const default_mode_entry default_modes [MAX_MODES]
 
const uint8_t num_default_modes
 

Variable Documentation

- -

◆ default_modes

+ +

◆ default_modes

@@ -168,7 +168,7 @@

Definition at line 154 of file DefaultModes.cpp.

-

Referenced by Modes::setDefaults().

+

Referenced by Modes::setDefaults().

diff --git a/docs/orbit/DefaultModes_8h.js b/docs/orbit/DefaultModes_8h.js index 19b3bcd9a1..471875a243 100644 --- a/docs/orbit/DefaultModes_8h.js +++ b/docs/orbit/DefaultModes_8h.js @@ -1,6 +1,6 @@ var DefaultModes_8h = [ [ "default_mode_entry", "structdefault__mode__entry.html", "structdefault__mode__entry" ], - [ "default_modes", "DefaultModes_8h.html#a45a26bbffb6073c152f32b3ec0404f15", null ], + [ "default_modes", "DefaultModes_8h.html#a9682260204c0b547696ba31807cde860", null ], [ "num_default_modes", "DefaultModes_8h.html#a5dd4a9079d227f34133f29b705367e7e", null ] ]; \ No newline at end of file diff --git a/docs/orbit/DefaultModes_8h_source.html b/docs/orbit/DefaultModes_8h_source.html index 46e3bc5089..6ba7a9111d 100644 --- a/docs/orbit/DefaultModes_8h_source.html +++ b/docs/orbit/DefaultModes_8h_source.html @@ -102,16 +102,17 @@
13 };
14 
15 // exposed global array of default modes
-
16 extern const default_mode_entry default_modes[];
+
17 
18 // exposed size of the default modes array
19 extern const uint8_t num_default_modes;
20 
21 #endif
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
PatternID
Definition: Patterns.h:12
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
+
#define MAX_MODES
Definition: VortexConfig.h:167
Definition: DefaultModes.h:9
uint32_t cols[MAX_COLOR_SLOTS]
Definition: DefaultModes.h:12
PatternID patternID
Definition: DefaultModes.h:10
diff --git a/docs/orbit/EditorConnection_8cpp_source.html b/docs/orbit/EditorConnection_8cpp_source.html index 0f3a31b318..d336e20679 100644 --- a/docs/orbit/EditorConnection_8cpp_source.html +++ b/docs/orbit/EditorConnection_8cpp_source.html @@ -406,18 +406,18 @@
@ LED_ALL
Definition: LedTypes.h:76
#define DEBUG_LOG(msg)
Definition: Log.h:40
@ PATTERN_STROBE
Definition: Patterns.h:25
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:466
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:469
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:492
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:457
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:481
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:465
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:468
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:491
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:456
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:480
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:472
const uint8_t * data() const
Definition: ByteStream.h:120
void * rawData() const
Definition: ByteStream.h:121
@@ -477,9 +477,9 @@
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static bool saveStorage()
Definition: Modes.cpp:170
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:110
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:83
+
static bool saveStorage()
Definition: Modes.cpp:209
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:148
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:130
static bool checkSerial()
Definition: Serial.cpp:40
diff --git a/docs/orbit/FactoryReset_8cpp_source.html b/docs/orbit/FactoryReset_8cpp_source.html index 2363f1da3e..dcca81c92d 100644 --- a/docs/orbit/FactoryReset_8cpp_source.html +++ b/docs/orbit/FactoryReset_8cpp_source.html @@ -198,7 +198,7 @@
109  if (m_advanced) {
110  uint8_t curModeIndex = Modes::curModeIndex();
111  // reset the target mode slot on the target led
-
112  const default_mode_entry &def = default_modes[curModeIndex];
+
112  const default_mode_entry &def = default_modes[curModeIndex];
113  Colorset set(def.numColors, def.cols);
114  Mode *cur = Modes::curMode();
115  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -273,7 +273,7 @@
#define RGB_RED0
#define RGB_WHITE0
#define RGB_WHITE6
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:68
@@ -319,10 +319,10 @@
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static void resetFlags()
Definition: Modes.cpp:594
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:438
-
static bool setDefaults()
Definition: Modes.cpp:256
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static void resetFlags()
Definition: Modes.cpp:663
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:507
+
static bool setDefaults()
Definition: Modes.cpp:325
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
diff --git a/docs/orbit/GlobalBrightness_8h_source.html b/docs/orbit/GlobalBrightness_8h_source.html index 16ea14146f..ec804f2a25 100644 --- a/docs/orbit/GlobalBrightness_8h_source.html +++ b/docs/orbit/GlobalBrightness_8h_source.html @@ -120,10 +120,10 @@
31 };
32 
33 #endif
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279
MenuAction run() override
const uint8_t m_brightnessOptions[4]
diff --git a/docs/orbit/Log_8h_source.html b/docs/orbit/Log_8h_source.html index 99566e24f2..b1af460180 100644 --- a/docs/orbit/Log_8h_source.html +++ b/docs/orbit/Log_8h_source.html @@ -120,7 +120,7 @@
31 #endif
32 
33 #if LOGGING_LEVEL > 2
-
34 // arduino compiler won't allow for ellipsis macro that's passed no args...
+
34 // some compilers won't allow for ellipsis macro that's passed no args...
35 #define DEBUG_LOG(msg) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg)
36 #define DEBUG_LOGF(msg, ...) DebugMsg(__FILE__, __FUNCTION__, __LINE__, msg, __VA_ARGS__)
37 // debug messages are only in debug builds so they have full file + func + line info
diff --git a/docs/orbit/Memory_8cpp_source.html b/docs/orbit/Memory_8cpp_source.html index 169fb04000..fd8ef4372c 100644 --- a/docs/orbit/Memory_8cpp_source.html +++ b/docs/orbit/Memory_8cpp_source.html @@ -235,7 +235,7 @@
#define vfree(ptr)
Definition: Memory.h:35
#define vmalloc(size)
Definition: Memory.h:32
-
#define MAX_MEMORY
Definition: VortexConfig.h:207
+
#define MAX_MEMORY
Definition: VortexConfig.h:206
diff --git a/docs/orbit/Menu_8cpp_source.html b/docs/orbit/Menu_8cpp_source.html index 3e89bc455c..f1bf72c5ed 100644 --- a/docs/orbit/Menu_8cpp_source.html +++ b/docs/orbit/Menu_8cpp_source.html @@ -455,9 +455,9 @@
RGBColor m_menuColor
Definition: Menu.h:56
static void showSelection(RGBColor colval=RGB_WHITE5)
Definition: Menus.cpp:269
virtual void init()
Definition: Mode.cpp:120
-
static bool saveStorage()
Definition: Modes.cpp:170
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:368
+
static bool saveStorage()
Definition: Modes.cpp:209
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:437
static uint8_t numModes()
Definition: Modes.h:92
uint8_t blue
Definition: ColorTypes.h:90
diff --git a/docs/orbit/Menus_8cpp.html b/docs/orbit/Menus_8cpp.html index 3a62808354..21f37841fb 100644 --- a/docs/orbit/Menus_8cpp.html +++ b/docs/orbit/Menus_8cpp.html @@ -270,19 +270,19 @@

ENTRY(FactoryReset, RGB_MENU_FACTORY_RESET),
}
#define ENTRY(classname, color)
Definition: Menus.cpp:49
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:434
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:440
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:443
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:428
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:437
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:425
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:431
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:433
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:439
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:442
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:427
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:436
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:424
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:430
- +

Definition at line 53 of file Menus.cpp.

diff --git a/docs/orbit/Menus_8cpp__incl.md5 b/docs/orbit/Menus_8cpp__incl.md5 index 45e17c4a80..3c10dd2b4d 100644 --- a/docs/orbit/Menus_8cpp__incl.md5 +++ b/docs/orbit/Menus_8cpp__incl.md5 @@ -1 +1 @@ -16d49a51ce4fc26c1df4bd46bcc50f3d \ No newline at end of file +ef94412480825982f4c518ea91add3f9 \ No newline at end of file diff --git a/docs/orbit/Menus_8cpp__incl.svg b/docs/orbit/Menus_8cpp__incl.svg index 576c270bc9..99ffde2282 100644 --- a/docs/orbit/Menus_8cpp__incl.svg +++ b/docs/orbit/Menus_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -68,151 +68,151 @@ var sectionId = 'dynsection-0'; Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -224,583 +224,577 @@ var sectionId = 'dynsection-0'; - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/orbit/Menus_8cpp__incl_org.svg b/docs/orbit/Menus_8cpp__incl_org.svg index 95ad42186f..4e90fd3e8b 100644 --- a/docs/orbit/Menus_8cpp__incl_org.svg +++ b/docs/orbit/Menus_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/Menus.cpp Node1 - -VortexEngine/src/Menus -/Menus.cpp + +VortexEngine/src/Menus +/Menus.cpp @@ -22,151 +22,151 @@ Node2 - -Menus.h + +Menus.h Node1->Node2 - - + + Node11 - -MenuList/GlobalBrightness.h + +MenuList/GlobalBrightness.h Node1->Node11 - - + + Node13 - -MenuList/EditorConnection.h + +MenuList/EditorConnection.h Node1->Node13 - - + + Node15 - -../Log/Log.h + +../Log/Log.h - + Node1->Node15 - - + + Node17 - -MenuList/FactoryReset.h + +MenuList/FactoryReset.h Node1->Node17 - - + + Node18 - -MenuList/ModeSharing.h + +MenuList/ModeSharing.h Node1->Node18 - - + + Node19 - -MenuList/ColorSelect.h + +MenuList/ColorSelect.h Node1->Node19 - - + + Node21 - -MenuList/PatternSelect.h + +MenuList/PatternSelect.h Node1->Node21 - - + + Node22 - -MenuList/Randomizer.h + +MenuList/Randomizer.h - + Node1->Node22 - - + + Node25 - -../Time/TimeControl.h + +../Time/TimeControl.h - + Node1->Node25 - - + + @@ -178,583 +178,577 @@ - + Node1->Node26 - - + + Node27 - -../VortexEngine.h + +../VortexEngine.h - + Node1->Node27 - - + + Node28 - -../Buttons/Button.h + +../Buttons/Button.h - + Node1->Node28 - - + + Node29 - -../Serial/Serial.h + +../Serial/Serial.h - + Node1->Node29 - - + + Node30 - -../Modes/Modes.h + +../Modes/Modes.h - + Node1->Node30 - - + + Node31 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node31 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + Node10 - -../Patterns/Patterns.h + +../Patterns/Patterns.h Node9->Node10 - - + + Node10->Node3 - - + + Node12 - -../Menu.h + +../Menu.h Node11->Node12 - - + + Node12->Node3 - - + + Node12->Node4 - - + + Node12->Node7 - - + + Node12->Node9 - - + + Node13->Node9 - - + + Node13->Node12 - - + + Node14 - -../../Serial/ByteStream.h + +../../Serial/ByteStream.h Node13->Node14 - - + + Node14->Node3 - - + + Node14->Node15 - - + + Node15->Node5 - - + + Node15->Node8 - - + + Node16 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node15->Node16 - - + + Node16->Node3 - - + + Node16->Node5 - - + + Node17->Node12 - - + + Node18->Node12 - - + + Node19->Node12 - - + + Node20 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node19->Node20 - - + + Node20->Node4 - - + + Node20->Node5 - - + + - -Node21->Node9 - - - - -Node21->Node10 - - +Node21->Node9 + + Node21->Node12 - - + + Node21->Node20 - - + + - + Node22->Node9 - - + + - + Node22->Node12 - - + + Node23 - -../../Random/Random.h + +../../Random/Random.h - + Node22->Node23 - - + + Node24 - -stdint.h + +stdint.h - + Node23->Node24 - - + + - + Node25->Node3 - - + + - + Node25->Node5 - - + + - + Node25->Node7 - - + + - + Node26->Node5 - - + + - + Node26->Node25 - - + + - + Node27->Node3 - - + + - + Node27->Node5 - - + + - + Node28->Node3 - - + + - + Node29->Node3 - - + + - + Node30->Node3 - - + + - + Node30->Node4 - - + + - + Node30->Node5 - - + + - + Node30->Node10 - - + + - + Node30->Node14 - - + + - + Node30->Node31 - - + + - + Node31->Node3 - - + + - + Node31->Node4 - - + + - + Node31->Node7 - - + + diff --git a/docs/orbit/Menus_8cpp_source.html b/docs/orbit/Menus_8cpp_source.html index 7caf7680d6..310293f816 100644 --- a/docs/orbit/Menus_8cpp_source.html +++ b/docs/orbit/Menus_8cpp_source.html @@ -431,13 +431,13 @@
#define HYPERSTROBE_OFF_DURATION
Definition: Timings.h:36
#define ADV_MENU_DURATION_TICKS
Definition: Timings.h:22
#define ADVANCED_MENU_CLICKS
Definition: VortexConfig.h:71
-
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:434
-
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:440
-
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:443
-
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:428
-
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:437
-
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:425
-
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:431
+
#define RGB_MENU_COLOR_SELECT
Definition: VortexConfig.h:433
+
#define RGB_MENU_BRIGHTNESS_SELECT
Definition: VortexConfig.h:439
+
#define RGB_MENU_FACTORY_RESET
Definition: VortexConfig.h:442
+
#define RGB_MENU_MODE_SHARING
Definition: VortexConfig.h:427
+
#define RGB_MENU_PATTERN_SELECT
Definition: VortexConfig.h:436
+
#define RGB_MENU_RANDOMIZER
Definition: VortexConfig.h:424
+
#define RGB_MENU_EDITOR_CONNECTION
Definition: VortexConfig.h:430
uint32_t holdDuration() const
Definition: Button.h:47
uint32_t pressTime() const
Definition: Button.h:42
bool onShortClick() const
Definition: Button.h:34
@@ -488,7 +488,7 @@
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
static bool advancedMenusEnabled()
Definition: Modes.h:132
- +
uint8_t blue
Definition: ColorTypes.h:90
uint8_t green
Definition: ColorTypes.h:89
diff --git a/docs/orbit/ModeSharing_8cpp_source.html b/docs/orbit/ModeSharing_8cpp_source.html index ac26081270..dc47cbff79 100644 --- a/docs/orbit/ModeSharing_8cpp_source.html +++ b/docs/orbit/ModeSharing_8cpp_source.html @@ -370,8 +370,8 @@
void onLongClick() override
void showReceiveMode()
virtual void play()
Definition: Mode.cpp:139
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:418
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:487
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool loadMode(const Mode *targetMode)
Definition: VLSender.cpp:42
diff --git a/docs/orbit/Modes_8cpp_source.html b/docs/orbit/Modes_8cpp_source.html index 9fcfc98ff5..33058bd587 100644 --- a/docs/orbit/Modes_8cpp_source.html +++ b/docs/orbit/Modes_8cpp_source.html @@ -168,900 +168,969 @@
80 }
81 
-
82 // full save/load to/from buffer
-
83 bool Modes::saveToBuffer(ByteStream &modesBuffer)
-
84 {
-
85  // serialize the engine version into the modes buffer
-
86  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
87  return false;
-
88  }
-
89  // NOTE: instead of global brightness the duo uses this to store the
-
90  // startup mode ID. The duo doesn't offer a global brightness option
-
91  if (!modesBuffer.serialize(m_globalFlags)) {
-
92  return false;
-
93  }
-
94  // serialize the global brightness
-
95  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
96  return false;
-
97  }
-
98  // serialize all modes data into the modesBuffer
-
99  if (!serialize(modesBuffer)) {
-
100  return false;
-
101  }
-
102  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
103  if (!modesBuffer.compress()) {
-
104  return false;
-
105  }
-
106  return true;
-
107 }
-
108 
-
109 // load modes from a save buffer
- -
111 {
-
112  if (!modesBuffer.decompress()) {
-
113  // failed to decompress?
+ +
83 {
+
84  // serialize the engine version into the modes buffer
+
85  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
86  return false;
+
87  }
+
88  // NOTE: instead of global brightness the duo uses this to store the
+
89  // startup mode ID. The duo doesn't offer a global brightness option
+
90  if (!saveBuffer.serialize(m_globalFlags)) {
+
91  return false;
+
92  }
+
93  // serialize the global brightness
+
94  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
95  return false;
+
96  }
+
97  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
98  return true;
+
99 }
+
100 
+ +
102 {
+
103  // reset the unserializer index before unserializing anything
+
104  saveHeader.resetUnserializer();
+
105  uint8_t major = 0;
+
106  uint8_t minor = 0;
+
107  // unserialize the vortex version
+
108  saveHeader.unserialize(&major);
+
109  saveHeader.unserialize(&minor);
+
110  // check the version for incompatibility
+
111  if (!VortexEngine::checkVersion(major, minor)) {
+
112  // incompatible version
+
113  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
114  return false;
115  }
-
116  // reset the unserializer index before unserializing anything
-
117  modesBuffer.resetUnserializer();
-
118  uint8_t major = 0;
-
119  uint8_t minor = 0;
-
120  // unserialize the vortex version
-
121  modesBuffer.unserialize(&major);
-
122  modesBuffer.unserialize(&minor);
-
123  // check the version for incompatibility
-
124  if (!VortexEngine::checkVersion(major, minor)) {
-
125  // incompatible version
-
126  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
127  return false;
-
128  }
-
129  // NOTE: instead of global brightness the duo uses this to store the
-
130  // startup mode ID. The duo doesn't offer a global brightness option
-
131  // unserialize the global brightness
-
132  modesBuffer.unserialize(&m_globalFlags);
-
133  // unserialize the global brightness
-
134  uint8_t brightness = 0;
-
135  modesBuffer.unserialize(&brightness);
-
136  if (brightness) {
-
137  Leds::setBrightness(brightness);
-
138  }
-
139  // now just unserialize the list of modes
-
140  if (!unserialize(modesBuffer)) {
-
141  return false;
-
142  }
-
143  // startupMode is 1-based offset that encodes both the index to start at and
-
144  // whether the system is enabled, hence why 0 cannot be used as an offset
-
145  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
146  if (oneClickModeEnabled() && startupMode > 0) {
-
147  // set the current mode to the startup mode
- -
149  }
-
150  return true;
-
151 }
-
152 
- -
154 {
-
155  // this is good on memory, but it erases what they have stored
-
156  // before we know whether there is something actually saved
-
157  clearModes();
-
158  ByteStream modesBuffer;
-
159  // only read storage if the modebuffer isn't filled
-
160  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
161  DEBUG_LOG("Empty buffer read from storage");
-
162  // this kinda sucks whatever they had loaded is gone
-
163  return false;
-
164  }
-
165  return loadFromBuffer(modesBuffer);
-
166 }
-
167 
-
168 // NOTE: Flash storage is limited to about 10,000 writes so
-
169 // use this function sparingly!
- -
171 {
-
172  DEBUG_LOG("Saving modes...");
-
173  // A ByteStream to hold all the serialized data
-
174  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
175  // save data to the buffer
-
176  if (!saveToBuffer(modesBuffer)) {
-
177  return false;
-
178  }
-
179  // write the serial buffer to flash storage, this
-
180  // will compress the buffer and include crc/flags
-
181  if (!Storage::write(modesBuffer)) {
-
182  DEBUG_LOG("Failed to write storage");
-
183  return false;
-
184  }
-
185  DEBUG_LOG("Success saving modes to storage");
-
186  return true;
-
187 }
-
188 
-
189 // Save all of the modes to a serial buffer
-
190 bool Modes::serialize(ByteStream &modesBuffer)
-
191 {
-
192  // serialize the number of modes
-
193  if (!modesBuffer.serialize(m_numModes)) {
+
116  // NOTE: instead of global brightness the duo uses this to store the
+
117  // startup mode ID. The duo doesn't offer a global brightness option
+
118  // unserialize the global brightness
+
119  saveHeader.unserialize(&m_globalFlags);
+
120  // unserialize the global brightness
+
121  uint8_t brightness = 0;
+
122  saveHeader.unserialize(&brightness);
+
123  if (brightness) {
+
124  Leds::setBrightness(brightness);
+
125  }
+
126  return true;
+
127 }
+
128 
+
129 // full save/load to/from buffer
+
130 bool Modes::saveToBuffer(ByteStream &modesBuffer)
+
131 {
+
132  // first write out the header
+
133  if (!serializeSaveHeader(modesBuffer)) {
+
134  return false;
+
135  }
+
136  // serialize all modes data into the modesBuffer
+
137  if (!serialize(modesBuffer)) {
+
138  return false;
+
139  }
+
140  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
141  if (!modesBuffer.compress()) {
+
142  return false;
+
143  }
+
144  return true;
+
145 }
+
146 
+
147 // load modes from a save buffer
+ +
149 {
+
150  if (!modesBuffer.decompress()) {
+
151  // failed to decompress?
+
152  return false;
+
153  }
+
154  // read out the header first
+
155  if (!unserializeSaveHeader(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // now just unserialize the list of modes
+
159  if (!unserialize(modesBuffer)) {
+
160  return false;
+
161  }
+
162  // startupMode is 1-based offset that encodes both the index to start at and
+
163  // whether the system is enabled, hence why 0 cannot be used as an offset
+
164  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
165  if (oneClickModeEnabled() && startupMode > 0) {
+
166  // set the current mode to the startup mode
+ +
168  }
+
169  return true;
+
170 }
+
171 
+ +
173 {
+
174  ByteStream headerBuffer;
+
175  // only read storage if the modebuffer isn't filled
+
176  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
177  DEBUG_LOG("Empty buffer read from storage");
+
178  // this kinda sucks whatever they had loaded is gone
+
179  return false;
+
180  }
+
181  // this erases what is stored before we know whether there is data
+
182  // but it's the easiest way to just re-load new data from storage
+
183  clearModes();
+
184  // read the header and load the data
+
185  if (!unserializeSaveHeader(headerBuffer)) {
+
186  return false;
+
187  }
+
188  // unserialize the number of modes next
+
189  uint8_t numModes = 0;
+
190  headerBuffer.unserialize(&numModes);
+
191  if (!numModes) {
+
192  DEBUG_LOG("Did not find any modes");
+
193  // this kinda sucks whatever they had loaded is gone
194  return false;
195  }
-
196  // make sure the current mode is saved in case it has changed somehow
-
197  saveCurMode();
-
198  // uninstantiate cur mode so we have stack space to serialize
-
199  if (m_pCurModeLink) {
- -
201  }
-
202  ModeLink *ptr = m_storedModes;
-
203  while (ptr) {
-
204  // instantiate the mode temporarily
-
205  Mode *mode = ptr->instantiate();
-
206  if (!mode) {
- -
208  return false;
-
209  }
-
210  // serialize it into the target modes buffer
-
211  mode->serialize(modesBuffer);
-
212  // just uninstansiate the mode after serializing
-
213  ptr->uninstantiate();
-
214  // next mode
-
215  ptr = ptr->next();
-
216  }
-
217  // reinstanstiate the current mode
- -
219  return false;
-
220  }
-
221  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
222  return true;
-
223 }
-
224 
-
225 // load all modes from a serial buffer
-
226 bool Modes::unserialize(ByteStream &modesBuffer)
-
227 {
-
228  DEBUG_LOG("Loading modes...");
-
229  // this is good on memory, but it erases what they have stored before we
-
230  // know whether there is something actually saved in the serial buffer
-
231  clearModes();
-
232  // unserialize the number of modes next
-
233  uint8_t numModes = 0;
-
234  modesBuffer.unserialize(&numModes);
-
235  if (!numModes) {
-
236  DEBUG_LOG("Did not find any modes");
-
237  // this kinda sucks whatever they had loaded is gone
-
238  return false;
-
239  }
-
240  // foreach expected mode
-
241  for (uint8_t i = 0; i < numModes; ++i) {
-
242  // just copy the serialized mode into the internal storage because
-
243  // we store the modes in a serialized manner so that they are smaller
-
244  // then we unpack them when we instantiate the mode
-
245  if (!addSerializedMode(modesBuffer)) {
-
246  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
247  // clear work so far?
-
248  clearModes();
-
249  return false;
-
250  }
-
251  }
-
252  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
253  return (m_numModes == numModes);
-
254 }
-
255 
- -
257 {
-
258  clearModes();
-
259 #if DEMO_ALL_PATTERNS == 1
-
260  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
261  PatternID default_start = PATTERN_FIRST;
-
262  PatternID default_end = PATTERN_LAST;
-
263  // add 65 randomized modes
-
264  for (int i = 0; i < 65; ++i) {
-
265  Mode tmpMode;
-
266  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
267  // create a random pattern ID from all patterns
- -
269  Colorset randSet;
-
270  randSet.randomize(8);
-
271  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
272  }
-
273  // add another mode with the given pattern and colorset
-
274  if (!addMode(&tmpMode)) {
-
275  ERROR_LOG("Failed to add mode");
-
276  // return false?
-
277  }
-
278  }
-
279  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
280 #else
-
281  // add each default mode with each of the given colors
-
282  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
283  const default_mode_entry &def = default_modes[i];
-
284  Colorset set(def.numColors, def.cols);
-
285  addMode(def.patternID, nullptr, &set);
-
286  }
-
287 #endif
-
288  return true;
-
289 }
-
290 
- -
292 {
-
293 #if MAX_MODES != 0
-
294  if (m_numModes >= MAX_MODES) {
-
295  return false;
-
296  }
-
297 #endif
-
298  // we must unserialize then re-serialize here because the
-
299  // input argument may contain other patterns in the buffer
-
300  // so we cannot just append the input arg to m_storedModes
-
301  Mode tmpMode;
-
302  if (!tmpMode.unserialize(serializedMode)) {
-
303  return false;
-
304  }
-
305  // initialize the mode because a pattern could theoretically serialize
-
306  // differently after it has initialized
-
307  tmpMode.init();
-
308  return addMode(&tmpMode);
-
309 }
-
310 
- -
312 {
-
313 #if MAX_MODES != 0
-
314  if (m_numModes >= MAX_MODES) {
-
315  return false;
-
316  }
-
317 #endif
-
318  if (!m_storedModes->append(serializedMode)) {
- -
320  return false;
-
321  }
-
322  // increment mode counter
-
323  m_numModes++;
-
324  return true;
-
325 }
-
326 
-
327 // shift the current mode to a different position relative to current position
-
328 // negative values for up, positive values for down, 0 for no move
-
329 bool Modes::shiftCurMode(int32_t offset)
-
330 {
-
331  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
332  if (newPos >= m_numModes) {
-
333  return false;
-
334  }
-
335  if (newPos == m_curMode) {
-
336  return true;
-
337  }
-
338  // get the target mode at the position of the shift
-
339  ModeLink *target = getModeLink(newPos);
-
340  if (!target) {
-
341  // invalid new position?
-
342  return false;
-
343  }
-
344  // special case for moving first in list forward
-
345  if (!m_curMode && offset > 0) {
-
346  // update main list ptr
- -
348  }
-
349  // unlink the current link
- -
351  // update the current position to reflect our new pos
-
352  m_curMode = newPos;
-
353  // then re-link the mode at the new spot
-
354  if (offset < 0) {
-
355  // link the link before our target link
-
356  target->linkBefore(m_pCurModeLink);
-
357  // special case for moving into first in list
-
358  if (!m_curMode) {
- -
360  }
-
361  } else {
-
362  // link the link after our target link
-
363  target->linkAfter(m_pCurModeLink);
-
364  }
-
365  return true;
-
366 }
-
367 
- -
369  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
-
370 {
-
371  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
372  return addMode(id, nullptr, &set);
-
373 }
-
374 
-
375 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
-
376 {
-
377  // max modes
-
378 #if MAX_MODES != 0
-
379  if (m_numModes >= MAX_MODES) {
-
380  return false;
-
381  }
-
382 #endif
-
383  if (id >= PATTERN_COUNT) {
+
196  // iterate each mode and read it out of it's storage slot then add it
+
197  for (uint8_t i = 0; i < numModes; ++i) {
+
198  ByteStream modeBuffer(MAX_MODE_SIZE);
+
199  // read each mode from a storage slot and load it
+
200  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
201  return false;
+
202  }
+
203  }
+
204  return true;
+
205 }
+
206 
+
207 // NOTE: Flash storage is limited to about 10,000 writes so
+
208 // use this function sparingly!
+ +
210 {
+
211  DEBUG_LOG("Saving modes...");
+
212  ByteStream headerBuffer(MAX_MODE_SIZE);
+
213  if (!serializeSaveHeader(headerBuffer)) {
+
214  return false;
+
215  }
+
216  // serialize the number of modes
+
217  if (!headerBuffer.serialize(m_numModes)) {
+
218  return false;
+
219  }
+
220  if (!Storage::write(0, headerBuffer)) {
+
221  return false;
+
222  }
+
223  // make sure the current mode is saved in case it has changed somehow
+
224  saveCurMode();
+
225  // uninstantiate cur mode so we have stack space to serialize
+
226  if (m_pCurModeLink) {
+ +
228  }
+
229  uint16_t i = 0;
+
230  ModeLink *ptr = m_storedModes;
+
231  while (ptr && i < MAX_MODES) {
+
232  ByteStream modeBuffer(MAX_MODE_SIZE);
+
233  // instantiate the mode temporarily
+
234  Mode *mode = ptr->instantiate();
+
235  if (!mode) {
+ +
237  return false;
+
238  }
+
239  // serialize it into the target modes buffer
+
240  mode->serialize(modeBuffer);
+
241  // just uninstansiate the mode after serializing
+
242  ptr->uninstantiate();
+
243  // next mode
+
244  ptr = ptr->next();
+
245  // now write this mode into a storage slot (skip first slot, that's header)
+
246  if (!Storage::write(++i, modeBuffer)) {
+
247  return false;
+
248  }
+
249  }
+
250  // reinstanstiate the current mode
+ +
252  return false;
+
253  }
+
254  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
255  return true;
+
256 }
+
257 
+
258 // Save all of the modes to a serial buffer
+
259 bool Modes::serialize(ByteStream &modesBuffer)
+
260 {
+
261  // serialize the number of modes
+
262  if (!modesBuffer.serialize(m_numModes)) {
+
263  return false;
+
264  }
+
265  // make sure the current mode is saved in case it has changed somehow
+
266  saveCurMode();
+
267  // uninstantiate cur mode so we have stack space to serialize
+
268  if (m_pCurModeLink) {
+ +
270  }
+
271  ModeLink *ptr = m_storedModes;
+
272  while (ptr) {
+
273  // instantiate the mode temporarily
+
274  Mode *mode = ptr->instantiate();
+
275  if (!mode) {
+ +
277  return false;
+
278  }
+
279  // serialize it into the target modes buffer
+
280  mode->serialize(modesBuffer);
+
281  // just uninstansiate the mode after serializing
+
282  ptr->uninstantiate();
+
283  // next mode
+
284  ptr = ptr->next();
+
285  }
+
286  // reinstanstiate the current mode
+ +
288  return false;
+
289  }
+
290  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
291  return true;
+
292 }
+
293 
+
294 // load all modes from a serial buffer
+
295 bool Modes::unserialize(ByteStream &modesBuffer)
+
296 {
+
297  DEBUG_LOG("Loading modes...");
+
298  // this is good on memory, but it erases what they have stored before we
+
299  // know whether there is something actually saved in the serial buffer
+
300  clearModes();
+
301  // unserialize the number of modes next
+
302  uint8_t numModes = 0;
+
303  modesBuffer.unserialize(&numModes);
+
304  if (!numModes) {
+
305  DEBUG_LOG("Did not find any modes");
+
306  // this kinda sucks whatever they had loaded is gone
+
307  return false;
+
308  }
+
309  // foreach expected mode
+
310  for (uint8_t i = 0; i < numModes; ++i) {
+
311  // just copy the serialized mode into the internal storage because
+
312  // we store the modes in a serialized manner so that they are smaller
+
313  // then we unpack them when we instantiate the mode
+
314  if (!addSerializedMode(modesBuffer)) {
+
315  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
316  // clear work so far?
+
317  clearModes();
+
318  return false;
+
319  }
+
320  }
+
321  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
322  return (m_numModes == numModes);
+
323 }
+
324 
+ +
326 {
+
327  clearModes();
+
328 #if DEMO_ALL_PATTERNS == 1
+
329  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
330  PatternID default_start = PATTERN_FIRST;
+
331  PatternID default_end = PATTERN_LAST;
+
332  // add 65 randomized modes
+
333  for (int i = 0; i < 65; ++i) {
+
334  Mode tmpMode;
+
335  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
336  // create a random pattern ID from all patterns
+ +
338  Colorset randSet;
+
339  randSet.randomize(8);
+
340  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
341  }
+
342  // add another mode with the given pattern and colorset
+
343  if (!addMode(&tmpMode)) {
+
344  ERROR_LOG("Failed to add mode");
+
345  // return false?
+
346  }
+
347  }
+
348  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
349 #else
+
350  // add each default mode with each of the given colors
+
351  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
352  const default_mode_entry &def = default_modes[i];
+
353  Colorset set(def.numColors, def.cols);
+
354  addMode(def.patternID, nullptr, &set);
+
355  }
+
356 #endif
+
357  return true;
+
358 }
+
359 
+ +
361 {
+
362 #if MAX_MODES != 0
+
363  if (m_numModes >= MAX_MODES) {
+
364  return false;
+
365  }
+
366 #endif
+
367  // we must unserialize then re-serialize here because the
+
368  // input argument may contain other patterns in the buffer
+
369  // so we cannot just append the input arg to m_storedModes
+
370  Mode tmpMode;
+
371  if (!tmpMode.unserialize(serializedMode)) {
+
372  return false;
+
373  }
+
374  // initialize the mode because a pattern could theoretically serialize
+
375  // differently after it has initialized
+
376  tmpMode.init();
+
377  return addMode(&tmpMode);
+
378 }
+
379 
+ +
381 {
+
382 #if MAX_MODES != 0
+
383  if (m_numModes >= MAX_MODES) {
384  return false;
385  }
-
386  Mode tmpMode(id, args, set);
-
387  // must init the mode so that it can be serialized
-
388  tmpMode.init();
-
389  // not a very good way to do this but it ensures the mode is
-
390  // added in the same way
-
391  return addMode(&tmpMode);
-
392 }
-
393 
-
394 bool Modes::addMode(const Mode *mode)
-
395 {
-
396 #if MAX_MODES != 0
-
397  // max modes
-
398  if (m_numModes >= MAX_MODES) {
-
399  return false;
-
400  }
-
401 #endif
-
402  if (!m_storedModes) {
-
403  m_storedModes = new ModeLink(mode);
-
404  if (!m_storedModes) {
- -
406  return false;
-
407  }
-
408  } else {
-
409  if (!m_storedModes->append(mode)) {
- -
411  return false;
-
412  }
-
413  }
-
414  m_numModes++;
-
415  return true;
-
416 }
-
417 
-
418 bool Modes::updateCurMode(const Mode *mode)
-
419 {
-
420  if (!mode) {
-
421  return false;
-
422  }
-
423  Mode *pCur = curMode();
-
424  if (!pCur) {
-
425  return false;
-
426  }
-
427  // utilize copy operator
-
428  *pCur = *mode;
-
429  // immediately save this mode to the internal mode storage
-
430  if (!saveCurMode()) {
-
431  return false;
-
432  }
-
433  // initialize the new mode
-
434  return initCurMode();
+
386 #endif
+
387  if (!m_storedModes->append(serializedMode)) {
+ +
389  return false;
+
390  }
+
391  // increment mode counter
+
392  m_numModes++;
+
393  return true;
+
394 }
+
395 
+
396 // shift the current mode to a different position relative to current position
+
397 // negative values for up, positive values for down, 0 for no move
+
398 bool Modes::shiftCurMode(int32_t offset)
+
399 {
+
400  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
401  if (newPos >= m_numModes) {
+
402  return false;
+
403  }
+
404  if (newPos == m_curMode) {
+
405  return true;
+
406  }
+
407  // get the target mode at the position of the shift
+
408  ModeLink *target = getModeLink(newPos);
+
409  if (!target) {
+
410  // invalid new position?
+
411  return false;
+
412  }
+
413  // special case for moving first in list forward
+
414  if (!m_curMode && offset > 0) {
+
415  // update main list ptr
+ +
417  }
+
418  // unlink the current link
+ +
420  // update the current position to reflect our new pos
+
421  m_curMode = newPos;
+
422  // then re-link the mode at the new spot
+
423  if (offset < 0) {
+
424  // link the link before our target link
+
425  target->linkBefore(m_pCurModeLink);
+
426  // special case for moving into first in list
+
427  if (!m_curMode) {
+ +
429  }
+
430  } else {
+
431  // link the link after our target link
+
432  target->linkAfter(m_pCurModeLink);
+
433  }
+
434  return true;
435 }
436 
-
437 // set the current active mode by index
-
438 Mode *Modes::setCurMode(uint8_t index)
+ +
438  RGBColor c4, RGBColor c5, RGBColor c6, RGBColor c7, RGBColor c8)
439 {
-
440  if (!m_numModes) {
-
441  return nullptr;
-
442  }
-
443  // clear the LEDs when switching modes
-
444  Leds::clearAll();
-
445  // if we have a current mode open, close it
-
446  if (m_pCurModeLink) {
- -
448  }
-
449  int8_t newModeIdx = index % m_numModes;
-
450  // lookup the new mode link
-
451  ModeLink *newCurLink = getModeLink(newModeIdx);
-
452  if (!newCurLink) {
-
453  // what
-
454  return nullptr;
-
455  }
-
456  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
457  Mode *newCur = newCurLink->instantiate();
-
458  if (!newCur) {
- -
460  return nullptr;
-
461  }
-
462  // update to the new mode
-
463  m_curMode = newModeIdx;
-
464  m_pCurModeLink = newCurLink;
-
465  // record the current time as the last switch time
- -
467  // update the global startup mode to be this mode, if we turn off
-
468  // and turn back on into one click mode it will select this one
-
469  Modes::setStartupMode(newModeIdx);
-
470  // log the change
-
471  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
472  m_curMode, m_numModes - 1, newCur->getPatternID());
-
473  // return the new current mode
-
474  return newCur;
-
475 }
-
476 
-
477 // the current mode
- -
479 {
-
480  // empty mode list
-
481  if (!m_numModes) {
-
482  return nullptr;
-
483  }
-
484  if (!m_pCurModeLink) {
-
485  if (!initCurMode()) {
-
486  ERROR_LOG("Failed to initialize current mode");
-
487  return nullptr;
-
488  }
-
489  }
-
490  // get current mode, instantiate it if necessary
-
491  return m_pCurModeLink->instantiate();
-
492 }
-
493 
-
494 // iterate to next mode and return it
- -
496 {
-
497  if (!m_numModes) {
-
498  return nullptr;
-
499  }
-
500  // iterate the cur mode forward
-
501  return setCurMode(m_curMode + 1);
-
502 }
-
503 
-
504 // iterate to previous mode and return it
- -
506 {
-
507  if (!m_numModes) {
-
508  return nullptr;
-
509  }
-
510  // iterate the cur mode backwards
-
511  if (!m_curMode) {
-
512  return setCurMode(numModes() - 1);
-
513  }
-
514  return setCurMode(m_curMode - 1);
-
515 }
-
516 
- -
518 {
-
519  do {
-
520  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
521  break;
-
522  }
-
523  } while (m_curMode != 0);
-
524  return curMode();
-
525 }
-
526 
- -
528 {
-
529  if (!m_numModes || !m_pCurModeLink) {
-
530  return;
-
531  }
-
532  // unlink the current mode so it can be deleted and
-
533  // update the current mode link accordingly
-
534  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
535  delete m_pCurModeLink;
-
536  m_pCurModeLink = newCur;
-
537  if (m_curMode) {
-
538  m_curMode--;
-
539  } else {
- -
541  }
-
542  m_numModes--;
-
543  if (!m_numModes) {
-
544  m_storedModes = nullptr;
-
545  }
-
546 }
-
547 
- -
549 {
-
550  if (!m_numModes || !m_storedModes) {
-
551  return;
+
440  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
441  return addMode(id, nullptr, &set);
+
442 }
+
443 
+
444 bool Modes::addMode(PatternID id, const PatternArgs *args, const Colorset *set)
+
445 {
+
446  // max modes
+
447 #if MAX_MODES != 0
+
448  if (m_numModes >= MAX_MODES) {
+
449  return false;
+
450  }
+
451 #endif
+
452  if (id >= PATTERN_COUNT) {
+
453  return false;
+
454  }
+
455  Mode tmpMode(id, args, set);
+
456  // must init the mode so that it can be serialized
+
457  tmpMode.init();
+
458  // not a very good way to do this but it ensures the mode is
+
459  // added in the same way
+
460  return addMode(&tmpMode);
+
461 }
+
462 
+
463 bool Modes::addMode(const Mode *mode)
+
464 {
+
465 #if MAX_MODES != 0
+
466  // max modes
+
467  if (m_numModes >= MAX_MODES) {
+
468  return false;
+
469  }
+
470 #endif
+
471  if (!m_storedModes) {
+
472  m_storedModes = new ModeLink(mode);
+
473  if (!m_storedModes) {
+ +
475  return false;
+
476  }
+
477  } else {
+
478  if (!m_storedModes->append(mode)) {
+ +
480  return false;
+
481  }
+
482  }
+
483  m_numModes++;
+
484  return true;
+
485 }
+
486 
+
487 bool Modes::updateCurMode(const Mode *mode)
+
488 {
+
489  if (!mode) {
+
490  return false;
+
491  }
+
492  Mode *pCur = curMode();
+
493  if (!pCur) {
+
494  return false;
+
495  }
+
496  // utilize copy operator
+
497  *pCur = *mode;
+
498  // immediately save this mode to the internal mode storage
+
499  if (!saveCurMode()) {
+
500  return false;
+
501  }
+
502  // initialize the new mode
+
503  return initCurMode();
+
504 }
+
505 
+
506 // set the current active mode by index
+
507 Mode *Modes::setCurMode(uint8_t index)
+
508 {
+
509  if (!m_numModes) {
+
510  return nullptr;
+
511  }
+
512  // clear the LEDs when switching modes
+
513  Leds::clearAll();
+
514  // if we have a current mode open, close it
+
515  if (m_pCurModeLink) {
+ +
517  }
+
518  int8_t newModeIdx = index % m_numModes;
+
519  // lookup the new mode link
+
520  ModeLink *newCurLink = getModeLink(newModeIdx);
+
521  if (!newCurLink) {
+
522  // what
+
523  return nullptr;
+
524  }
+
525  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
526  Mode *newCur = newCurLink->instantiate();
+
527  if (!newCur) {
+ +
529  return nullptr;
+
530  }
+
531  // update to the new mode
+
532  m_curMode = newModeIdx;
+
533  m_pCurModeLink = newCurLink;
+
534  // record the current time as the last switch time
+ +
536  // update the global startup mode to be this mode, if we turn off
+
537  // and turn back on into one click mode it will select this one
+
538  Modes::setStartupMode(newModeIdx);
+
539  // log the change
+
540  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
541  m_curMode, m_numModes - 1, newCur->getPatternID());
+
542  // return the new current mode
+
543  return newCur;
+
544 }
+
545 
+
546 // the current mode
+ +
548 {
+
549  // empty mode list
+
550  if (!m_numModes) {
+
551  return nullptr;
552  }
-
553  // delete the first node and it will delete the entire chain
-
554  delete m_storedModes;
-
555  m_pCurModeLink = nullptr;
-
556  m_storedModes = nullptr;
-
557  m_numModes = 0;
-
558  // might as well clear the leds
-
559  Leds::clearAll();
-
560 }
-
561 
-
562 void Modes::setStartupMode(uint8_t index)
-
563 {
-
564  // zero out the upper nibble to disable
-
565  m_globalFlags &= 0x0F;
-
566  // or in the index value shifted into the upper nibble
-
567  m_globalFlags |= (index << 4) & 0xF0;
-
568 }
-
569 
- -
571 {
-
572  // zero out the upper nibble to disable
-
573  return (m_globalFlags & 0xF0) >> 4;
-
574 }
-
575 
-
576 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
-
577 {
-
578  // then actually if it's enabled ensure the upper nibble is set
-
579  if (enable) {
-
580  // set the cur mode index as the upper nibble
-
581  m_globalFlags |= flag;
-
582  } else {
-
583  m_globalFlags &= ~flag;
-
584  }
-
585  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
586  return !save || saveStorage();
-
587 }
-
588 
-
589 bool Modes::getFlag(uint8_t flag)
-
590 {
-
591  return ((m_globalFlags & flag) != 0);
-
592 }
-
593 
- -
595 {
-
596  m_globalFlags = 0;
-
597 }
-
598 
-
599 #ifdef VORTEX_LIB
-
600 #include "Patterns/PatternBuilder.h"
-
601 // get the maximum size a mode can occupy
-
602 uint32_t Modes::maxModeSize()
-
603 {
-
604  Mode maxMode;
-
605  uint8_t x = 0;
-
606  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
607  // blend takes up 8 params
-
608  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
-
609  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
-
610  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
-
611  Colorset maxSet;
-
612  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
613  // different color in each slot
-
614  RGBColor col;
-
615  col.red = ++x;
-
616  col.green = ++x;
-
617  col.blue = ++x;
-
618  maxSet.addColor(col);
-
619  }
-
620  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
553  if (!m_pCurModeLink) {
+
554  if (!initCurMode()) {
+
555  ERROR_LOG("Failed to initialize current mode");
+
556  return nullptr;
+
557  }
+
558  }
+
559  // get current mode, instantiate it if necessary
+
560  return m_pCurModeLink->instantiate();
+
561 }
+
562 
+
563 // iterate to next mode and return it
+ +
565 {
+
566  if (!m_numModes) {
+
567  return nullptr;
+
568  }
+
569  // iterate the cur mode forward
+
570  return setCurMode(m_curMode + 1);
+
571 }
+
572 
+
573 // iterate to previous mode and return it
+ +
575 {
+
576  if (!m_numModes) {
+
577  return nullptr;
+
578  }
+
579  // iterate the cur mode backwards
+
580  if (!m_curMode) {
+
581  return setCurMode(numModes() - 1);
+
582  }
+
583  return setCurMode(m_curMode - 1);
+
584 }
+
585 
+ +
587 {
+
588  do {
+
589  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
590  break;
+
591  }
+
592  } while (m_curMode != 0);
+
593  return curMode();
+
594 }
+
595 
+ +
597 {
+
598  if (!m_numModes || !m_pCurModeLink) {
+
599  return;
+
600  }
+
601  // unlink the current mode so it can be deleted and
+
602  // update the current mode link accordingly
+
603  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
604  delete m_pCurModeLink;
+
605  m_pCurModeLink = newCur;
+
606  if (m_curMode) {
+
607  m_curMode--;
+
608  } else {
+ +
610  }
+
611  m_numModes--;
+
612  if (!m_numModes) {
+
613  m_storedModes = nullptr;
+
614  }
+
615 }
+
616 
+ +
618 {
+
619  if (!m_numModes || !m_storedModes) {
+
620  return;
621  }
-
622  ByteStream stream;
-
623  maxMode.saveToBuffer(stream);
-
624  return stream.size();
-
625 }
-
626 
-
627 // get the maximum size a savefile can occupy
-
628 uint32_t Modes::maxSaveSize()
-
629 {
-
630 #if MAX_MODES == 0
-
631  // unbounded
-
632  return 0;
-
633 #else
-
634  ByteStream backupModes;
-
635  saveToBuffer(backupModes);
-
636  for (uint32_t i = 0; i < MAX_MODES; ++i) {
-
637  Mode maxMode;
-
638  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
-
639  // blend takes up 8 params
-
640  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
-
641  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
-
642  Colorset maxSet;
-
643  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
-
644  // different color in each slot
-
645  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
-
646  }
-
647  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
-
648  }
-
649  addMode(&maxMode);
-
650  }
-
651  // grab the size of the new buffer
-
652  ByteStream stream;
-
653  saveToBuffer(stream);
-
654  uint32_t size = stream.size();
-
655  // restore backed up modes
-
656  loadFromBuffer(backupModes);
-
657  return size;
-
658 #endif
-
659 }
-
660 #endif
-
661 
-
662 // fetch a link from the chain by index
- +
622  // delete the first node and it will delete the entire chain
+
623  delete m_storedModes;
+
624  m_pCurModeLink = nullptr;
+
625  m_storedModes = nullptr;
+
626  m_numModes = 0;
+
627  // might as well clear the leds
+
628  Leds::clearAll();
+
629 }
+
630 
+
631 void Modes::setStartupMode(uint8_t index)
+
632 {
+
633  // zero out the upper nibble to disable
+
634  m_globalFlags &= 0x0F;
+
635  // or in the index value shifted into the upper nibble
+
636  m_globalFlags |= (index << 4) & 0xF0;
+
637 }
+
638 
+ +
640 {
+
641  // zero out the upper nibble to disable
+
642  return (m_globalFlags & 0xF0) >> 4;
+
643 }
+
644 
+
645 bool Modes::setFlag(uint8_t flag, bool enable, bool save)
+
646 {
+
647  // then actually if it's enabled ensure the upper nibble is set
+
648  if (enable) {
+
649  // set the cur mode index as the upper nibble
+
650  m_globalFlags |= flag;
+
651  } else {
+
652  m_globalFlags &= ~flag;
+
653  }
+
654  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
655  return !save || saveStorage();
+
656 }
+
657 
+
658 bool Modes::getFlag(uint8_t flag)
+
659 {
+
660  return ((m_globalFlags & flag) != 0);
+
661 }
+
662 
+
664 {
-
665  if (index >= m_numModes) {
-
666  return nullptr;
-
667  }
-
668  ModeLink *ptr = m_storedModes;
-
669  while (index > 0 && ptr) {
-
670  ptr = ptr->next();
-
671  index--;
-
672  }
-
673  return ptr;
-
674 }
-
675 
- -
677 {
-
678  if (!m_numModes) {
-
679  return nullptr;
-
680  }
-
681  // cleanup the current mode link
-
682  if (m_pCurModeLink) {
- -
684  }
-
685  // update the current mode link based on the curmode index
- -
687  if (!m_pCurModeLink) {
-
688  return nullptr;
-
689  }
-
690  if (force) {
- -
692  }
-
693  return m_pCurModeLink->instantiate();
+
665  m_globalFlags = 0;
+
666 }
+
667 
+
668 #ifdef VORTEX_LIB
+
669 #include "Patterns/PatternBuilder.h"
+
670 // get the maximum size a mode can occupy
+
671 uint32_t Modes::maxModeSize()
+
672 {
+
673  Mode maxMode;
+
674  uint8_t x = 0;
+
675  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
676  // blend takes up 8 params
+
677  PatternArgs maxArgs((uint8_t)p + 0xd2, (uint8_t)p + 0xd3, (uint8_t)p + 0xd4, (uint8_t)p + 0xd5,
+
678  (uint8_t)p + 0xd6, (uint8_t)p + 0xd7, (uint8_t)p + 0xd8, (uint8_t)p + 0xd9);
+
679  //PatternArgs typicalArgs = PatternBuilder::getDefaultArgs(PATTERN_BLEND);
+
680  Colorset maxSet;
+
681  for (uint8_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
682  // different color in each slot
+
683  RGBColor col;
+
684  col.red = ++x;
+
685  col.green = ++x;
+
686  col.blue = ++x;
+
687  maxSet.addColor(col);
+
688  }
+
689  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
690  }
+
691  ByteStream stream;
+
692  maxMode.saveToBuffer(stream);
+
693  return stream.size();
694 }
695 
- -
697 {
-
698  if (!m_pCurModeLink) {
-
699  // if there's no loaded mode currently then there's nothing
-
700  // to save so there's no error
-
701  return false;
-
702  }
-
703  // force the current mode to save back to serial to catch changes
-
704  return m_pCurModeLink->save();
-
705 }
-
706 
-
707 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
-
708  m_pInstantiatedMode(nullptr),
-
709  m_storedMode(),
-
710  m_next(nullptr),
-
711  m_prev(nullptr)
-
712 {
-
713  if (src) {
-
714  init(src);
-
715  }
-
716  if (src && inst) {
-
717  instantiate();
-
718  }
-
719 }
-
720 
-
721 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
-
722  m_pInstantiatedMode(nullptr),
-
723  m_storedMode(src),
-
724  m_next(nullptr),
-
725  m_prev(nullptr)
-
726 {
-
727  if (src.size() && inst) {
-
728  instantiate();
-
729  }
-
730 }
-
731 
- +
696 // get the maximum size a savefile can occupy
+
697 uint32_t Modes::maxSaveSize()
+
698 {
+
699 #if MAX_MODES == 0
+
700  // unbounded
+
701  return 0;
+
702 #else
+
703  ByteStream backupModes;
+
704  saveToBuffer(backupModes);
+
705  for (uint32_t i = 0; i < MAX_MODES; ++i) {
+
706  Mode maxMode;
+
707  for (LedPos p = LED_FIRST; p < LED_COUNT; ++p) {
+
708  // blend takes up 8 params
+
709  PatternArgs maxArgs((uint8_t)p + 2, (uint8_t)p + 3, (uint8_t)p + 4, (uint8_t)p + 5,
+
710  (uint8_t)p + 6, (uint8_t)p + 7, (uint8_t)p + 8, (uint8_t)p + 9);
+
711  Colorset maxSet;
+
712  for (uint32_t i = 0; i < MAX_COLOR_SLOTS; ++i) {
+
713  // different color in each slot
+
714  maxSet.addColor(RGBColor((uint8_t)p + (i * 3), (uint8_t)p + (i * 3) + 1, (uint8_t)p + (i * 3) + 2));
+
715  }
+
716  maxMode.setPattern(PATTERN_BLEND, p, &maxArgs, &maxSet);
+
717  }
+
718  addMode(&maxMode);
+
719  }
+
720  // grab the size of the new buffer
+
721  ByteStream stream;
+
722  saveToBuffer(stream);
+
723  uint32_t size = stream.size();
+
724  // restore backed up modes
+
725  loadFromBuffer(backupModes);
+
726  return size;
+
727 #endif
+
728 }
+
729 #endif
+
730 
+
731 // fetch a link from the chain by index
+
733 {
-
734  if (m_next) {
-
735  delete m_next;
+
734  if (index >= m_numModes) {
+
735  return nullptr;
736  }
-
737  if (m_pInstantiatedMode) {
-
738  delete m_pInstantiatedMode;
-
739  }
-
740 }
-
741 
-
742 bool Modes::ModeLink::init(const Mode *mode)
-
743 {
-
744  if (!mode) {
-
745  return false;
-
746  }
-
747  m_storedMode.clear();
-
748  // serialize the mode so it can be instantiated anytime
-
749  if (!mode->saveToBuffer(m_storedMode)) {
-
750  return false;
-
751  }
-
752  return true;
-
753 }
-
754 
-
755 bool Modes::ModeLink::append(const Mode *next)
-
756 {
-
757  if (!next) {
-
758  return false;
-
759  }
-
760  // if not end of chain, recurse on next link
-
761  if (m_next) {
-
762  return m_next->append(next);
-
763  }
-
764  m_next = new ModeLink(next);
-
765  if (!m_next) {
- -
767  return false;
-
768  }
-
769  m_next->m_prev = this;
-
770  return true;
-
771 }
-
772 
- -
774 {
-
775  if (!next.size()) {
-
776  return false;
-
777  }
-
778  // if not end of chain, recurse on next link
-
779  if (m_next) {
-
780  return m_next->append(next);
-
781  }
-
782  m_next = new ModeLink(next);
-
783  if (!m_next) {
- -
785  return false;
-
786  }
-
787  m_next->m_prev = this;
-
788  return true;
-
789 }
-
790 
- -
792 {
-
793  if (!m_pInstantiatedMode) {
-
794  return;
-
795  }
-
796  m_pInstantiatedMode->play();
-
797 }
-
798 
- -
800 {
-
801  // unlink this node from the chain
-
802  if (m_prev) {
-
803  m_prev->m_next = m_next;
-
804  }
-
805  if (m_next) {
-
806  m_next->m_prev = m_prev;
-
807  }
-
808  // grab the new link that will take this place
-
809  ModeLink *newLink = m_prev ? m_prev : m_next;
-
810  // clear the links of this node
-
811  m_prev = nullptr;
-
812  m_next = nullptr;
-
813  return newLink;
-
814 }
-
815 
- -
817 {
-
818  if (!link) {
-
819  return;
+
737  ModeLink *ptr = m_storedModes;
+
738  while (index > 0 && ptr) {
+
739  ptr = ptr->next();
+
740  index--;
+
741  }
+
742  return ptr;
+
743 }
+
744 
+ +
746 {
+
747  if (!m_numModes) {
+
748  return nullptr;
+
749  }
+
750  // cleanup the current mode link
+
751  if (m_pCurModeLink) {
+ +
753  }
+
754  // update the current mode link based on the curmode index
+ +
756  if (!m_pCurModeLink) {
+
757  return nullptr;
+
758  }
+
759  if (force) {
+ +
761  }
+
762  return m_pCurModeLink->instantiate();
+
763 }
+
764 
+ +
766 {
+
767  if (!m_pCurModeLink) {
+
768  // if there's no loaded mode currently then there's nothing
+
769  // to save so there's no error
+
770  return false;
+
771  }
+
772  // force the current mode to save back to serial to catch changes
+
773  return m_pCurModeLink->save();
+
774 }
+
775 
+
776 Modes::ModeLink::ModeLink(const Mode *src, bool inst) :
+
777  m_pInstantiatedMode(nullptr),
+
778  m_storedMode(),
+
779  m_next(nullptr),
+
780  m_prev(nullptr)
+
781 {
+
782  if (src) {
+
783  init(src);
+
784  }
+
785  if (src && inst) {
+
786  instantiate();
+
787  }
+
788 }
+
789 
+
790 Modes::ModeLink::ModeLink(const ByteStream &src, bool inst) :
+
791  m_pInstantiatedMode(nullptr),
+
792  m_storedMode(src),
+
793  m_next(nullptr),
+
794  m_prev(nullptr)
+
795 {
+
796  if (src.size() && inst) {
+
797  instantiate();
+
798  }
+
799 }
+
800 
+ +
802 {
+
803  if (m_next) {
+
804  delete m_next;
+
805  }
+
806  if (m_pInstantiatedMode) {
+
807  delete m_pInstantiatedMode;
+
808  }
+
809 }
+
810 
+
811 bool Modes::ModeLink::init(const Mode *mode)
+
812 {
+
813  if (!mode) {
+
814  return false;
+
815  }
+
816  m_storedMode.clear();
+
817  // serialize the mode so it can be instantiated anytime
+
818  if (!mode->saveToBuffer(m_storedMode)) {
+
819  return false;
820  }
-
821  if (m_next) {
-
822  m_next->m_prev = link;
-
823  link->m_next = m_next;
-
824  }
-
825  m_next = link;
-
826  link->m_prev = this;
-
827 }
-
828 
- -
830 {
-
831  if (!link) {
-
832  return;
-
833  }
-
834  if (m_prev) {
-
835  m_prev->m_next = link;
-
836  link->m_prev = m_prev;
+
821  return true;
+
822 }
+
823 
+
824 bool Modes::ModeLink::append(const Mode *next)
+
825 {
+
826  if (!next) {
+
827  return false;
+
828  }
+
829  // if not end of chain, recurse on next link
+
830  if (m_next) {
+
831  return m_next->append(next);
+
832  }
+
833  m_next = new ModeLink(next);
+
834  if (!m_next) {
+ +
836  return false;
837  }
-
838  m_prev = link;
-
839  link->m_next = this;
+
838  m_next->m_prev = this;
+
839  return true;
840 }
841 
- +
843 {
-
844  if (m_pInstantiatedMode) {
-
845  return m_pInstantiatedMode;
+
844  if (!next.size()) {
+
845  return false;
846  }
-
847  Mode *newMode = new Mode();
-
848  if (!newMode) {
- -
850  return nullptr;
-
851  }
-
852  m_storedMode.resetUnserializer();
-
853  if (!newMode->loadFromBuffer(m_storedMode)) {
-
854  return nullptr;
+
847  // if not end of chain, recurse on next link
+
848  if (m_next) {
+
849  return m_next->append(next);
+
850  }
+
851  m_next = new ModeLink(next);
+
852  if (!m_next) {
+ +
854  return false;
855  }
-
856  m_pInstantiatedMode = newMode;
-
857  return m_pInstantiatedMode;
+
856  m_next->m_prev = this;
+
857  return true;
858 }
859 
- +
861 {
-
862  if (m_pInstantiatedMode) {
-
863  delete m_pInstantiatedMode;
-
864  m_pInstantiatedMode = nullptr;
-
865  }
+
862  if (!m_pInstantiatedMode) {
+
863  return;
+
864  }
+
865  m_pInstantiatedMode->play();
866 }
867 
- +
869 {
-
870  if (!m_pInstantiatedMode) {
-
871  return false;
-
872  }
-
873  m_storedMode.clear();
-
874  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
-
875 }
-
876 
-
877 #if MODES_TEST == 1
-
878 #include <assert.h>
-
879 #include <stdio.h>
-
880 
-
881 #include "../Patterns/PatternBuilder.h"
-
882 
-
883 void Modes::test()
-
884 {
-
885  INFO_LOG("== Beginning Modes Test ==\n");
-
886 
-
887  RGBColor col = RGB_RED;
-
888  assert(!addMode(PATTERN_COUNT, col));
-
889  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
890  assert(addMode(pat, col));
-
891  }
- -
893  clearModes();
-
894  assert(numModes() == 0);
-
895 
- -
897  assert(!addMode(PATTERN_COUNT, nullptr, &set));
-
898  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
899  assert(addMode(pat, nullptr, &set));
-
900  }
- -
902  clearModes();
-
903  assert(numModes() == 0);
-
904 
-
905  // add a new mode in various different ways
-
906  assert(!addMode(PATTERN_COUNT, col));
- -
908  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
-
909  Mode tmpMode(pat, nullptr, &set2);
-
910  assert(addMode(&tmpMode));
-
911  }
- -
913  clearModes();
-
914  assert(numModes() == 0);
-
915 
-
916  INFO_LOG("addMode(): success\n");
-
917 
-
918  ByteStream modebuf;
-
919  ByteStream modesave;
-
920  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
-
921  Mode tmpMode(PATTERN_BASIC, &args, &set);
-
922  tmpMode.serialize(modebuf);
-
923  tmpMode.saveToBuffer(modesave);
-
924  assert(addSerializedMode(modebuf));
-
925  assert(numModes() == 1);
-
926  assert(addModeFromBuffer(modesave));
-
927  assert(numModes() == 2);
-
928  assert(getModeLink(0) != nullptr);
-
929  Mode *mode1 = getModeLink(0)->instantiate();
-
930  assert(mode1 != nullptr);
-
931  Mode *mode2 = getModeLink(1)->instantiate();
-
932  assert(mode2 != nullptr);
-
933  assert(mode1->equals(mode2));
-
934 
-
935  INFO_LOG("addSerializedMode(): success\n");
+
870  // unlink this node from the chain
+
871  if (m_prev) {
+
872  m_prev->m_next = m_next;
+
873  }
+
874  if (m_next) {
+
875  m_next->m_prev = m_prev;
+
876  }
+
877  // grab the new link that will take this place
+
878  ModeLink *newLink = m_prev ? m_prev : m_next;
+
879  // clear the links of this node
+
880  m_prev = nullptr;
+
881  m_next = nullptr;
+
882  return newLink;
+
883 }
+
884 
+ +
886 {
+
887  if (!link) {
+
888  return;
+
889  }
+
890  if (m_next) {
+
891  m_next->m_prev = link;
+
892  link->m_next = m_next;
+
893  }
+
894  m_next = link;
+
895  link->m_prev = this;
+
896 }
+
897 
+ +
899 {
+
900  if (!link) {
+
901  return;
+
902  }
+
903  if (m_prev) {
+
904  m_prev->m_next = link;
+
905  link->m_prev = m_prev;
+
906  }
+
907  m_prev = link;
+
908  link->m_next = this;
+
909 }
+
910 
+ +
912 {
+
913  if (m_pInstantiatedMode) {
+
914  return m_pInstantiatedMode;
+
915  }
+
916  Mode *newMode = new Mode();
+
917  if (!newMode) {
+ +
919  return nullptr;
+
920  }
+
921  m_storedMode.resetUnserializer();
+
922  if (!newMode->loadFromBuffer(m_storedMode)) {
+
923  return nullptr;
+
924  }
+
925  m_pInstantiatedMode = newMode;
+
926  return m_pInstantiatedMode;
+
927 }
+
928 
+ +
930 {
+
931  if (m_pInstantiatedMode) {
+
932  delete m_pInstantiatedMode;
+
933  m_pInstantiatedMode = nullptr;
+
934  }
+
935 }
936 
- - -
939  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
-
940  assert(setCurMode(1));
-
941  // update the current mode to match the given mode
-
942  assert(updateCurMode(PATTERN_DOPS, &newset));
-
943  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
- - -
946 
-
947  INFO_LOG("updateCurMode(): success\n");
-
948 
-
949  assert(shiftCurMode(-1));
-
950  assert(m_curMode == 0);
-
951  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
952  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
953  assert(shiftCurMode(0));
-
954  assert(m_curMode == 0);
-
955  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
-
956  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
957  assert(shiftCurMode(1));
-
958  assert(m_curMode == 1);
-
959  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
-
960  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
-
961 
-
962  INFO_LOG("shiftCurMode(): success\n");
-
963 
-
964  deleteCurMode();
-
965  assert(m_numModes == 1);
-
966  assert(m_curMode == 0);
-
967  deleteCurMode();
-
968  assert(m_numModes == 0);
-
969  assert(m_curMode == 0);
-
970 
-
971  INFO_LOG("deleteCurMode(): success\n");
-
972 
-
973  INFO_LOG("== Success Running Modes Test ==\n");
-
974 }
-
975 #endif
+ +
938 {
+
939  if (!m_pInstantiatedMode) {
+
940  return false;
+
941  }
+
942  m_storedMode.clear();
+
943  return m_pInstantiatedMode->saveToBuffer(m_storedMode);
+
944 }
+
945 
+
946 #if MODES_TEST == 1
+
947 #include <assert.h>
+
948 #include <stdio.h>
+
949 
+
950 #include "../Patterns/PatternBuilder.h"
+
951 
+
952 void Modes::test()
+
953 {
+
954  INFO_LOG("== Beginning Modes Test ==\n");
+
955 
+
956  RGBColor col = RGB_RED;
+
957  assert(!addMode(PATTERN_COUNT, col));
+
958  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
959  assert(addMode(pat, col));
+
960  }
+ +
962  clearModes();
+
963  assert(numModes() == 0);
+
964 
+ +
966  assert(!addMode(PATTERN_COUNT, nullptr, &set));
+
967  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
968  assert(addMode(pat, nullptr, &set));
+
969  }
+ +
971  clearModes();
+
972  assert(numModes() == 0);
+
973 
+
974  // add a new mode in various different ways
+
975  assert(!addMode(PATTERN_COUNT, col));
+ +
977  for (PatternID pat = PATTERN_FIRST; pat < PATTERN_COUNT; ++pat) {
+
978  Mode tmpMode(pat, nullptr, &set2);
+
979  assert(addMode(&tmpMode));
+
980  }
+ +
982  clearModes();
+
983  assert(numModes() == 0);
+
984 
+
985  INFO_LOG("addMode(): success\n");
+
986 
+
987  ByteStream modebuf;
+
988  ByteStream modesave;
+
989  PatternArgs args = PatternBuilder::getDefaultArgs(PATTERN_BASIC);
+
990  Mode tmpMode(PATTERN_BASIC, &args, &set);
+
991  tmpMode.serialize(modebuf);
+
992  tmpMode.saveToBuffer(modesave);
+
993  assert(addSerializedMode(modebuf));
+
994  assert(numModes() == 1);
+
995  assert(addModeFromBuffer(modesave));
+
996  assert(numModes() == 2);
+
997  assert(getModeLink(0) != nullptr);
+
998  Mode *mode1 = getModeLink(0)->instantiate();
+
999  assert(mode1 != nullptr);
+
1000  Mode *mode2 = getModeLink(1)->instantiate();
+
1001  assert(mode2 != nullptr);
+
1002  assert(mode1->equals(mode2));
+
1003 
+
1004  INFO_LOG("addSerializedMode(): success\n");
+
1005 
+
1006  Colorset newset(RGB_BLUE, RGB_RED, RGB_GREEN);
+ +
1008  assert(getModeLink(0)->mode()->getPatternID() == PATTERN_HYPERSTROBE);
+
1009  assert(setCurMode(1));
+
1010  // update the current mode to match the given mode
+
1011  assert(updateCurMode(PATTERN_DOPS, &newset));
+
1012  assert(getModeLink(1)->mode()->getPatternID() == PATTERN_DOPS);
+ + +
1015 
+
1016  INFO_LOG("updateCurMode(): success\n");
+
1017 
+
1018  assert(shiftCurMode(-1));
+
1019  assert(m_curMode == 0);
+
1020  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1021  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1022  assert(shiftCurMode(0));
+
1023  assert(m_curMode == 0);
+
1024  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1025  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1026  assert(shiftCurMode(1));
+
1027  assert(m_curMode == 1);
+
1028  assert(getModeLink(0)->instantiate()->getPatternID() == PATTERN_HYPERSTROBE);
+
1029  assert(getModeLink(1)->instantiate()->getPatternID() == PATTERN_DOPS);
+
1030 
+
1031  INFO_LOG("shiftCurMode(): success\n");
+
1032 
+
1033  deleteCurMode();
+
1034  assert(m_numModes == 1);
+
1035  assert(m_curMode == 0);
+
1036  deleteCurMode();
+
1037  assert(m_numModes == 0);
+
1038  assert(m_curMode == 0);
+
1039 
+
1040  INFO_LOG("deleteCurMode(): success\n");
+
1041 
+
1042  INFO_LOG("== Success Running Modes Test ==\n");
+
1043 }
+
1044 #endif
Button * g_pButton
Definition: Buttons.cpp:16
Button * g_pButton2
Definition: Buttons.cpp:17
#define RGB_ORANGE
@@ -1072,8 +1141,8 @@
#define RGB_WHITE
#define RGB_YELLOW
#define assert(condition)
Definition: Compression.cpp:68
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:68
@@ -1097,8 +1166,8 @@
@ PATTERN_FIRST
Definition: Patterns.h:18
@ PATTERN_LAST
Definition: Patterns.h:100
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
-
#define MAX_MODES
Definition: VortexConfig.h:168
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define MAX_MODES
Definition: VortexConfig.h:167
bool onShortClick() const
Definition: Button.h:34
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
@@ -1122,67 +1191,69 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
- - - - - - - - - - - - - - - -
static ModeLink * m_storedModes
Definition: Modes.h:220
+ + + + + + + + + + + + + + + +
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:527
-
static bool saveStorage()
Definition: Modes.cpp:170
-
static bool saveCurMode()
Definition: Modes.cpp:696
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:663
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:418
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:291
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:589
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:311
-
static uint8_t startupMode()
Definition: Modes.cpp:570
-
static void resetFlags()
Definition: Modes.cpp:594
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:368
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:438
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:517
-
static bool setDefaults()
Definition: Modes.cpp:256
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:110
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:329
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:676
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:562
+
static void deleteCurMode()
Definition: Modes.cpp:596
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:101
+
static bool saveStorage()
Definition: Modes.cpp:209
+
static bool saveCurMode()
Definition: Modes.cpp:765
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:732
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:487
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:360
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:658
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:380
+
static uint8_t startupMode()
Definition: Modes.cpp:639
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:82
+
static void resetFlags()
Definition: Modes.cpp:663
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:437
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:507
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:586
+
static bool setDefaults()
Definition: Modes.cpp:325
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:148
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:398
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:745
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:631
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:83
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:130
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
-
static void clearModes()
Definition: Modes.cpp:548
-
static Mode * nextMode()
Definition: Modes.cpp:495
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
+
static void clearModes()
Definition: Modes.cpp:617
+
static Mode * nextMode()
Definition: Modes.cpp:564
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:153
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:226
-
static uint8_t m_curMode
Definition: Modes.h:211
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:576
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:190
-
static Mode * previousMode()
Definition: Modes.cpp:505
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:172
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:295
+
static uint8_t m_curMode
Definition: Modes.h:214
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:645
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:259
+
static Mode * previousMode()
Definition: Modes.cpp:574
static PatternArgs getDefaultArgs(PatternID id)
uint8_t blue
Definition: ColorTypes.h:90
uint8_t red
Definition: ColorTypes.h:88
uint8_t green
Definition: ColorTypes.h:89
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool serializeVersion(ByteStream &stream)
static bool checkVersion(uint8_t major, uint8_t minor)
diff --git a/docs/orbit/Modes_8h_source.html b/docs/orbit/Modes_8h_source.html index f2ad303c17..4fd86a428c 100644 --- a/docs/orbit/Modes_8h_source.html +++ b/docs/orbit/Modes_8h_source.html @@ -241,81 +241,84 @@
152 #endif
153 
154 private:
-
155  // linked list of internal mode storage
-
156  class ModeLink {
-
157  public:
-
158  // construct a link and optionally instantiate the link
-
159  ModeLink(const Mode *src = nullptr, bool inst = false);
-
160  ModeLink(const ByteStream &src, bool inst = false);
-
161  ~ModeLink();
-
162 
-
163  // init the link and append another link
-
164  bool init(const Mode *mode = nullptr);
-
165  bool append(const Mode *next);
-
166  bool append(const ByteStream &next);
-
167 
-
168  // play the instantiated mode inside
-
169  void play();
+
155  static bool serializeSaveHeader(ByteStream &saveBuffer);
+
156  static bool unserializeSaveHeader(ByteStream &saveBuffer);
+
157 
+
158  // linked list of internal mode storage
+
159  class ModeLink {
+
160  public:
+
161  // construct a link and optionally instantiate the link
+
162  ModeLink(const Mode *src = nullptr, bool inst = false);
+
163  ModeLink(const ByteStream &src, bool inst = false);
+
164  ~ModeLink();
+
165 
+
166  // init the link and append another link
+
167  bool init(const Mode *mode = nullptr);
+
168  bool append(const Mode *next);
+
169  bool append(const ByteStream &next);
170 
-
171  // unlink self from the chain, returns link that takes position
-
172  ModeLink *unlinkSelf();
+
171  // play the instantiated mode inside
+
172  void play();
173 
-
174  // link in a node before or after self
-
175  void linkAfter(ModeLink *link);
-
176  void linkBefore(ModeLink *link);
-
177 
-
178  // instantiate/destroy the mode
-
179  Mode *instantiate();
-
180  void uninstantiate();
-
181 
-
182  // if the mode is instantiated and the instantiated version
-
183  // has changed at all then save will re-save it to the buffer
-
184  bool save();
-
185 
-
186  // accessors
- - -
189  ModeLink *next() { return m_next; }
-
190  ModeLink *prev() { return m_prev; }
-
191 
-
192  operator ByteStream &() { return m_storedMode; }
-
193  operator ByteStream() { return m_storedMode; }
-
194  operator Mode *() { return m_pInstantiatedMode; }
-
195  private:
- - - - -
200  };
-
201 
-
202  // fetch a link from the chain by index
-
203  static ModeLink *getModeLink(uint32_t index);
+
174  // unlink self from the chain, returns link that takes position
+
175  ModeLink *unlinkSelf();
+
176 
+
177  // link in a node before or after self
+
178  void linkAfter(ModeLink *link);
+
179  void linkBefore(ModeLink *link);
+
180 
+
181  // instantiate/destroy the mode
+
182  Mode *instantiate();
+
183  void uninstantiate();
+
184 
+
185  // if the mode is instantiated and the instantiated version
+
186  // has changed at all then save will re-save it to the buffer
+
187  bool save();
+
188 
+
189  // accessors
+ + +
192  ModeLink *next() { return m_next; }
+
193  ModeLink *prev() { return m_prev; }
+
194 
+
195  operator ByteStream &() { return m_storedMode; }
+
196  operator ByteStream() { return m_storedMode; }
+
197  operator Mode *() { return m_pInstantiatedMode; }
+
198  private:
+ + + + +
203  };
204 
-
205  // initialize current mode from ByteStream, optionally force re-init which
-
206  // will destroy the current instantiated mode and re-load it from serial
-
207  static Mode *initCurMode(bool force = false);
-
208  static bool saveCurMode();
-
209 
-
210  // the current mode we're on
-
211  static uint8_t m_curMode;
+
205  // fetch a link from the chain by index
+
206  static ModeLink *getModeLink(uint32_t index);
+
207 
+
208  // initialize current mode from ByteStream, optionally force re-init which
+
209  // will destroy the current instantiated mode and re-load it from serial
+
210  static Mode *initCurMode(bool force = false);
+
211  static bool saveCurMode();
212 
-
213  // the number of modes loaded
-
214  static uint8_t m_numModes;
+
213  // the current mode we're on
+
214  static uint8_t m_curMode;
215 
-
216  // the current instantiated mode and it's respective link
- +
216  // the number of modes loaded
+
217  static uint8_t m_numModes;
218 
-
219  // list of serialized version of bufers
- +
219  // the current instantiated mode and it's respective link
+
221 
-
222  // global flags for all modes
-
223  static uint8_t m_globalFlags;
+
222  // list of serialized version of bufers
+
224 
-
225  // the last switch time of the modes
-
226  static uint32_t m_lastSwitchTime;
-
227 };
-
228 
-
229 #endif
+
225  // global flags for all modes
+
226  static uint8_t m_globalFlags;
+
227 
+
228  // the last switch time of the modes
+
229  static uint32_t m_lastSwitchTime;
+
230 };
+
231 
+
232 #endif
#define RGB_OFF
#define MODES_FLAG_LOCKED
Definition: Modes.h:18
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
@@ -325,75 +328,77 @@
Definition: Mode.h:38
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
Definition: Modes.h:29
-
static ModeLink * m_storedModes
Definition: Modes.h:220
+
static ModeLink * m_storedModes
Definition: Modes.h:223
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static void deleteCurMode()
Definition: Modes.cpp:527
-
static bool saveStorage()
Definition: Modes.cpp:170
+
static void deleteCurMode()
Definition: Modes.cpp:596
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:101
+
static bool saveStorage()
Definition: Modes.cpp:209
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static bool saveCurMode()
Definition: Modes.cpp:696
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:663
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:418
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:291
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:589
-
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:311
-
static uint8_t startupMode()
Definition: Modes.cpp:570
+
static bool saveCurMode()
Definition: Modes.cpp:765
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:732
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:487
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:360
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:658
+
static bool addModeFromBuffer(ByteStream &serializedMode)
Definition: Modes.cpp:380
+
static uint8_t startupMode()
Definition: Modes.cpp:639
static bool setOneClickMode(bool enable, bool save=true)
Definition: Modes.h:115
-
static void resetFlags()
Definition: Modes.cpp:594
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:368
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:82
+
static void resetFlags()
Definition: Modes.cpp:663
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:437
static bool keychainModeEnabled()
Definition: Modes.h:139
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:438
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:507
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:517
-
static bool setDefaults()
Definition: Modes.cpp:256
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:586
+
static bool setDefaults()
Definition: Modes.cpp:325
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:110
-
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:329
-
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:676
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:562
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:148
+
static bool shiftCurMode(int32_t offset=1)
Definition: Modes.cpp:398
+
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:745
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:631
static bool init()
Definition: Modes.cpp:30
-
static uint8_t m_globalFlags
Definition: Modes.h:223
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:83
+
static uint8_t m_globalFlags
Definition: Modes.h:226
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:130
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:548
+
static void clearModes()
Definition: Modes.cpp:617
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static Mode * nextMode()
Definition: Modes.cpp:495
+
static Mode * nextMode()
Definition: Modes.cpp:564
static bool setAdvancedMenus(bool active, bool save=true)
Definition: Modes.h:129
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
static uint8_t numModes()
Definition: Modes.h:92
-
static uint8_t m_numModes
Definition: Modes.h:214
-
static bool loadStorage()
Definition: Modes.cpp:153
+
static uint8_t m_numModes
Definition: Modes.h:217
+
static bool loadStorage()
Definition: Modes.cpp:172
static bool advancedMenusEnabled()
Definition: Modes.h:132
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:226
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:295
+
static uint8_t m_curMode
Definition: Modes.h:214
static bool setKeychainMode(bool active, bool save=true)
Definition: Modes.h:136
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:576
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:190
-
static Mode * previousMode()
Definition: Modes.cpp:505
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:645
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:259
+
static Mode * previousMode()
Definition: Modes.cpp:574
diff --git a/docs/orbit/PatternBuilder_8cpp_source.html b/docs/orbit/PatternBuilder_8cpp_source.html index 5ba8210c8d..8fe0e76270 100644 --- a/docs/orbit/PatternBuilder_8cpp_source.html +++ b/docs/orbit/PatternBuilder_8cpp_source.html @@ -242,12 +242,12 @@
153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/orbit/PatternSelect_8cpp__incl.md5 b/docs/orbit/PatternSelect_8cpp__incl.md5 index 6423972a55..5e069aca98 100644 --- a/docs/orbit/PatternSelect_8cpp__incl.md5 +++ b/docs/orbit/PatternSelect_8cpp__incl.md5 @@ -1 +1 @@ -95b8b0693342adcbec7c3f63016e8bd3 \ No newline at end of file +5fca191fe9703ef4d7e0166b381e2196 \ No newline at end of file diff --git a/docs/orbit/PatternSelect_8cpp__incl.svg b/docs/orbit/PatternSelect_8cpp__incl.svg index 6c7d0df5df..1fb6cb1e73 100644 --- a/docs/orbit/PatternSelect_8cpp__incl.svg +++ b/docs/orbit/PatternSelect_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -68,592 +68,586 @@ var sectionId = 'dynsection-0'; Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - + Node1->Node10 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node14 - - + + Node16 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node16 - - + + Node17 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node17 - - + + Node18 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node18 - - + + Node19 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node19 - - + + Node21 - -../Log/Log.h + +../Log/Log.h - + Node1->Node21 - - + + Node23 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node23 - - + + Node24 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node24 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node8 - - + + - + Node14->Node11 - - + + - + Node14->Node12 - - + + Node15 - -PatternArgs.h + +PatternArgs.h - + Node14->Node15 - - + + - + Node15->Node4 - - + + - + Node16->Node4 - - + + - + Node16->Node6 - - + + - + Node16->Node8 - - + + - + Node17->Node6 - - + + - + Node17->Node16 - - + + - + Node18->Node4 - - + + - + Node19->Node4 - - + + - + Node19->Node5 - - + + - + Node19->Node6 - - + + - + Node19->Node11 - - + + Node20 - -../Serial/ByteStream.h + +../Serial/ByteStream.h - + Node19->Node20 - - + + - + Node19->Node23 - - + + - + Node20->Node4 - - + + - + Node20->Node21 - - + + - + Node21->Node6 - - + + - + Node21->Node9 - - + + Node22 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node21->Node22 - - + + - + Node22->Node4 - - + + - + Node22->Node6 - - + + - + Node23->Node4 - - + + - + Node23->Node5 - - + + - + Node23->Node8 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node8 - - + + - + Node24->Node10 - - + + diff --git a/docs/orbit/PatternSelect_8cpp__incl_org.svg b/docs/orbit/PatternSelect_8cpp__incl_org.svg index 79baf21439..504c6ceb10 100644 --- a/docs/orbit/PatternSelect_8cpp__incl_org.svg +++ b/docs/orbit/PatternSelect_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.cpp Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp @@ -22,592 +22,586 @@ Node2 - -PatternSelect.h + +PatternSelect.h Node1->Node2 - - + + Node10 - -../Modes/Mode.h + +../Modes/Mode.h - + Node1->Node10 - - + + Node13 - -../../Patterns/PatternBuilder.h + +../../Patterns/PatternBuilder.h - + Node1->Node13 - - + + Node14 - -../../Patterns/Pattern.h + +../../Patterns/Pattern.h - + Node1->Node14 - - + + Node16 - -../../Time/TimeControl.h + +../../Time/TimeControl.h - + Node1->Node16 - - + + Node17 - -../../Time/Timings.h + +../../Time/Timings.h - + Node1->Node17 - - + + Node18 - -../../Buttons/Button.h + +../../Buttons/Button.h - + Node1->Node18 - - + + Node19 - -../../Modes/Modes.h + +../../Modes/Modes.h - + Node1->Node19 - - + + Node21 - -../Log/Log.h + +../Log/Log.h - + Node1->Node21 - - + + Node23 - -../Leds/Leds.h + +../Leds/Leds.h - + Node1->Node23 - - + + Node24 - -../../Menus/Menus.h + +../../Menus/Menus.h - + Node1->Node24 - - + + Node3 - -../Menu.h + +../Menu.h Node2->Node3 - - + + - -Node2->Node10 - - - - - -Node11 - - -../Patterns/Patterns.h - - - - -Node2->Node11 - - +Node2->Node10 + + Node12 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node2->Node12 - - + + Node4 - -inttypes.h + +inttypes.h Node3->Node4 - - + + Node5 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node3->Node5 - - + + Node8 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node3->Node8 - - + + Node3->Node10 - - + + Node5->Node4 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node5->Node6 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node5->Node7 - - + + Node6->Node7 - - + + Node8->Node4 - - + + Node8->Node6 - - + + Node9 - -stdarg.h + +stdarg.h Node8->Node9 - - + + Node10->Node6 - - + + Node10->Node8 - - + + + + + +Node11 + + +../Patterns/Patterns.h + + Node10->Node11 - - + + Node11->Node4 - - + + Node12->Node5 - - + + Node12->Node6 - - + + - + Node13->Node11 - - + + - + Node14->Node8 - - + + - + Node14->Node11 - - + + - + Node14->Node12 - - + + Node15 - -PatternArgs.h + +PatternArgs.h - + Node14->Node15 - - + + - + Node15->Node4 - - + + - + Node16->Node4 - - + + - + Node16->Node6 - - + + - + Node16->Node8 - - + + - + Node17->Node6 - - + + - + Node17->Node16 - - + + - + Node18->Node4 - - + + - + Node19->Node4 - - + + - + Node19->Node5 - - + + - + Node19->Node6 - - + + - + Node19->Node11 - - + + Node20 - -../Serial/ByteStream.h + +../Serial/ByteStream.h - + Node19->Node20 - - + + - + Node19->Node23 - - + + - + Node20->Node4 - - + + - + Node20->Node21 - - + + - + Node21->Node6 - - + + - + Node21->Node9 - - + + Node22 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h - + Node21->Node22 - - + + - + Node22->Node4 - - + + - + Node22->Node6 - - + + - + Node23->Node4 - - + + - + Node23->Node5 - - + + - + Node23->Node8 - - + + - + Node24->Node4 - - + + - + Node24->Node5 - - + + - + Node24->Node8 - - + + - + Node24->Node10 - - + + diff --git a/docs/orbit/PatternSelect_8cpp_source.html b/docs/orbit/PatternSelect_8cpp_source.html index f8c2f13998..e9a7599114 100644 --- a/docs/orbit/PatternSelect_8cpp_source.html +++ b/docs/orbit/PatternSelect_8cpp_source.html @@ -355,13 +355,13 @@
bool isMultiLed() const
Definition: Mode.cpp:764
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
- - + +
void onShortClick2() override
void previousPattern()
- +
void showPatternSelection()
void onLongClick() override
@@ -371,9 +371,9 @@
MenuAction run() override
void onLongClick2() override
void onShortClick() override
-
PatternSelectState m_state
Definition: PatternSelect.h:44
+
PatternSelectState m_state
Definition: PatternSelect.h:43
void showListSelection()
-
PatternID m_newPatternID
Definition: PatternSelect.h:47
+
PatternID m_newPatternID
Definition: PatternSelect.h:46
static uint32_t getCurtime()
Definition: TimeControl.h:40
diff --git a/docs/orbit/PatternSelect_8h.html b/docs/orbit/PatternSelect_8h.html index 20e8ab0c21..bba6bd518a 100644 --- a/docs/orbit/PatternSelect_8h.html +++ b/docs/orbit/PatternSelect_8h.html @@ -91,12 +91,11 @@
Include dependency graph for PatternSelect.h:
-
+
diff --git a/docs/orbit/PatternSelect_8h__incl.md5 b/docs/orbit/PatternSelect_8h__incl.md5 index 785c554411..0a715a9133 100644 --- a/docs/orbit/PatternSelect_8h__incl.md5 +++ b/docs/orbit/PatternSelect_8h__incl.md5 @@ -1 +1 @@ -b134790e4ecb9b5af9f544529d10b884 \ No newline at end of file +e80755631e50a604a644cc59be4f4b24 \ No newline at end of file diff --git a/docs/orbit/PatternSelect_8h__incl.svg b/docs/orbit/PatternSelect_8h__incl.svg index d1c16b1a1c..c492a03cdc 100644 --- a/docs/orbit/PatternSelect_8h__incl.svg +++ b/docs/orbit/PatternSelect_8h__incl.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Menus/MenuList/PatternSelect.h Node1 - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + +VortexEngine/src/Menus +/MenuList/PatternSelect.h @@ -22,217 +22,211 @@ Node2 - -../Menu.h + +../Menu.h Node1->Node2 - - + + Node9 - -../Modes/Mode.h + +../Modes/Mode.h - -Node1->Node9 - - - - - -Node10 - - -../Patterns/Patterns.h - - - - -Node1->Node10 - - +Node1->Node9 + + Node11 - -../../Colors/Colorset.h + +../../Colors/Colorset.h Node1->Node11 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node4 - -../Colors/ColorTypes.h + +../Colors/ColorTypes.h Node2->Node4 - - + + Node7 - -../Leds/LedTypes.h + +../Leds/LedTypes.h Node2->Node7 - - + + Node2->Node9 - - + + Node4->Node3 - - + + Node5 - -../VortexConfig.h + +../VortexConfig.h Node4->Node5 - - + + Node6 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node4->Node6 - - + + Node5->Node6 - - + + Node7->Node3 - - + + Node7->Node5 - - + + Node8 - -stdarg.h + +stdarg.h Node7->Node8 - - + + Node9->Node5 - - + + Node9->Node7 - - + + + + + +Node10 + + +../Patterns/Patterns.h + + Node9->Node10 - - + + Node10->Node3 - - + + Node11->Node4 - - + + Node11->Node5 - - + + diff --git a/docs/orbit/PatternSelect_8h_source.html b/docs/orbit/PatternSelect_8h_source.html index 2ff5b848e1..f52febf709 100644 --- a/docs/orbit/PatternSelect_8h_source.html +++ b/docs/orbit/PatternSelect_8h_source.html @@ -93,69 +93,68 @@
4 #include "../Menu.h"
5 
6 #include "../../Colors/Colorset.h"
-
7 #include "../../Patterns/Patterns.h"
-
8 #include "../../Modes/Mode.h"
-
9 
-
10 class PatternSelect : public Menu
-
11 {
-
12 public:
-
13  PatternSelect(const RGBColor &col, bool advanced);
- -
15 
-
16  bool init() override;
-
17  MenuAction run() override;
-
18 
-
19  // callback after the user selects the target led
-
20  void onLedSelected() override;
-
21 
-
22  // handlers for clicks
-
23  void onShortClick() override;
-
24  void onShortClick2() override;
-
25  void onLongClick() override;
-
26  void onLongClick2() override;
-
27 
-
28 private:
-
29  void showListSelection();
-
30  void showPatternSelection();
-
31  void nextPattern();
-
32  void previousPattern();
-
33 
-
34  // private enumeration for internal state of pattern selection
-
35  enum PatternSelectState : uint32_t
-
36  {
-
37  // currently picking the list of patterns
- -
39  // currently picking a pattern in the list
- -
41  };
-
42 
-
43  // the current state of the pattern selection menu
- -
45 
-
46  // the patternid of the current demo
- -
48 
-
49  // the preview mode itself
- -
51 
-
52  // the pat select starts by showing the current pattern
-
53  // then the first click begin cycling the list of pats
-
54  bool m_started;
-
55 };
-
56 
-
57 #endif
+
7 #include "../../Modes/Mode.h"
+
8 
+
9 class PatternSelect : public Menu
+
10 {
+
11 public:
+
12  PatternSelect(const RGBColor &col, bool advanced);
+ +
14 
+
15  bool init() override;
+
16  MenuAction run() override;
+
17 
+
18  // callback after the user selects the target led
+
19  void onLedSelected() override;
+
20 
+
21  // handlers for clicks
+
22  void onShortClick() override;
+
23  void onShortClick2() override;
+
24  void onLongClick() override;
+
25  void onLongClick2() override;
+
26 
+
27 private:
+
28  void showListSelection();
+
29  void showPatternSelection();
+
30  void nextPattern();
+
31  void previousPattern();
+
32 
+
33  // private enumeration for internal state of pattern selection
+
34  enum PatternSelectState : uint32_t
+
35  {
+
36  // currently picking the list of patterns
+ +
38  // currently picking a pattern in the list
+ +
40  };
+
41 
+
42  // the current state of the pattern selection menu
+ +
44 
+
45  // the patternid of the current demo
+ +
47 
+
48  // the preview mode itself
+ +
50 
+
51  // the pat select starts by showing the current pattern
+
52  // then the first click begin cycling the list of pats
+
53  bool m_started;
+
54 };
+
55 
+
56 #endif
PatternID
Definition: Patterns.h:12
Definition: Menu.h:11
MenuAction
Definition: Menu.h:19
Definition: Mode.h:38
- + - - - + + +
void onShortClick2() override
void previousPattern()
- +
void showPatternSelection()
void onLongClick() override
@@ -163,12 +162,12 @@
bool init() override
PatternSelect(const RGBColor &col, bool advanced)
MenuAction run() override
- +
void onLongClick2() override
void onShortClick() override
-
PatternSelectState m_state
Definition: PatternSelect.h:44
+
PatternSelectState m_state
Definition: PatternSelect.h:43
void showListSelection()
-
PatternID m_newPatternID
Definition: PatternSelect.h:47
+
PatternID m_newPatternID
Definition: PatternSelect.h:46
diff --git a/docs/orbit/Patterns_8h__dep__incl.md5 b/docs/orbit/Patterns_8h__dep__incl.md5 index c2c90afb98..f30b2bfff5 100644 --- a/docs/orbit/Patterns_8h__dep__incl.md5 +++ b/docs/orbit/Patterns_8h__dep__incl.md5 @@ -1 +1 @@ -545f5fd606f3282cd24c9cb4e62f8840 \ No newline at end of file +e1a74af72fc3744eedc8bbaffc733090 \ No newline at end of file diff --git a/docs/orbit/Patterns_8h__dep__incl.svg b/docs/orbit/Patterns_8h__dep__incl.svg index d0fb7f1795..5274ee68ee 100644 --- a/docs/orbit/Patterns_8h__dep__incl.svg +++ b/docs/orbit/Patterns_8h__dep__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,1154 +58,1148 @@ var sectionId = 'dynsection-1'; Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node3 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - +Node6->Node13 + + - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node14 - - + + +Node6->Node18 + + - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - - -Node9->Node15 - - + + +Node6->Node19 + + Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp - + -Node9->Node20 - - +Node6->Node20 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + + + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + - + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + + + + +Node14->Node11 + + - + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + - + + +Node23->Node11 + + + + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - - -Node39->Node3 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/orbit/Patterns_8h__dep__incl_org.svg b/docs/orbit/Patterns_8h__dep__incl_org.svg index 5a6b56ea64..144c8d8c4f 100644 --- a/docs/orbit/Patterns_8h__dep__incl_org.svg +++ b/docs/orbit/Patterns_8h__dep__incl_org.svg @@ -4,1162 +4,1156 @@ - + VortexEngine/src/Patterns/Patterns.h Node1 - -VortexEngine/src/Patterns -/Patterns.h + +VortexEngine/src/Patterns +/Patterns.h Node2 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.h + + +VortexEngine/src/Modes +/DefaultModes.h Node1->Node2 - - + + - - -Node5 - - -VortexEngine/src/Modes -/DefaultModes.h - - - - - -Node1->Node5 - - - - - -Node9 - - -VortexEngine/src/Modes -/Mode.h + + +Node6 + + +VortexEngine/src/Modes +/Mode.h - - -Node1->Node9 - - + + +Node1->Node6 + + Node30 - -VortexEngine/src/Modes -/Modes.h + +VortexEngine/src/Modes +/Modes.h - + Node1->Node30 - - + + Node32 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.h + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.h - + Node1->Node32 - - + + Node39 - -VortexEngine/src/Patterns -/Pattern.h + +VortexEngine/src/Patterns +/Pattern.h - + Node1->Node39 - - + + Node93 - -VortexEngine/src/Patterns -/PatternBuilder.h + +VortexEngine/src/Patterns +/PatternBuilder.h - + Node1->Node93 - - + + Node3 - - -VortexEngine/src/Menus -/MenuList/PatternSelect.cpp + + +VortexEngine/src/Menus +/MenuList/FactoryReset.cpp Node2->Node3 - - + + Node4 - - -VortexEngine/src/Menus -/Menus.cpp + + +VortexEngine/src/Modes +/DefaultModes.cpp Node2->Node4 - - + + - - -Node6 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.cpp + + +Node5 + + +VortexEngine/src/Modes +/Modes.cpp - - -Node5->Node6 - - + + +Node2->Node5 + + + + + +Node6->Node3 + + + + + +Node6->Node5 + + Node7 - - -VortexEngine/src/Modes -/DefaultModes.cpp + + +VortexEngine/src/Menus +/Menu.cpp - + -Node5->Node7 - - +Node6->Node7 + + Node8 - - -VortexEngine/src/Modes -/Modes.cpp + + +VortexEngine/src/Menus +/Menu.h - + -Node5->Node8 - - - - - -Node9->Node2 - - - - - -Node9->Node3 - - - - - -Node9->Node6 - - - - - -Node9->Node8 - - +Node6->Node8 + + Node10 - - -VortexEngine/src/Menus -/Menu.cpp + + +VortexEngine/src/Menus +/MenuList/ColorSelect.cpp - - -Node9->Node10 - - + + +Node6->Node10 + + - - -Node11 - - -VortexEngine/src/Menus -/Menu.h + + +Node12 + + +VortexEngine/src/Menus +/MenuList/EditorConnection.h - - -Node9->Node11 - - + + +Node6->Node12 + + Node13 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.cpp + + +VortexEngine/src/Menus +/MenuList/EditorConnection.cpp - + -Node9->Node13 - - +Node6->Node13 + + - - -Node14 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.h + + +Node18 + + +VortexEngine/src/Menus +/MenuList/ModeSharing.cpp - - -Node9->Node14 - - + + +Node6->Node18 + + - - -Node15 - - -VortexEngine/src/Menus -/MenuList/EditorConnection.cpp + + +Node19 + + +VortexEngine/src/Menus +/MenuList/PatternSelect.h - - -Node9->Node15 - - + + +Node6->Node19 + + Node20 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.cpp + + +VortexEngine/src/Menus +/MenuList/PatternSelect.cpp - + -Node9->Node20 - - +Node6->Node20 + + Node21 - -VortexEngine/src/Menus -/MenuList/Randomizer.h + +VortexEngine/src/Menus +/MenuList/Randomizer.h - - -Node9->Node21 - - + + +Node6->Node21 + + Node22 - -VortexEngine/src/Menus -/MenuList/Randomizer.cpp + +VortexEngine/src/Menus +/MenuList/Randomizer.cpp - - -Node9->Node22 - - + + +Node6->Node22 + + Node23 - -VortexEngine/src/Menus -/Menus.h + +VortexEngine/src/Menus +/Menus.h - - -Node9->Node23 - - + + +Node6->Node23 + + Node24 - -VortexEngine/src/VortexEngine.cpp + +VortexEngine/src/VortexEngine.cpp - - -Node9->Node24 - - + + +Node6->Node24 + + Node25 - -VortexEngine/src/Modes -/Mode.cpp + +VortexEngine/src/Modes +/Mode.cpp - - -Node9->Node25 - - + + +Node6->Node25 + + Node26 - -VortexEngine/src/Wireless -/IRReceiver.cpp + +VortexEngine/src/Wireless +/IRReceiver.cpp - - -Node9->Node26 - - + + +Node6->Node26 + + Node27 - -VortexEngine/src/Wireless -/IRSender.cpp + +VortexEngine/src/Wireless +/IRSender.cpp - - -Node9->Node27 - - + + +Node6->Node27 + + Node28 - -VortexEngine/src/Wireless -/VLReceiver.cpp + +VortexEngine/src/Wireless +/VLReceiver.cpp - - -Node9->Node28 - - + + +Node6->Node28 + + Node29 - -VortexEngine/src/Wireless -/VLSender.cpp + +VortexEngine/src/Wireless +/VLSender.cpp - - -Node9->Node29 - - - - - -Node11->Node2 - - + + +Node6->Node29 + + - - -Node11->Node10 - - + + +Node8->Node7 + + - - -Node12 - - -VortexEngine/src/Menus -/MenuList/ColorSelect.h + + +Node9 + + +VortexEngine/src/Menus +/MenuList/ColorSelect.h - + + +Node8->Node9 + + + + -Node11->Node12 - - +Node8->Node12 + + + + + +Node14 + + +VortexEngine/src/Menus +/MenuList/FactoryReset.h + + - + -Node11->Node14 - - +Node8->Node14 + + - - -Node16 - - -VortexEngine/src/Menus -/MenuList/FactoryReset.h + + +Node15 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.h - + -Node11->Node16 - - +Node8->Node15 + + Node17 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.h + + +VortexEngine/src/Menus +/MenuList/ModeSharing.h - + -Node11->Node17 - - +Node8->Node17 + + - - -Node19 - - -VortexEngine/src/Menus -/MenuList/ModeSharing.h - + + +Node8->Node19 + + + + +Node8->Node21 + + - - -Node11->Node19 - - + + +Node9->Node10 + + - - -Node11->Node21 - - + + +Node11 + + +VortexEngine/src/Menus +/Menus.cpp + - + + + +Node9->Node11 + + + + -Node12->Node4 - - +Node12->Node11 + + Node12->Node13 - - - - - -Node14->Node4 - - + + - + -Node14->Node15 - - +Node14->Node3 + + + + + +Node14->Node11 + + - + -Node16->Node4 - - +Node15->Node11 + + - - -Node16->Node6 - - + + +Node16 + + +VortexEngine/src/Menus +/MenuList/GlobalBrightness.cpp + - - -Node17->Node4 - - - - -Node18 - - -VortexEngine/src/Menus -/MenuList/GlobalBrightness.cpp - + + +Node15->Node16 + + + + +Node17->Node11 + + Node17->Node18 - - + + - + -Node19->Node4 - - +Node19->Node11 + + Node19->Node20 - - + + - - -Node21->Node4 - - + + +Node21->Node11 + + - + Node21->Node22 - - - - - -Node23->Node3 - - + + - - -Node23->Node4 - - + + +Node23->Node7 + + Node23->Node10 - - + + - + + +Node23->Node11 + + + + -Node23->Node13 - - +Node23->Node16 + + - + -Node23->Node18 - - +Node23->Node20 + + - + Node23->Node22 - - + + - + Node23->Node24 - - + + - + Node30->Node3 - - + + - + -Node30->Node4 - - - - - -Node30->Node6 - - +Node30->Node5 + + - - -Node30->Node8 - - + + +Node30->Node7 + + Node30->Node10 - - + + + + + +Node30->Node11 + + Node30->Node13 - - + + - - -Node30->Node15 - - + + +Node30->Node16 + + Node30->Node18 - - + + Node30->Node20 - - + + - + Node30->Node22 - - + + - + Node30->Node24 - - + + Node31 - -VortexEngine/src/Leds -/Leds.cpp + +VortexEngine/src/Leds +/Leds.cpp - + Node30->Node31 - - + + Node33 - -VortexEngine/src/Patterns -/Multi/Sequencer/Sequence.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/Sequence.cpp - + Node32->Node33 - - + + Node34 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.h - + Node32->Node34 - - + + Node37 - -VortexEngine/src/Patterns -/PatternBuilder.cpp + +VortexEngine/src/Patterns +/PatternBuilder.cpp - + Node32->Node37 - - + + Node35 - -VortexEngine/src/Patterns -/Multi/Sequencer/ChaserPattern.h + +VortexEngine/src/Patterns +/Multi/Sequencer/ChaserPattern.h - + Node34->Node35 - - + + - + Node34->Node37 - - + + Node38 - -VortexEngine/src/Patterns -/Multi/Sequencer/SequencedPattern.cpp + +VortexEngine/src/Patterns +/Multi/Sequencer/SequencedPattern.cpp - + Node34->Node38 - - + + - + Node35->Node37 - - + + - - -Node39->Node3 - - + + +Node39->Node5 + + - - -Node39->Node8 - - + + +Node39->Node20 + + - + Node39->Node22 - - + + - + Node39->Node25 - - + + Node40 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.h + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.h - + Node39->Node40 - - + + Node84 - -VortexEngine/src/Patterns -/Pattern.cpp + +VortexEngine/src/Patterns +/Pattern.cpp - + Node39->Node84 - - + + Node85 - -VortexEngine/src/Patterns -/Single/SingleLedPattern.h + +VortexEngine/src/Patterns +/Single/SingleLedPattern.h - + Node39->Node85 - - + + - + Node40->Node25 - - + + Node41 - -VortexEngine/src/Patterns -/Multi/BlinkStepPattern.h + +VortexEngine/src/Patterns +/Multi/BlinkStepPattern.h - + Node40->Node41 - - + + Node69 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.h + +VortexEngine/src/Patterns +/Multi/CompoundPattern.h - + Node40->Node69 - - + + Node73 - -VortexEngine/src/Patterns -/Multi/DripMorphPattern.h + +VortexEngine/src/Patterns +/Multi/DripMorphPattern.h - + Node40->Node73 - - + + Node75 - -VortexEngine/src/Patterns -/Multi/HueShiftPattern.h + +VortexEngine/src/Patterns +/Multi/HueShiftPattern.h - + Node40->Node75 - - + + Node77 - -VortexEngine/src/Patterns -/Multi/MateriaPattern.h + +VortexEngine/src/Patterns +/Multi/MateriaPattern.h - + Node40->Node77 - - + + Node79 - -VortexEngine/src/Patterns -/Multi/MultiLedPattern.cpp + +VortexEngine/src/Patterns +/Multi/MultiLedPattern.cpp - + Node40->Node79 - - + + Node80 - -VortexEngine/src/Patterns -/Multi/PulsishPattern.h + +VortexEngine/src/Patterns +/Multi/PulsishPattern.h - + Node40->Node80 - - + + - + Node69->Node34 - - + + Node72 - -VortexEngine/src/Patterns -/Multi/CompoundPattern.cpp + +VortexEngine/src/Patterns +/Multi/CompoundPattern.cpp - + Node69->Node72 - - + + - + Node73->Node37 - - + + - + Node75->Node37 - - + + - + Node77->Node37 - - + + - + Node80->Node37 - - + + - + Node85->Node25 - - + + - + Node85->Node37 - - + + - + Node85->Node38 - - + + - + Node85->Node72 - - + + - - -Node93->Node3 - - + + +Node93->Node20 + + - + Node93->Node22 - - + + - + Node93->Node25 - - + + - + Node93->Node37 - - + + - + Node93->Node38 - - + + - + Node93->Node72 - - + + - + Node93->Node84 - - + + diff --git a/docs/orbit/Randomizer_8cpp_source.html b/docs/orbit/Randomizer_8cpp_source.html index 70e3450426..9020e233bc 100644 --- a/docs/orbit/Randomizer_8cpp_source.html +++ b/docs/orbit/Randomizer_8cpp_source.html @@ -458,8 +458,8 @@
virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:418
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:487
uint8_t arg7
Definition: PatternArgs.h:89
diff --git a/docs/orbit/Storage_8cpp.html b/docs/orbit/Storage_8cpp.html index 12b3a83c58..06c6c08f90 100644 --- a/docs/orbit/Storage_8cpp.html +++ b/docs/orbit/Storage_8cpp.html @@ -97,7 +97,6 @@ #include "../Memory/Memory.h"
#include "../Serial/ByteStream.h"
#include "../Log/Log.h"
-#include <unistd.h>
#include <Arduino.h>
Include dependency graph for Storage.cpp:
@@ -135,7 +134,7 @@

-

Definition at line 21 of file Storage.cpp.

+

Definition at line 23 of file Storage.cpp.

@@ -151,7 +150,7 @@

-

Definition at line 32 of file Storage.cpp.

+

Definition at line 34 of file Storage.cpp.

@@ -167,7 +166,7 @@

-

Definition at line 27 of file Storage.cpp.

+

Definition at line 29 of file Storage.cpp.

diff --git a/docs/orbit/Storage_8cpp__incl.md5 b/docs/orbit/Storage_8cpp__incl.md5 index ce4e21bebd..82c57d4023 100644 --- a/docs/orbit/Storage_8cpp__incl.md5 +++ b/docs/orbit/Storage_8cpp__incl.md5 @@ -1 +1 @@ -30abeadf33f54ab158fcaf6708aa72a4 \ No newline at end of file +34956bc2a5d1f8bb2547797f76a8714a \ No newline at end of file diff --git a/docs/orbit/Storage_8cpp__incl.svg b/docs/orbit/Storage_8cpp__incl.svg index 038012fc7c..b907c73d89 100644 --- a/docs/orbit/Storage_8cpp__incl.svg +++ b/docs/orbit/Storage_8cpp__incl.svg @@ -46,7 +46,7 @@ if (edges && edges.length) { @@ -58,9 +58,9 @@ var sectionId = 'dynsection-0'; Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -76,236 +76,221 @@ var sectionId = 'dynsection-0'; Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - -unistd.h + +Arduino.h Node1->Node13 - - - - - -Node14 - - -Arduino.h - - - - - -Node1->Node14 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/orbit/Storage_8cpp__incl_org.svg b/docs/orbit/Storage_8cpp__incl_org.svg index 9d42d41281..f9bca53760 100644 --- a/docs/orbit/Storage_8cpp__incl_org.svg +++ b/docs/orbit/Storage_8cpp__incl_org.svg @@ -4,17 +4,17 @@ - + VortexEngine/src/Storage/Storage.cpp Node1 - -VortexEngine/src/Storage -/Storage.cpp + +VortexEngine/src/Storage +/Storage.cpp @@ -30,236 +30,221 @@ Node1->Node2 - - + + Node4 - -string.h + +string.h Node1->Node4 - - + + Node5 - -stdlib.h + +stdlib.h Node1->Node5 - - + + Node6 - -../VortexConfig.h + +../VortexConfig.h Node1->Node6 - - + + Node8 - -../Memory/Memory.h + +../Memory/Memory.h Node1->Node8 - - + + Node9 - -../Serial/ByteStream.h + +../Serial/ByteStream.h Node1->Node9 - - + + Node10 - -../Log/Log.h + +../Log/Log.h Node1->Node10 - - + + Node13 - -unistd.h + +Arduino.h Node1->Node13 - - - - - -Node14 - - -Arduino.h - - - - - -Node1->Node14 - - + + Node3 - -inttypes.h + +inttypes.h Node2->Node3 - - + + Node7 - -Colors/ColorConstants.h + +Colors/ColorConstants.h Node6->Node7 - - + + Node8->Node3 - - + + Node8->Node5 - - + + Node8->Node6 - - + + Node9->Node3 - - + + Node9->Node10 - - + + Node10->Node6 - - + + Node11 - -stdarg.h + +stdarg.h Node10->Node11 - - + + Node12 - -../Log/ErrorBlinker.h + +../Log/ErrorBlinker.h Node10->Node12 - - + + Node12->Node3 - - + + Node12->Node6 - - + + diff --git a/docs/orbit/Storage_8cpp_source.html b/docs/orbit/Storage_8cpp_source.html index 7122eca9b5..2e0ec21a0e 100644 --- a/docs/orbit/Storage_8cpp_source.html +++ b/docs/orbit/Storage_8cpp_source.html @@ -101,208 +101,236 @@
12 #include "VortexLib.h"
13 #endif
14 
-
15 #ifdef _WIN32
-
16 #include <Windows.h>
-
17 #else
-
18 #include <unistd.h>
-
19 #endif
-
20 
-
21 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
15 #ifndef VORTEX_EMBEDDED
+
16 #ifdef _WIN32
+
17 #include <Windows.h>
+
18 #else
+
19 #include <unistd.h>
+
20 #endif
+
21 #endif
22 
-
23 #ifdef VORTEX_LIB
-
24 std::string Storage::m_storageFilename;
-
25 #define STORAGE_FILENAME m_storageFilename.c_str()
-
26 #else
-
27 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
-
28 #endif
-
29 
-
30 #ifdef VORTEX_EMBEDDED
-
31 #include <Arduino.h>
-
32 #define PAGE_SIZE 64
-
33 __attribute__((__aligned__(256)))
-
34 const uint8_t _storagedata[(STORAGE_SIZE+255)/256*256] = { };
-
35 #endif
-
36 
-
37 uint32_t Storage::m_lastSaveSize = 0;
+
23 #define DEFAULT_STORAGE_FILENAME "FlashStorage.flash"
+
24 
+
25 #ifdef VORTEX_LIB
+
26 std::string Storage::m_storageFilename;
+
27 #define STORAGE_FILENAME m_storageFilename.c_str()
+
28 #else
+
29 #define STORAGE_FILENAME DEFAULT_STORAGE_FILENAME
+
30 #endif
+
31 
+
32 #ifdef VORTEX_EMBEDDED
+
33 #include <Arduino.h>
+
34 #define PAGE_SIZE 64
+
35 __attribute__((__aligned__(256)))
+
36 const uint8_t _storagedata[(STORAGE_SIZE+255)/256*256] = { };
+
37 #endif
38 
- -
40 {
-
41 }
-
42 
- -
44 {
-
45 #ifdef VORTEX_LIB
-
46  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
47  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
48  }
-
49 #endif
-
50  return true;
-
51 }
-
52 
- -
54 {
-
55 }
-
56 
-
57 // store a serial buffer to storage
- -
59 {
-
60 #ifdef VORTEX_LIB
-
61  if (!Vortex::storageEnabled()) {
-
62  // success so the system thinks it all worked
-
63  return true;
-
64  }
-
65 #endif
-
66  // check size
-
67  if (buffer.rawSize() > STORAGE_SIZE) {
-
68  ERROR_LOG("Buffer too big for storage space");
-
69  return false;
-
70  }
-
71 #ifdef VORTEX_EMBEDDED
-
72  // clear existing storage
-
73  NVMCTRL->ADDR.reg = ((uint32_t)_storagedata) / 2;
-
74  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
-
75  while (!NVMCTRL->INTFLAG.bit.READY) {}
-
76 
-
77  // set the last save size
-
78  m_lastSaveSize = buffer.size();
-
79 
-
80  // write out the buffer to storage
-
81  // Calculate data boundaries
-
82  uint32_t size = (buffer.rawSize() + 3) / 4;
-
83  volatile uint32_t *dst_addr = (volatile uint32_t *)_storagedata;
-
84  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
-
85 
-
86  // Disable automatic page write
-
87  NVMCTRL->CTRLB.bit.MANW = 1;
-
88 
-
89  // Do writes in pages
-
90  while (size) {
-
91  // Execute "PBC" Page Buffer Clear
-
92  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
-
93  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
94 
-
95  // Fill page buffer
-
96  uint32_t i;
-
97  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
-
98  *dst_addr = *(uint32_t *)(src_addr);
-
99  src_addr += sizeof(uint32_t);
-
100  dst_addr++;
-
101  size--;
-
102  }
-
103 
-
104  // Execute "WP" Write Page
-
105  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
-
106  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
107  }
-
108 #elif defined(_WIN32)
-
109  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
110  if (hFile == INVALID_HANDLE_VALUE) {
-
111  // error
-
112  return false;
-
113  }
-
114  DWORD written = 0;
-
115  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
116  // error
-
117  return false;
-
118  }
-
119  CloseHandle(hFile);
-
120 #else
-
121  FILE *f = fopen(STORAGE_FILENAME, "w");
-
122  if (!f) {
-
123  return false;
+
39 uint32_t Storage::m_lastSaveSize = 0;
+
40 
+ +
42 {
+
43 }
+
44 
+ +
46 {
+
47 #ifdef VORTEX_LIB
+
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
50  }
+
51 #endif
+
52  return true;
+
53 }
+
54 
+ +
56 {
+
57 }
+
58 
+
59 // store a serial buffer to storage
+
60 bool Storage::write(uint16_t slot, ByteStream &buffer)
+
61 {
+
62 #ifdef VORTEX_LIB
+
63  if (!Vortex::storageEnabled()) {
+
64  // success so the system thinks it all worked
+
65  return true;
+
66  }
+
67 #endif
+
68  // check size
+
69  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
70  ERROR_LOG("Buffer too big for storage space");
+
71  return false;
+
72  }
+
73  if (slot >= NUM_MODE_SLOTS) {
+
74  return false;
+
75  }
+
76  // just in case
+
77  buffer.recalcCRC();
+
78 #ifdef VORTEX_EMBEDDED
+
79  // the target slot to store in
+
80  uint32_t storage_slot = (uint32_t)_storagedata + (slot * MAX_MODE_SIZE);
+
81 
+
82  // Number of rows to erase for one slot
+
83  uint16_t rows_to_erase = MAX_MODE_SIZE / (PAGE_SIZE * 4);
+
84  // Erase only the rows containing the slot
+
85  for (uint16_t i = 0; i < rows_to_erase; ++i) {
+
86  // Set the address for the row to erase
+
87  NVMCTRL->ADDR.reg = (uint32_t)(storage_slot + (i * PAGE_SIZE * 4)) / 2;
+
88  // Execute the erase command
+
89  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
+
90  // Wait for the erase operation to complete
+
91  while (!NVMCTRL->INTFLAG.bit.READY) {}
+
92  }
+
93 
+
94  // set the last save size
+
95  m_lastSaveSize = buffer.size();
+
96 
+
97  // write out the buffer to storage
+
98  // Calculate data boundaries
+
99  uint32_t size = (buffer.rawSize() + 3) / 4;
+
100  volatile uint32_t *dst_addr = (volatile uint32_t *)storage_slot;
+
101  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
+
102 
+
103  // Disable automatic page write
+
104  NVMCTRL->CTRLB.bit.MANW = 1;
+
105 
+
106  // Do writes in pages
+
107  while (size) {
+
108  // Execute "PBC" Page Buffer Clear
+
109  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
+
110  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
+
111 
+
112  // Fill page buffer
+
113  uint32_t i;
+
114  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
+
115  *dst_addr = *(uint32_t *)(src_addr);
+
116  src_addr += sizeof(uint32_t);
+
117  dst_addr++;
+
118  size--;
+
119  }
+
120 
+
121  // Execute "WP" Write Page
+
122  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
+
123  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
124  }
-
125  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
-
126  return false;
-
127  }
-
128  fclose(f);
-
129 #endif // VORTEX_EMBEDDED
-
130  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
131  return true;
-
132 }
-
133 
-
134 // read a serial buffer from storage
- -
136 {
-
137 #ifdef VORTEX_LIB
-
138  if (!Vortex::storageEnabled()) {
-
139  // return false here, but true in write because we don't want to return
-
140  // an empty buffer after returning true
-
141  return false;
-
142  }
-
143 #endif
-
144  uint32_t size = STORAGE_SIZE;
-
145  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
146  return false;
-
147  }
-
148  if (!buffer.init(size)) {
-
149  return false;
-
150  }
-
151 #ifdef VORTEX_EMBEDDED
-
152  // read directly into the raw data of the byte array
-
153  memcpy(buffer.rawData(), (const void *)_storagedata, size);
-
154 #elif defined(_WIN32)
-
155  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
156  if (hFile == INVALID_HANDLE_VALUE) {
-
157  // error
-
158  return false;
-
159  }
-
160  DWORD bytesRead = 0;
-
161  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
162  // error
-
163  return false;
-
164  }
-
165  CloseHandle(hFile);
-
166 #else
-
167  FILE *f = fopen(STORAGE_FILENAME, "r");
-
168  if (!f) {
-
169  return false;
-
170  }
-
171  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
172  return false;
-
173  }
-
174  fclose(f);
-
175 #endif
-
176  // ensure the internal buffer is sane after reading it out, this
-
177  // prevents segfaults if the internal size reports larger than capacity
-
178  buffer.sanity();
-
179  // check crc immediately since we read into raw data copying the
-
180  // array could be dangerous
-
181  if (!buffer.checkCRC()) {
-
182  buffer.clear();
-
183  ERROR_LOG("Could not verify buffer");
-
184  return false;
-
185  }
-
186  m_lastSaveSize = size;
-
187  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
188  return true;
-
189 }
-
190 
- -
192 {
-
193  return m_lastSaveSize;
-
194 }
+
125 #elif defined(_WIN32)
+
126  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
127  if (hFile == INVALID_HANDLE_VALUE) {
+
128  // error
+
129  return false;
+
130  }
+
131  DWORD written = 0;
+
132  DWORD offset = slot * MAX_MODE_SIZE;
+
133  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
134  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
135  // error
+
136  return false;
+
137  }
+
138  CloseHandle(hFile);
+
139 #else
+
140  FILE *f = fopen(STORAGE_FILENAME, "w");
+
141  if (!f) {
+
142  return false;
+
143  }
+
144  long offset = slot * MAX_MODE_SIZE;
+
145  fseek(f, offset, SEEK_SET);
+
146  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
147  return false;
+
148  }
+
149  fclose(f);
+
150 #endif // VORTEX_EMBEDDED
+
151  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
152  return true;
+
153 }
+
154 
+
155 // read a serial buffer from storage
+
156 bool Storage::read(uint16_t slot, ByteStream &buffer)
+
157 {
+
158 #ifdef VORTEX_LIB
+
159  if (!Vortex::storageEnabled()) {
+
160  // return false here, but true in write because we don't want to return
+
161  // an empty buffer after returning true
+
162  return false;
+
163  }
+
164 #endif
+
165  uint32_t size = MAX_MODE_SIZE;
+
166  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
+
167  return false;
+
168  }
+
169  if (!buffer.init(size)) {
+
170  return false;
+
171  }
+
172 #ifdef VORTEX_EMBEDDED
+
173  // read directly into the raw data of the byte array
+
174  memcpy(buffer.rawData(), (const void *)(_storagedata + (slot * MAX_MODE_SIZE)), size);
+
175 #elif defined(_WIN32)
+
176  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
177  if (hFile == INVALID_HANDLE_VALUE) {
+
178  // error
+
179  return false;
+
180  }
+
181  DWORD bytesRead = 0;
+
182  DWORD offset = slot * MAX_MODE_SIZE;
+
183  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
184  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
185  // error
+
186  return false;
+
187  }
+
188  CloseHandle(hFile);
+
189 #else
+
190  FILE *f = fopen(STORAGE_FILENAME, "r");
+
191  if (!f) {
+
192  return false;
+
193  }
+
194  long offset = slot * MAX_MODE_SIZE;
+
195  fseek(f, offset, SEEK_SET);
+
196  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
197  return false;
+
198  }
+
199  fclose(f);
+
200 #endif
+
201  // ensure the internal buffer is sane after reading it out, this
+
202  // prevents segfaults if the internal size reports larger than capacity
+
203  buffer.sanity();
+
204  // check crc immediately since we read into raw data copying the
+
205  // array could be dangerous
+
206  if (!buffer.checkCRC()) {
+
207  buffer.clear();
+
208  ERROR_LOG("Could not verify buffer");
+
209  return false;
+
210  }
+
211  m_lastSaveSize = size;
+
212  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
213  return true;
+
214 }
+
215 
+ +
217 {
+
218  return m_lastSaveSize;
+
219 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define PAGE_SIZE
Definition: Storage.cpp:32
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define PAGE_SIZE
Definition: Storage.cpp:34
__attribute__((__aligned__(256))) const uint8_t _storagedata[(STORAGE_SIZE+255)/256 *256]
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:502
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
void * rawData() const
Definition: ByteStream.h:121
uint32_t rawSize() const
Definition: ByteStream.h:122
void clear()
Definition: ByteStream.cpp:107
uint32_t size() const
Definition: ByteStream.h:123
bool checkCRC() const
Definition: ByteStream.cpp:327
void sanity()
Definition: ByteStream.cpp:319
-
static bool init()
Definition: Storage.cpp:43
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static void cleanup()
Definition: Storage.cpp:53
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
-
Storage()
Definition: Storage.cpp:39
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
+
Storage()
Definition: Storage.cpp:41
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/orbit/Storage_8h_source.html b/docs/orbit/Storage_8h_source.html index b0dc3bbbb0..2b3ad8d844 100644 --- a/docs/orbit/Storage_8h_source.html +++ b/docs/orbit/Storage_8h_source.html @@ -108,9 +108,9 @@
19  static void cleanup();
20 
21  // store a serial buffer to storage
-
22  static bool write(ByteStream &buffer);
+
22  static bool write(uint16_t slot, ByteStream &buffer);
23  // read a serial buffer from storage
-
24  static bool read(ByteStream &buffer);
+
24  static bool read(uint16_t slot, ByteStream &buffer);
25 
26  // the last save size (use STORAGE_SIZE For total space)
27  static uint32_t lastSaveSize();
@@ -132,12 +132,12 @@
43 #endif
-
static bool init()
Definition: Storage.cpp:43
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
-
static void cleanup()
Definition: Storage.cpp:53
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
-
Storage()
Definition: Storage.cpp:39
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
+
Storage()
Definition: Storage.cpp:41
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
static uint32_t m_lastSaveSize
Definition: Storage.h:40
diff --git a/docs/orbit/TimeControl_8cpp_source.html b/docs/orbit/TimeControl_8cpp_source.html index 80a24fc480..d23d809d34 100644 --- a/docs/orbit/TimeControl_8cpp_source.html +++ b/docs/orbit/TimeControl_8cpp_source.html @@ -199,7 +199,7 @@
110  uint32_t sleepTime = 0;
111  if (required > elapsed_us) {
112  // in vortex lib on linux we can just sleep instead of spinning
-
113  // but on arduino we must spin and on windows it actually ends
+
113  // but on embedded we must spin and on windows it actually ends
114  // up being more accurate to poll QPF + QPC via microseconds()
115  sleepTime = required - elapsed_us;
116  }
@@ -423,7 +423,7 @@
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static bool init()
Definition: TimeControl.cpp:50
static void delayMicroseconds(uint32_t us)
static uint32_t getRealCurtime()
diff --git a/docs/orbit/Timings_8h_source.html b/docs/orbit/Timings_8h_source.html index 9eb5676252..292513392e 100644 --- a/docs/orbit/Timings_8h_source.html +++ b/docs/orbit/Timings_8h_source.html @@ -98,17 +98,17 @@
9 // through the MS_TO_TICKS macro which calculates the corresponding number of ticks for
10 // the given duration at the current tickrate, on embedded this is 1 to 1 but in vortexlib
11 // the tickrate can be adjusted so these will expand out to function calls to millisecondsToTicks()
-
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
-
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
-
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
-
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
-
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
-
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
-
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
-
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
-
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
-
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
-
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
+
12 #define MENU_TRIGGER_THRESHOLD_TICKS MS_TO_TICKS(MENU_TRIGGER_TIME)
+
13 #define SHORT_CLICK_THRESHOLD_TICKS MS_TO_TICKS(CLICK_THRESHOLD)
+
14 #define CONSECUTIVE_WINDOW_TICKS MS_TO_TICKS(CONSECUTIVE_WINDOW)
+
15 #define AUTO_RANDOM_DELAY_TICKS MS_TO_TICKS(AUTO_RANDOM_DELAY)
+
16 #define DELETE_THRESHOLD_TICKS MS_TO_TICKS(COL_DELETE_THRESHOLD)
+
17 #define DELETE_CYCLE_TICKS MS_TO_TICKS(COL_DELETE_CYCLE)
+
18 #define FACTORY_RESET_THRESHOLD_TICKS MS_TO_TICKS(RESET_HOLD_TIME)
+
19 #define MAX_SERIAL_CHECK_INTERVAL MS_TO_TICKS(SERIAL_CHECK_TIME)
+
20 #define MAX_TIMEOUT_DURATION MS_TO_TICKS(IR_RECEIVER_TIMEOUT_DURATION)
+
21 #define MAX_WAIT_DURATION MS_TO_TICKS(IR_SENDER_WAIT_DURATION)
+
22 #define ADV_MENU_DURATION_TICKS MS_TO_TICKS(ADVANCED_MENU_ENTER_DURATION)
23 
24 // Strobe Timings
25 //
diff --git a/docs/orbit/VortexConfig_8h.html b/docs/orbit/VortexConfig_8h.html index 1e601f9702..5717744bfa 100644 --- a/docs/orbit/VortexConfig_8h.html +++ b/docs/orbit/VortexConfig_8h.html @@ -155,7 +155,7 @@   #define DEFAULT_BRIGHTNESS   20   -#define MAX_MODES   0 +#define MAX_MODES   14   #define DEFAULT_TICKRATE   1000   @@ -269,7 +269,11 @@   #define EDITOR_VERB_GOODBYE   "l"   -#define STORAGE_SIZE   4096 +#define MAX_MODE_SIZE   1024 +  +#define NUM_MODE_SLOTS   (MAX_MODES + 1) +  +#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)   #define VORTEX_EMBEDDED   1   @@ -323,7 +327,7 @@

-

Definition at line 274 of file VortexConfig.h.

+

Definition at line 273 of file VortexConfig.h.

@@ -387,7 +391,7 @@

-

Definition at line 280 of file VortexConfig.h.

+

Definition at line 279 of file VortexConfig.h.

@@ -403,7 +407,7 @@

-

Definition at line 281 of file VortexConfig.h.

+

Definition at line 280 of file VortexConfig.h.

@@ -419,7 +423,7 @@

-

Definition at line 282 of file VortexConfig.h.

+

Definition at line 281 of file VortexConfig.h.

@@ -435,7 +439,7 @@

-

Definition at line 283 of file VortexConfig.h.

+

Definition at line 282 of file VortexConfig.h.

@@ -499,7 +503,7 @@

-

Definition at line 391 of file VortexConfig.h.

+

Definition at line 390 of file VortexConfig.h.

@@ -531,7 +535,7 @@

-

Definition at line 332 of file VortexConfig.h.

+

Definition at line 331 of file VortexConfig.h.

@@ -563,7 +567,7 @@

-

Definition at line 199 of file VortexConfig.h.

+

Definition at line 198 of file VortexConfig.h.

@@ -579,7 +583,7 @@

-

Definition at line 189 of file VortexConfig.h.

+

Definition at line 188 of file VortexConfig.h.

@@ -595,7 +599,7 @@

-

Definition at line 321 of file VortexConfig.h.

+

Definition at line 320 of file VortexConfig.h.

@@ -627,7 +631,7 @@

-

Definition at line 486 of file VortexConfig.h.

+

Definition at line 485 of file VortexConfig.h.

@@ -643,7 +647,7 @@

-

Definition at line 488 of file VortexConfig.h.

+

Definition at line 487 of file VortexConfig.h.

@@ -659,7 +663,7 @@

-

Definition at line 481 of file VortexConfig.h.

+

Definition at line 480 of file VortexConfig.h.

@@ -675,7 +679,7 @@

-

Definition at line 483 of file VortexConfig.h.

+

Definition at line 482 of file VortexConfig.h.

@@ -691,7 +695,7 @@

-

Definition at line 492 of file VortexConfig.h.

+

Definition at line 491 of file VortexConfig.h.

@@ -707,7 +711,7 @@

-

Definition at line 457 of file VortexConfig.h.

+

Definition at line 456 of file VortexConfig.h.

@@ -723,7 +727,7 @@

-

Definition at line 456 of file VortexConfig.h.

+

Definition at line 455 of file VortexConfig.h.

@@ -739,7 +743,7 @@

-

Definition at line 455 of file VortexConfig.h.

+

Definition at line 454 of file VortexConfig.h.

@@ -755,7 +759,7 @@

-

Definition at line 460 of file VortexConfig.h.

+

Definition at line 459 of file VortexConfig.h.

@@ -771,7 +775,7 @@

-

Definition at line 469 of file VortexConfig.h.

+

Definition at line 468 of file VortexConfig.h.

@@ -787,7 +791,7 @@

-

Definition at line 473 of file VortexConfig.h.

+

Definition at line 472 of file VortexConfig.h.

@@ -803,7 +807,7 @@

-

Definition at line 471 of file VortexConfig.h.

+

Definition at line 470 of file VortexConfig.h.

@@ -819,7 +823,7 @@

-

Definition at line 476 of file VortexConfig.h.

+

Definition at line 475 of file VortexConfig.h.

@@ -835,7 +839,7 @@

-

Definition at line 478 of file VortexConfig.h.

+

Definition at line 477 of file VortexConfig.h.

@@ -851,7 +855,7 @@

-

Definition at line 466 of file VortexConfig.h.

+

Definition at line 465 of file VortexConfig.h.

@@ -867,7 +871,7 @@

-

Definition at line 384 of file VortexConfig.h.

+

Definition at line 383 of file VortexConfig.h.

@@ -903,7 +907,7 @@

-

Definition at line 312 of file VortexConfig.h.

+

Definition at line 311 of file VortexConfig.h.

@@ -919,7 +923,7 @@

-

Definition at line 377 of file VortexConfig.h.

+

Definition at line 376 of file VortexConfig.h.

@@ -935,7 +939,7 @@

-

Definition at line 254 of file VortexConfig.h.

+

Definition at line 253 of file VortexConfig.h.

@@ -951,7 +955,7 @@

-

Definition at line 261 of file VortexConfig.h.

+

Definition at line 260 of file VortexConfig.h.

@@ -967,7 +971,7 @@

-

Definition at line 268 of file VortexConfig.h.

+

Definition at line 267 of file VortexConfig.h.

@@ -999,7 +1003,7 @@

-

Definition at line 225 of file VortexConfig.h.

+

Definition at line 224 of file VortexConfig.h.

@@ -1015,7 +1019,7 @@

-

Definition at line 230 of file VortexConfig.h.

+

Definition at line 229 of file VortexConfig.h.

@@ -1031,7 +1035,7 @@

-

Definition at line 219 of file VortexConfig.h.

+

Definition at line 218 of file VortexConfig.h.

@@ -1063,7 +1067,23 @@

-

Definition at line 207 of file VortexConfig.h.

+

Definition at line 206 of file VortexConfig.h.

+ + + + +

◆ MAX_MODE_SIZE

+ +
+
+ + + + +
#define MAX_MODE_SIZE   1024
+
+ +

Definition at line 499 of file VortexConfig.h.

@@ -1074,12 +1094,12 @@

- +
#define MAX_MODES   0#define MAX_MODES   14
-

Definition at line 168 of file VortexConfig.h.

+

Definition at line 167 of file VortexConfig.h.

@@ -1111,7 +1131,23 @@

-

Definition at line 405 of file VortexConfig.h.

+

Definition at line 404 of file VortexConfig.h.

+ + + + +

◆ NUM_MODE_SLOTS

+ +
+
+ + + + +
#define NUM_MODE_SLOTS   (MAX_MODES + 1)
+
+ +

Definition at line 502 of file VortexConfig.h.

@@ -1143,7 +1179,7 @@

-

Definition at line 440 of file VortexConfig.h.

+

Definition at line 439 of file VortexConfig.h.

@@ -1159,7 +1195,7 @@

-

Definition at line 434 of file VortexConfig.h.

+

Definition at line 433 of file VortexConfig.h.

@@ -1175,7 +1211,7 @@

-

Definition at line 431 of file VortexConfig.h.

+

Definition at line 430 of file VortexConfig.h.

@@ -1191,7 +1227,7 @@

-

Definition at line 443 of file VortexConfig.h.

+

Definition at line 442 of file VortexConfig.h.

@@ -1207,7 +1243,7 @@

-

Definition at line 428 of file VortexConfig.h.

+

Definition at line 427 of file VortexConfig.h.

@@ -1223,7 +1259,7 @@

-

Definition at line 437 of file VortexConfig.h.

+

Definition at line 436 of file VortexConfig.h.

@@ -1239,7 +1275,7 @@

-

Definition at line 425 of file VortexConfig.h.

+

Definition at line 424 of file VortexConfig.h.

@@ -1255,7 +1291,7 @@

-

Definition at line 289 of file VortexConfig.h.

+

Definition at line 288 of file VortexConfig.h.

@@ -1271,7 +1307,7 @@

-

Definition at line 290 of file VortexConfig.h.

+

Definition at line 289 of file VortexConfig.h.

@@ -1287,7 +1323,7 @@

-

Definition at line 291 of file VortexConfig.h.

+

Definition at line 290 of file VortexConfig.h.

@@ -1303,7 +1339,7 @@

-

Definition at line 292 of file VortexConfig.h.

+

Definition at line 291 of file VortexConfig.h.

@@ -1335,7 +1371,7 @@

-

Definition at line 397 of file VortexConfig.h.

+

Definition at line 396 of file VortexConfig.h.

@@ -1346,12 +1382,12 @@

- +
#define STORAGE_SIZE   4096#define STORAGE_SIZE   (MAX_MODE_SIZE * NUM_MODE_SLOTS)
-

Definition at line 501 of file VortexConfig.h.

+

Definition at line 506 of file VortexConfig.h.

@@ -1367,7 +1403,7 @@

-

Definition at line 411 of file VortexConfig.h.

+

Definition at line 410 of file VortexConfig.h.

@@ -1383,7 +1419,7 @@

-

Definition at line 298 of file VortexConfig.h.

+

Definition at line 297 of file VortexConfig.h.

@@ -1399,7 +1435,7 @@

-

Definition at line 299 of file VortexConfig.h.

+

Definition at line 298 of file VortexConfig.h.

@@ -1415,7 +1451,7 @@

-

Definition at line 300 of file VortexConfig.h.

+

Definition at line 299 of file VortexConfig.h.

@@ -1431,7 +1467,7 @@

-

Definition at line 301 of file VortexConfig.h.

+

Definition at line 300 of file VortexConfig.h.

@@ -1447,7 +1483,7 @@

-

Definition at line 346 of file VortexConfig.h.

+

Definition at line 345 of file VortexConfig.h.

@@ -1463,7 +1499,7 @@

-

Definition at line 512 of file VortexConfig.h.

+

Definition at line 517 of file VortexConfig.h.

@@ -1479,7 +1515,7 @@

-

Definition at line 365 of file VortexConfig.h.

+

Definition at line 364 of file VortexConfig.h.

@@ -1511,7 +1547,7 @@

-

Definition at line 235 of file VortexConfig.h.

+

Definition at line 234 of file VortexConfig.h.

diff --git a/docs/orbit/VortexConfig_8h.js b/docs/orbit/VortexConfig_8h.js index 59c86b3f1b..5f6d05480b 100644 --- a/docs/orbit/VortexConfig_8h.js +++ b/docs/orbit/VortexConfig_8h.js @@ -49,9 +49,11 @@ var VortexConfig_8h = [ "LOGGING_LEVEL", "VortexConfig_8h.html#aaff29f732338b733b8d1fee0e8df32ab", null ], [ "MAX_COLOR_SLOTS", "VortexConfig_8h.html#a1a0b694e2871554a4066f8d61f577c4c", null ], [ "MAX_MEMORY", "VortexConfig_8h.html#add0367147bdc878651ddf447424b50d5", null ], + [ "MAX_MODE_SIZE", "VortexConfig_8h.html#a4d5f0e0392f00d31715ddf81eb87434a", null ], [ "MAX_MODES", "VortexConfig_8h.html#a95b270e9c99aea216b47fd1e95b2cf34", null ], [ "MENU_TRIGGER_TIME", "VortexConfig_8h.html#adda1b08b81d68fa6a4a6109701f9dd57", null ], [ "MODES_TEST", "VortexConfig_8h.html#a9c95eccf51317b46e19269c6dbc7628e", null ], + [ "NUM_MODE_SLOTS", "VortexConfig_8h.html#ab0c5cc9223512ec01c405592b6741898", null ], [ "RESET_HOLD_TIME", "VortexConfig_8h.html#a18f22a5b8ac9dfe404fd4b83e502eda2", null ], [ "RGB_MENU_BRIGHTNESS_SELECT", "VortexConfig_8h.html#a3fd5d16a2fea0175b3b34083c6dfb42f", null ], [ "RGB_MENU_COLOR_SELECT", "VortexConfig_8h.html#a3b335e17dcc12be29e18e3373e5352cb", null ], diff --git a/docs/orbit/VortexConfig_8h_source.html b/docs/orbit/VortexConfig_8h_source.html index 56677f6846..f6ddefde12 100644 --- a/docs/orbit/VortexConfig_8h_source.html +++ b/docs/orbit/VortexConfig_8h_source.html @@ -250,434 +250,439 @@
161 // two fold the issues with space because they are already limited
162 // and the lack of compression makes their save files bigger
163 //
-
164 // This is set to 0 by default which allows for any number of modes
-
165 // to be stored, however this is not recommended for production and
-
166 // a specific maximum should be chosen for each device
-
167 //
-
168 #define MAX_MODES 0
-
169 
-
170 // Default Tickrate in Ticks Per Second (TPS)
-
171 //
-
172 // The valid range for this is 1 <= x <= 1000000 (default 1000)
-
173 //
-
174 // Any value near or above 10000 will most likely be too fast for
-
175 // the processor to handle.
-
176 //
-
177 // Any value less than 100 and you risk a single tick taking longer
-
178 // than some pattern timings which results in very weird behaviour
-
179 //
-
180 // It's probably best that you leave this at 1000
-
181 //
-
182 // WARNING:
-
183 //
-
184 // The timer system was not designed to handle ticks that are not
-
185 // exactly 1 ms. This means that if you change the tickrate to any
-
186 // value other than 1000 the timer system will miss alarms, patterns
-
187 // will not look correct and there is no fix at the moment.
-
188 //
-
189 #define DEFAULT_TICKRATE 1000
-
190 
-
191 // Pair time offset in ticks
-
192 //
-
193 // This changes how many ticks out of sync each finger will run.
-
194 // So 33 means each finger runs 33 ticks out of sync with the
-
195 // previous finger.
-
196 //
-
197 // This was an early feature that fell into disrepair, I don't
-
198 // think it works anymore and really hasn't proven to be useful
-
199 #define DEFAULT_TICK_OFFSET 0
-
200 
-
201 // Max Memory Usage
-
202 //
-
203 // The maximum memory usage allowed by the memory tracker.
-
204 // The memory tracker isn't present in final builds, only debug
-
205 // so this number doesn't actually do anything in production.
-
206 // Mostly for catching leaks or high memory usage in development.
-
207 #define MAX_MEMORY 8000
-
208 
-
209 // Log Level
-
210 //
-
211 // Set the logging level to control info/error/debug logs accordingly
-
212 // The available logging levels are:
-
213 //
-
214 // 0 Off All logging is disabled
-
215 // 1 Info Only info logs are present
-
216 // 2 Errors Info and error logs are present
-
217 // 3 Debug All logs are present, info, error, and debug
-
218 //
-
219 #define LOGGING_LEVEL 0
-
220 
-
221 // Log to Console
-
222 //
-
223 // Enable logging to console, still need to change LOGGING_LEVEL
-
224 // this only enables the console output connection
-
225 #define LOG_TO_CONSOLE 0
-
226 
-
227 // Log to File
-
228 //
-
229 // Enable this configuration to enable logging to the file
-
230 #define LOG_TO_FILE 0
-
231 
-
232 // Log Name
-
233 //
-
234 // The name of the file on disk that will receive the log info
-
235 #define VORTEX_LOG_NAME "vortexlog"
-
236 
-
237 // HSV to RGB Conversion Algorithm
-
238 //
-
239 // Here you can choose the HSV to RGB conversion algorithm, this will
-
240 // control the overall appearance of all colours produced with HSV.
-
241 // The available options are:
-
242 //
-
243 // 1 FastLED 'hsv to rgb rainbow'
-
244 // 2 FastLED 'hsv to rgb raw C'
-
245 // 3 generic hsv to rgb 'pastel'
-
246 //
-
247 // Option 1 is the default and legacy choice, also looks best because
-
248 // it puts even weight into every color of the rainbow which involves
-
249 // stretching some segments like yellow to take up more hue space.
-
250 //
-
251 // Note you can still call the other routines from your pattern code,
-
252 // for example blend and complementary blend use hsv to rgb 'pastel'
-
253 // because it looks better than hsv to rgb rainbow
-
254 #define HSV_TO_RGB_ALGORITHM 3
-
255 
-
256 // IR Receiver Time-out Duration (ms)
-
257 //
-
258 // This is the amount of time in ms for the IR receiver to wait
-
259 // before reseting itself in the case that communication gets
-
260 // interrupted.
-
261 #define IR_RECEIVER_TIMEOUT_DURATION 2000
-
262 
-
263 // IR Sender Wait Duration (ms)
-
264 //
-
265 // This is the amount of time in ms for the IR sender to wait
-
266 // between IR sends. This duration allows the user to give input
-
267 // as it is not possible to give input during a send.
-
268 #define IR_SENDER_WAIT_DURATION 2000
-
269 
-
270 // Enter Advanced Menus Click Duration (ms)
-
271 //
-
272 // How long the user must long click on the menu item to enter the
-
273 // 'advanced' version of the menu
-
274 #define ADVANCED_MENU_ENTER_DURATION 1500
-
275 
-
276 // Brightness Options
-
277 //
-
278 // These are the four options available in the global brightness menu
-
279 // There is only four options, be careful not to go too low
-
280 #define BRIGHTNESS_OPTION_1 40
-
281 #define BRIGHTNESS_OPTION_2 120
-
282 #define BRIGHTNESS_OPTION_3 185
-
283 #define BRIGHTNESS_OPTION_4 255
-
284 
-
285 // Saturation Options
-
286 //
-
287 // These are the four saturations available in the color selection menu
-
288 // Any color can be picked with any of these 4 saturations
-
289 #define SAT_OPTION_1 0
-
290 #define SAT_OPTION_2 85
-
291 #define SAT_OPTION_3 170
-
292 #define SAT_OPTION_4 255
-
293 
-
294 // Value/Luminance Options
-
295 //
-
296 // These are the four values/luminance options in the color selection menu
-
297 // Any color can be picked with any of these 4 values
-
298 #define VAL_OPTION_1 0
-
299 #define VAL_OPTION_2 85
-
300 #define VAL_OPTION_3 170
-
301 #define VAL_OPTION_4 255
-
302 
-
303 // ===================================================================
-
304 // Boolean Configurations (0 or 1)
-
305 
-
306 // Fill From Thumb
-
307 //
-
308 // The ring menu will fill from the thumb if this is present, otherwise
-
309 // it will fill from the pinkie.
-
310 //
-
311 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
-
312 #define FILL_FROM_THUMB 0
-
313 
-
314 // Demo All Patterns
-
315 //
-
316 // The default modes that are set on the gloveset will be dynamically
-
317 // generated with one mode per pattern in the patterns list
-
318 //
-
319 // This can be used to quickly demo all possible patterns, mostly useful
-
320 // for testing and development
-
321 #define DEMO_ALL_PATTERNS 0
-
322 
-
323 // Debug Allocations
-
324 //
-
325 // Tracks all memory allocations and logs them, useful for finding leaks
-
326 //
-
327 // Note tracking allocations while using the test framework will be inaccurate
-
328 // because the test framework allocations will be caught as well.
-
329 //
-
330 // When the test framework does things like display a color for the first time
-
331 // it will allocate space permanently for the new brush and never free it
-
332 #define DEBUG_ALLOCATIONS 0
-
333 
-
334 // Variable Tickrate
-
335 //
-
336 // This controls whether the setTickrate function is available and
-
337 // whether changing the tickrate is allowed. This goes hand-in-hand
-
338 // with the Default Tickrate configuration above
-
339 //
-
340 // The tickrate should always be fixed in final builds because this
-
341 // functionality induces extra performance costs and the intended
-
342 // tickrate for the final build should already be known.
-
343 //
-
344 // However there may be some clever uses for variable tickrate in
-
345 // the final build? I'm not sure.
-
346 #define VARIABLE_TICKRATE 0
-
347 
-
348 // Error Blinker System
-
349 //
-
350 // This toggles the vortex error blinker system, this system reports
-
351 // fatal errors as a series of blinks. If an error is encountered the
-
352 // chip will only blink out the error code from there forward.
-
353 //
-
354 // Note that enabling this system takes a non-negligible amount
-
355 // of space for all of the code, it really should only be used
-
356 // for debug settings or given tiers like logging level.
-
357 //
-
358 // This is mainly useful for tracking down issues on devices that don't
-
359 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
-
360 // set the error code and then the device will blink out the error
-
361 //
-
362 // for ex: red red green blue blue blue is code 213
-
363 //
-
364 // See Log/ErrorBlinker.h for details on the error codes
-
365 #define VORTEX_ERROR_BLINK 0
-
366 
-
367 // Fixed LED Count
-
368 //
-
369 // Do not allow the Mode loader to dynamically load however many modes
-
370 // are saved in the savefile. This should be enabled for arduino or vortex
-
371 // device builds because they cannot change their number of LEDs. However
-
372 // other tools like the editor or vortex emulator may be able to make use
-
373 // of this to dynamically adjust the number of leds that a mode can handle
-
374 //
-
375 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
-
376 // a mode will stretch it's list of patterns to match the number of leds
-
377 #define FIXED_LED_COUNT 1
-
378 
-
379 // Enable Editor Connection
-
380 //
-
381 // Turn on the editor connection, some devices are capable of connecting to
-
382 // the pc-based editor, this controls whether the engine exposes the purple
-
383 // editor connection menu or not
-
384 #define ENABLE_EDITOR_CONNECTION 1
-
385 
-
386 // Compression Test
-
387 //
-
388 // Run the built-in compression test that will find any faults
-
389 // in the compressor or decompressor. This is useful if you install
-
390 // a new compressor or want to test any changes to the compressor
-
391 #define COMPRESSION_TEST 0
-
392 
-
393 // Serialization Test
-
394 //
-
395 // Run the serializer/unserializer test which will find any objects
-
396 // which don't serialize and unserialize cleanly
-
397 #define SERIALIZATION_TEST 0
-
398 
-
399 // Modes Test
-
400 //
-
401 // Run unit tests on the Modes class which manages the list of Modes.
-
402 // If any patterns fail to instantiate or perform basic operations
-
403 // it should show up in the modes test. Also if the Modes api has been
-
404 // updated then this will test for any issues
-
405 #define MODES_TEST 0
-
406 
-
407 // Timer Test
-
408 //
-
409 // Tests the timers, time control, and timestep system to ensure they
-
410 // are all working as expected and behaving properly
-
411 #define TIMER_TEST 0
+
164 // This should not be set to 0, it should be a specific maximum for
+
165 // each separate device
+
166 //
+
167 #define MAX_MODES 14
+
168 
+
169 // Default Tickrate in Ticks Per Second (TPS)
+
170 //
+
171 // The valid range for this is 1 <= x <= 1000000 (default 1000)
+
172 //
+
173 // Any value near or above 10000 will most likely be too fast for
+
174 // the processor to handle.
+
175 //
+
176 // Any value less than 100 and you risk a single tick taking longer
+
177 // than some pattern timings which results in very weird behaviour
+
178 //
+
179 // It's probably best that you leave this at 1000
+
180 //
+
181 // WARNING:
+
182 //
+
183 // The timer system was not designed to handle ticks that are not
+
184 // exactly 1 ms. This means that if you change the tickrate to any
+
185 // value other than 1000 the timer system will miss alarms, patterns
+
186 // will not look correct and there is no fix at the moment.
+
187 //
+
188 #define DEFAULT_TICKRATE 1000
+
189 
+
190 // Pair time offset in ticks
+
191 //
+
192 // This changes how many ticks out of sync each finger will run.
+
193 // So 33 means each finger runs 33 ticks out of sync with the
+
194 // previous finger.
+
195 //
+
196 // This was an early feature that fell into disrepair, I don't
+
197 // think it works anymore and really hasn't proven to be useful
+
198 #define DEFAULT_TICK_OFFSET 0
+
199 
+
200 // Max Memory Usage
+
201 //
+
202 // The maximum memory usage allowed by the memory tracker.
+
203 // The memory tracker isn't present in final builds, only debug
+
204 // so this number doesn't actually do anything in production.
+
205 // Mostly for catching leaks or high memory usage in development.
+
206 #define MAX_MEMORY 8000
+
207 
+
208 // Log Level
+
209 //
+
210 // Set the logging level to control info/error/debug logs accordingly
+
211 // The available logging levels are:
+
212 //
+
213 // 0 Off All logging is disabled
+
214 // 1 Info Only info logs are present
+
215 // 2 Errors Info and error logs are present
+
216 // 3 Debug All logs are present, info, error, and debug
+
217 //
+
218 #define LOGGING_LEVEL 0
+
219 
+
220 // Log to Console
+
221 //
+
222 // Enable logging to console, still need to change LOGGING_LEVEL
+
223 // this only enables the console output connection
+
224 #define LOG_TO_CONSOLE 0
+
225 
+
226 // Log to File
+
227 //
+
228 // Enable this configuration to enable logging to the file
+
229 #define LOG_TO_FILE 0
+
230 
+
231 // Log Name
+
232 //
+
233 // The name of the file on disk that will receive the log info
+
234 #define VORTEX_LOG_NAME "vortexlog"
+
235 
+
236 // HSV to RGB Conversion Algorithm
+
237 //
+
238 // Here you can choose the HSV to RGB conversion algorithm, this will
+
239 // control the overall appearance of all colours produced with HSV.
+
240 // The available options are:
+
241 //
+
242 // 1 FastLED 'hsv to rgb rainbow'
+
243 // 2 FastLED 'hsv to rgb raw C'
+
244 // 3 generic hsv to rgb 'pastel'
+
245 //
+
246 // Option 1 is the default and legacy choice, also looks best because
+
247 // it puts even weight into every color of the rainbow which involves
+
248 // stretching some segments like yellow to take up more hue space.
+
249 //
+
250 // Note you can still call the other routines from your pattern code,
+
251 // for example blend and complementary blend use hsv to rgb 'pastel'
+
252 // because it looks better than hsv to rgb rainbow
+
253 #define HSV_TO_RGB_ALGORITHM 3
+
254 
+
255 // IR Receiver Time-out Duration (ms)
+
256 //
+
257 // This is the amount of time in ms for the IR receiver to wait
+
258 // before reseting itself in the case that communication gets
+
259 // interrupted.
+
260 #define IR_RECEIVER_TIMEOUT_DURATION 2000
+
261 
+
262 // IR Sender Wait Duration (ms)
+
263 //
+
264 // This is the amount of time in ms for the IR sender to wait
+
265 // between IR sends. This duration allows the user to give input
+
266 // as it is not possible to give input during a send.
+
267 #define IR_SENDER_WAIT_DURATION 2000
+
268 
+
269 // Enter Advanced Menus Click Duration (ms)
+
270 //
+
271 // How long the user must long click on the menu item to enter the
+
272 // 'advanced' version of the menu
+
273 #define ADVANCED_MENU_ENTER_DURATION 1500
+
274 
+
275 // Brightness Options
+
276 //
+
277 // These are the four options available in the global brightness menu
+
278 // There is only four options, be careful not to go too low
+
279 #define BRIGHTNESS_OPTION_1 40
+
280 #define BRIGHTNESS_OPTION_2 120
+
281 #define BRIGHTNESS_OPTION_3 185
+
282 #define BRIGHTNESS_OPTION_4 255
+
283 
+
284 // Saturation Options
+
285 //
+
286 // These are the four saturations available in the color selection menu
+
287 // Any color can be picked with any of these 4 saturations
+
288 #define SAT_OPTION_1 0
+
289 #define SAT_OPTION_2 85
+
290 #define SAT_OPTION_3 170
+
291 #define SAT_OPTION_4 255
+
292 
+
293 // Value/Luminance Options
+
294 //
+
295 // These are the four values/luminance options in the color selection menu
+
296 // Any color can be picked with any of these 4 values
+
297 #define VAL_OPTION_1 0
+
298 #define VAL_OPTION_2 85
+
299 #define VAL_OPTION_3 170
+
300 #define VAL_OPTION_4 255
+
301 
+
302 // ===================================================================
+
303 // Boolean Configurations (0 or 1)
+
304 
+
305 // Fill From Thumb
+
306 //
+
307 // The ring menu will fill from the thumb if this is present, otherwise
+
308 // it will fill from the pinkie.
+
309 //
+
310 // The logic is cleaner for fill from pinkie but fill from thumb is preferred
+
311 #define FILL_FROM_THUMB 0
+
312 
+
313 // Demo All Patterns
+
314 //
+
315 // The default modes that are set on the gloveset will be dynamically
+
316 // generated with one mode per pattern in the patterns list
+
317 //
+
318 // This can be used to quickly demo all possible patterns, mostly useful
+
319 // for testing and development
+
320 #define DEMO_ALL_PATTERNS 0
+
321 
+
322 // Debug Allocations
+
323 //
+
324 // Tracks all memory allocations and logs them, useful for finding leaks
+
325 //
+
326 // Note tracking allocations while using the test framework will be inaccurate
+
327 // because the test framework allocations will be caught as well.
+
328 //
+
329 // When the test framework does things like display a color for the first time
+
330 // it will allocate space permanently for the new brush and never free it
+
331 #define DEBUG_ALLOCATIONS 0
+
332 
+
333 // Variable Tickrate
+
334 //
+
335 // This controls whether the setTickrate function is available and
+
336 // whether changing the tickrate is allowed. This goes hand-in-hand
+
337 // with the Default Tickrate configuration above
+
338 //
+
339 // The tickrate should always be fixed in final builds because this
+
340 // functionality induces extra performance costs and the intended
+
341 // tickrate for the final build should already be known.
+
342 //
+
343 // However there may be some clever uses for variable tickrate in
+
344 // the final build? I'm not sure.
+
345 #define VARIABLE_TICKRATE 0
+
346 
+
347 // Error Blinker System
+
348 //
+
349 // This toggles the vortex error blinker system, this system reports
+
350 // fatal errors as a series of blinks. If an error is encountered the
+
351 // chip will only blink out the error code from there forward.
+
352 //
+
353 // Note that enabling this system takes a non-negligible amount
+
354 // of space for all of the code, it really should only be used
+
355 // for debug settings or given tiers like logging level.
+
356 //
+
357 // This is mainly useful for tracking down issues on devices that don't
+
358 // have a serial connection like the attiny. Use FATAL_ERROR(code) to
+
359 // set the error code and then the device will blink out the error
+
360 //
+
361 // for ex: red red green blue blue blue is code 213
+
362 //
+
363 // See Log/ErrorBlinker.h for details on the error codes
+
364 #define VORTEX_ERROR_BLINK 0
+
365 
+
366 // Fixed LED Count
+
367 //
+
368 // Do not allow the Mode loader to dynamically load however many modes
+
369 // are saved in the savefile. This should be enabled for embedded or vortex
+
370 // device builds because they cannot change their number of LEDs. However
+
371 // other tools like the editor or vortex emulator may be able to make use
+
372 // of this to dynamically adjust the number of leds that a mode can handle
+
373 //
+
374 // NOTE: This does not touch the 'leds' class itself it only adjusts whether
+
375 // a mode will stretch it's list of patterns to match the number of leds
+
376 #define FIXED_LED_COUNT 1
+
377 
+
378 // Enable Editor Connection
+
379 //
+
380 // Turn on the editor connection, some devices are capable of connecting to
+
381 // the pc-based editor, this controls whether the engine exposes the purple
+
382 // editor connection menu or not
+
383 #define ENABLE_EDITOR_CONNECTION 1
+
384 
+
385 // Compression Test
+
386 //
+
387 // Run the built-in compression test that will find any faults
+
388 // in the compressor or decompressor. This is useful if you install
+
389 // a new compressor or want to test any changes to the compressor
+
390 #define COMPRESSION_TEST 0
+
391 
+
392 // Serialization Test
+
393 //
+
394 // Run the serializer/unserializer test which will find any objects
+
395 // which don't serialize and unserialize cleanly
+
396 #define SERIALIZATION_TEST 0
+
397 
+
398 // Modes Test
+
399 //
+
400 // Run unit tests on the Modes class which manages the list of Modes.
+
401 // If any patterns fail to instantiate or perform basic operations
+
402 // it should show up in the modes test. Also if the Modes api has been
+
403 // updated then this will test for any issues
+
404 #define MODES_TEST 0
+
405 
+
406 // Timer Test
+
407 //
+
408 // Tests the timers, time control, and timestep system to ensure they
+
409 // are all working as expected and behaving properly
+
410 #define TIMER_TEST 0
+
411 
412 
-
413 
-
414 // ===================================================================
-
415 // Menu Colors
-
416 //
-
417 // These are the colors for the respective menus, each color should
-
418 // be unique and distinct from the others. It should also be bright
-
419 // enough to be seen on the lowest brightness setting of the device
-
420 //
-
421 // See the below header for all of the available color constants
-
422 #include "Colors/ColorConstants.h"
-
423 
-
424 // Randomizer Menu Color
-
425 #define RGB_MENU_RANDOMIZER RGB_WHITE1
-
426 
-
427 // Mode Sharing Menu Color
-
428 #define RGB_MENU_MODE_SHARING RGB_CYAN1
-
429 
-
430 // Editor Connection Menu Color
-
431 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
-
432 
-
433 // Color Select Menu Color
-
434 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
-
435 
-
436 // Pattern Select Menu Color
-
437 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
-
438 
-
439 // Global Brightness Menu Color
-
440 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
-
441 
-
442 // Factory Reset Menu Color
-
443 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
413 // ===================================================================
+
414 // Menu Colors
+
415 //
+
416 // These are the colors for the respective menus, each color should
+
417 // be unique and distinct from the others. It should also be bright
+
418 // enough to be seen on the lowest brightness setting of the device
+
419 //
+
420 // See the below header for all of the available color constants
+
421 #include "Colors/ColorConstants.h"
+
422 
+
423 // Randomizer Menu Color
+
424 #define RGB_MENU_RANDOMIZER RGB_WHITE1
+
425 
+
426 // Mode Sharing Menu Color
+
427 #define RGB_MENU_MODE_SHARING RGB_CYAN1
+
428 
+
429 // Editor Connection Menu Color
+
430 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE1
+
431 
+
432 // Color Select Menu Color
+
433 #define RGB_MENU_COLOR_SELECT RGB_GREEN1
+
434 
+
435 // Pattern Select Menu Color
+
436 #define RGB_MENU_PATTERN_SELECT RGB_BLUE1
+
437 
+
438 // Global Brightness Menu Color
+
439 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW1
+
440 
+
441 // Factory Reset Menu Color
+
442 #define RGB_MENU_FACTORY_RESET RGB_RED1
+
443 
444 
-
445 
-
446 // ===================================================================
-
447 // Editor Verbs
-
448 //
-
449 // These are the commands used in the protocol with the editor.
-
450 // They are defined here so the editor can access them easily,
-
451 // also so you can configure them at your own free will.
-
452 
-
453 // the initial hello from the gloveset to the editor
-
454 // is the full name of this build of vortex
-
455 #define EDITOR_VERB_GREETING_PREFIX "== "
-
456 #define EDITOR_VERB_GREETING_POSTFIX " =="
-
457 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
-
458 
-
459 // the hello from the editor to the gloves
-
460 #define EDITOR_VERB_HELLO "a"
-
461 
-
462 // the response from the gloveset when it's ready to receive something
-
463 // after the editor has given it a command to do something the gloveset
-
464 // will respond with this then once it's done doing the action it will
-
465 // send a different finished response for each action
-
466 #define EDITOR_VERB_READY "b"
-
467 
-
468 // the command from the editor to send modes over
-
469 #define EDITOR_VERB_PULL_MODES "c"
-
470 // the response from the editor once modes are received
-
471 #define EDITOR_VERB_PULL_MODES_DONE "d"
-
472 // the response from the gloves once it acknowledges the editor got the modes
-
473 #define EDITOR_VERB_PULL_MODES_ACK "e"
-
474 
-
475 // the command from the editor to send modes over
-
476 #define EDITOR_VERB_PUSH_MODES "f"
-
477 // the response from the gloveset when it received the mode
-
478 #define EDITOR_VERB_PUSH_MODES_ACK "g"
-
479 
-
480 // the command from the editor to tell the gloveset to demo a mode
-
481 #define EDITOR_VERB_DEMO_MODE "h"
-
482 // the response from the gloveset when it's received the mode to demo
-
483 #define EDITOR_VERB_DEMO_MODE_ACK "i"
-
484 
-
485 // the command from the editor to tell the gloveset to clear the demo
-
486 #define EDITOR_VERB_CLEAR_DEMO "j"
-
487 // the response from the gloveset when it's received disabled the demo
-
488 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
-
489 
-
490 // when the gloveset is leaving the menu and needs to tell the editor
-
491 // that it's no longer listening
-
492 #define EDITOR_VERB_GOODBYE "l"
-
493 
-
494 // ===================================================================
-
495 // Manually Configured Sizes
-
496 //
-
497 // These are the various storage space constants of the vortex device
-
498 
-
499 // the space available for storing modes, we can't make this too big
-
500 // otherwise we will have trouble loading it into memory
-
501 #define STORAGE_SIZE 4096
-
502 
-
503 // ===================================================================
-
504 // Test Framework configurations
-
505 //
-
506 // * Unless you are using the test framework, don't touch these! *
+
445 // ===================================================================
+
446 // Editor Verbs
+
447 //
+
448 // These are the commands used in the protocol with the editor.
+
449 // They are defined here so the editor can access them easily,
+
450 // also so you can configure them at your own free will.
+
451 
+
452 // the initial hello from the gloveset to the editor
+
453 // is the full name of this build of vortex
+
454 #define EDITOR_VERB_GREETING_PREFIX "== "
+
455 #define EDITOR_VERB_GREETING_POSTFIX " =="
+
456 #define EDITOR_VERB_GREETING EDITOR_VERB_GREETING_PREFIX VORTEX_FULL_NAME EDITOR_VERB_GREETING_POSTFIX
+
457 
+
458 // the hello from the editor to the gloves
+
459 #define EDITOR_VERB_HELLO "a"
+
460 
+
461 // the response from the gloveset when it's ready to receive something
+
462 // after the editor has given it a command to do something the gloveset
+
463 // will respond with this then once it's done doing the action it will
+
464 // send a different finished response for each action
+
465 #define EDITOR_VERB_READY "b"
+
466 
+
467 // the command from the editor to send modes over
+
468 #define EDITOR_VERB_PULL_MODES "c"
+
469 // the response from the editor once modes are received
+
470 #define EDITOR_VERB_PULL_MODES_DONE "d"
+
471 // the response from the gloves once it acknowledges the editor got the modes
+
472 #define EDITOR_VERB_PULL_MODES_ACK "e"
+
473 
+
474 // the command from the editor to send modes over
+
475 #define EDITOR_VERB_PUSH_MODES "f"
+
476 // the response from the gloveset when it received the mode
+
477 #define EDITOR_VERB_PUSH_MODES_ACK "g"
+
478 
+
479 // the command from the editor to tell the gloveset to demo a mode
+
480 #define EDITOR_VERB_DEMO_MODE "h"
+
481 // the response from the gloveset when it's received the mode to demo
+
482 #define EDITOR_VERB_DEMO_MODE_ACK "i"
+
483 
+
484 // the command from the editor to tell the gloveset to clear the demo
+
485 #define EDITOR_VERB_CLEAR_DEMO "j"
+
486 // the response from the gloveset when it's received disabled the demo
+
487 #define EDITOR_VERB_CLEAR_DEMO_ACK "k"
+
488 
+
489 // when the gloveset is leaving the menu and needs to tell the editor
+
490 // that it's no longer listening
+
491 #define EDITOR_VERB_GOODBYE "l"
+
492 
+
493 // ===================================================================
+
494 // Manually Configured Sizes
+
495 //
+
496 // These are the various storage space constants of the vortex device
+
497 
+
498 // maximum size of a mode here
+
499 #define MAX_MODE_SIZE 1024
+
500 
+
501 // the number of storage slots for modes, add 1 for the header
+
502 #define NUM_MODE_SLOTS (MAX_MODES + 1)
+
503 
+
504 // the space available for storing modes, we can't make this too big
+
505 // otherwise we will have trouble loading it into memory
+
506 #define STORAGE_SIZE (MAX_MODE_SIZE * NUM_MODE_SLOTS)
507 
-
508 // These defines come from the project settings for preprocessor, an
-
509 // entry for $(SolutionName) produces preprocessor definitions that
-
510 // match the solution that is compiling the engine
-
511 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
-
512 #define VORTEX_EMBEDDED 1
-
513 #endif
-
514 
-
515 // if building for editor or test framework then we're building vortex lib, it should
-
516 // be defined in the project settings but sometimes it's not for example if a cpp file
-
517 // from the test framework includes a header from the engine it might not have VORTEX_LIB
-
518 // this will ensure that anything which includes this config file will have VORTEX_LIB
-
519 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
-
520 #undef VORTEX_LIB
-
521 #define VORTEX_LIB
-
522 #endif
-
523 
-
524 #ifdef VORTEX_LIB
-
525 #undef VORTEX_SLIM
-
526 #define VORTEX_SLIM 0
-
527 
-
528 // The test framework needs brighter menu colors can't really see them on the screen
-
529 #undef RGB_MENU_RANDOMIZER
-
530 #undef RGB_MENU_MODE_SHARING
-
531 #undef RGB_MENU_EDITOR_CONNECTION
-
532 #undef RGB_MENU_COLOR_SELECT
-
533 #undef RGB_MENU_PATTERN_SELECT
-
534 #undef RGB_MENU_BRIGHTNESS_SELECT
-
535 #undef RGB_MENU_FACTORY_RESET
-
536 #define RGB_MENU_RANDOMIZER RGB_WHITE4
-
537 #define RGB_MENU_MODE_SHARING RGB_CYAN4
-
538 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
-
539 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
-
540 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
-
541 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
-
542 #define RGB_MENU_FACTORY_RESET RGB_RED4
-
543 
-
544 #endif // ifdef VORTEX_LIB
-
545 
-
546 // This will be defined if the project is being built inside the test framework
-
547 #ifdef PROJECT_NAME_VortexTestingFramework
+
508 // ===================================================================
+
509 // Test Framework configurations
+
510 //
+
511 // * Unless you are using the test framework, don't touch these! *
+
512 
+
513 // These defines come from the project settings for preprocessor, an
+
514 // entry for $(SolutionName) produces preprocessor definitions that
+
515 // match the solution that is compiling the engine
+
516 #if !defined(PROJECT_NAME_VortexTestingFramework) && !defined(PROJECT_NAME_VortexEditor) && !defined(VORTEX_LIB)
+
517 #define VORTEX_EMBEDDED 1
+
518 #endif
+
519 
+
520 // if building for editor or test framework then we're building vortex lib, it should
+
521 // be defined in the project settings but sometimes it's not for example if a cpp file
+
522 // from the test framework includes a header from the engine it might not have VORTEX_LIB
+
523 // this will ensure that anything which includes this config file will have VORTEX_LIB
+
524 #if defined(PROJECT_NAME_VortexTestingFramework) || defined(PROJECT_NAME_VortexEditor)
+
525 #undef VORTEX_LIB
+
526 #define VORTEX_LIB
+
527 #endif
+
528 
+
529 #ifdef VORTEX_LIB
+
530 #undef VORTEX_SLIM
+
531 #define VORTEX_SLIM 0
+
532 
+
533 // The test framework needs brighter menu colors can't really see them on the screen
+
534 #undef RGB_MENU_RANDOMIZER
+
535 #undef RGB_MENU_MODE_SHARING
+
536 #undef RGB_MENU_EDITOR_CONNECTION
+
537 #undef RGB_MENU_COLOR_SELECT
+
538 #undef RGB_MENU_PATTERN_SELECT
+
539 #undef RGB_MENU_BRIGHTNESS_SELECT
+
540 #undef RGB_MENU_FACTORY_RESET
+
541 #define RGB_MENU_RANDOMIZER RGB_WHITE4
+
542 #define RGB_MENU_MODE_SHARING RGB_CYAN4
+
543 #define RGB_MENU_EDITOR_CONNECTION RGB_PURPLE4
+
544 #define RGB_MENU_COLOR_SELECT RGB_GREEN4
+
545 #define RGB_MENU_PATTERN_SELECT RGB_BLUE4
+
546 #define RGB_MENU_BRIGHTNESS_SELECT RGB_YELLOW4
+
547 #define RGB_MENU_FACTORY_RESET RGB_RED4
548 
-
549 // In the test framework variable tickrate must be enabled to allow
-
550 // the tickrate slider to function, also the test framework never runs
-
551 // at full tickrate, maximum is 500 tps
-
552 #undef VARIABLE_TICKRATE
-
553 #define VARIABLE_TICKRATE 1
-
554 
-
555 #undef DEFAULT_BRIGHTNESS
-
556 #define DEFAULT_BRIGHTNESS 255
-
557 
-
558 // test framework needs more time to click idk
-
559 #undef CONSECUTIVE_WINDOW
-
560 #define CONSECUTIVE_WINDOW 300
-
561 
-
562 // force logging to 3 on linux build
-
563 #ifndef _WIN32
-
564 #undef LOGGING_LEVEL
-
565 #define LOGGING_LEVEL 3
-
566 #endif
-
567 
-
568 #endif // VortexTestingFramework
-
569 
-
570 // This will be defined if the project is being built inside the editor
-
571 #ifdef PROJECT_NAME_VortexEditor
+
549 #endif // ifdef VORTEX_LIB
+
550 
+
551 // This will be defined if the project is being built inside the test framework
+
552 #ifdef PROJECT_NAME_VortexTestingFramework
+
553 
+
554 // In the test framework variable tickrate must be enabled to allow
+
555 // the tickrate slider to function, also the test framework never runs
+
556 // at full tickrate, maximum is 500 tps
+
557 #undef VARIABLE_TICKRATE
+
558 #define VARIABLE_TICKRATE 1
+
559 
+
560 #undef DEFAULT_BRIGHTNESS
+
561 #define DEFAULT_BRIGHTNESS 255
+
562 
+
563 // test framework needs more time to click idk
+
564 #undef CONSECUTIVE_WINDOW
+
565 #define CONSECUTIVE_WINDOW 300
+
566 
+
567 // force logging to 3 on linux build
+
568 #ifndef _WIN32
+
569 #undef LOGGING_LEVEL
+
570 #define LOGGING_LEVEL 3
+
571 #endif
572 
-
573 // The editor needs an unfixed led count in order to load any mode
-
574 #undef FIXED_LED_COUNT
-
575 #define FIXED_LED_COUNT 0
-
576 
-
577 #endif // VortexEditor
-
578 
-
579 // When running in the test framework with demo all patterns enabled
-
580 // we should change the max patterns to the total pattern count because
-
581 // the test framework can handle the memory usage and we can't demo
-
582 // all the patterns without the increased limit
-
583 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
-
584  #undef MAX_MODES
-
585  #include "Patterns/Patterns.h"
-
586  #define MAX_MODES 0
-
587  #undef LOGGING_LEVEL
-
588  #define LOGGING_LEVEL 3
-
589 #endif
-
590 
-
591 #endif // VORTEX_CONFIG_H
+
573 #endif // VortexTestingFramework
+
574 
+
575 // This will be defined if the project is being built inside the editor
+
576 #ifdef PROJECT_NAME_VortexEditor
+
577 
+
578 // The editor needs an unfixed led count in order to load any mode
+
579 #undef FIXED_LED_COUNT
+
580 #define FIXED_LED_COUNT 0
+
581 
+
582 #endif // VortexEditor
+
583 
+
584 // When running in the test framework with demo all patterns enabled
+
585 // we should change the max patterns to the total pattern count because
+
586 // the test framework can handle the memory usage and we can't demo
+
587 // all the patterns without the increased limit
+
588 #if DEMO_ALL_PATTERNS == 1 || SERIALIZATION_TEST == 1 || COMPRESSION_TEST == 1
+
589  #undef MAX_MODES
+
590  #include "Patterns/Patterns.h"
+
591  #define MAX_MODES 0
+
592  #undef LOGGING_LEVEL
+
593  #define LOGGING_LEVEL 3
+
594 #endif
+
595 
+
596 #endif // VORTEX_CONFIG_H
diff --git a/docs/orbit/VortexEngine_8cpp_source.html b/docs/orbit/VortexEngine_8cpp_source.html index f11a3d3b2b..772aae8bdb 100644 --- a/docs/orbit/VortexEngine_8cpp_source.html +++ b/docs/orbit/VortexEngine_8cpp_source.html @@ -175,7 +175,7 @@
87 {
88  // cleanup in reverse order
-
89  // NOTE: the arduino doesn't actually cleanup,
+
89  // NOTE: the embedded doesn't actually cleanup,
90  // but the test frameworks do
91 #ifdef VORTEX_LIB
@@ -529,7 +529,7 @@
#define MAX_COLOR_SLOTS
Definition: VortexConfig.h:143
#define DEVICE_LOCK_CLICKS
Definition: VortexConfig.h:65
#define VORTEX_VERSION_MINOR
Definition: VortexConfig.h:17
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
#define AUTO_CYCLE_MODES_CLICKS
Definition: VortexConfig.h:99
#define VORTEX_VERSION_MAJOR
Definition: VortexConfig.h:10
#define AUTO_RANDOM_DELAY
Definition: VortexConfig.h:90
@@ -576,21 +576,21 @@
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
bool setColorset(const Colorset &set, LedPos pos=LED_ANY)
Definition: Mode.cpp:569
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-
static bool saveStorage()
Definition: Modes.cpp:170
+
static bool saveStorage()
Definition: Modes.cpp:209
static bool setLocked(bool locked, bool save=true)
Definition: Modes.h:122
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:368
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:517
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:437
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:586
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:562
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:631
static bool init()
Definition: Modes.cpp:30
static void play()
Definition: Modes.cpp:58
static void cleanup()
Definition: Modes.cpp:53
static bool locked()
Definition: Modes.h:125
-
static void clearModes()
Definition: Modes.cpp:548
+
static void clearModes()
Definition: Modes.cpp:617
static uint32_t lastSwitchTime()
Definition: Modes.h:96
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:226
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:190
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:295
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:259
uint8_t numArgs
Definition: PatternArgs.h:121
static PatternArgs getDefaultArgs(PatternID id)
@@ -598,9 +598,9 @@
Definition: Random.h:6
static void cleanup()
Definition: Serial.cpp:30
static bool init()
Definition: Serial.cpp:23
-
static bool init()
Definition: Storage.cpp:43
-
static void cleanup()
Definition: Storage.cpp:53
-
static uint32_t lastSaveSize()
Definition: Storage.cpp:191
+
static bool init()
Definition: Storage.cpp:45
+
static void cleanup()
Definition: Storage.cpp:55
+
static uint32_t lastSaveSize()
Definition: Storage.cpp:216
static bool init()
Definition: TimeControl.cpp:50
static uint32_t getCurtime()
Definition: TimeControl.h:40
static void tickClock()
Definition: TimeControl.cpp:75
diff --git a/docs/orbit/classBlendPattern.html b/docs/orbit/classBlendPattern.html index d13654f85e..12a2aa52f5 100644 --- a/docs/orbit/classBlendPattern.html +++ b/docs/orbit/classBlendPattern.html @@ -468,7 +468,7 @@

46  // convert to hsv
47  HSVColor hsvCol = m_cur;
48  // shift the hue by a flip size
-
49  hsvCol.hue += (m_flip * (255 / m_numFlips));
+
49  hsvCol.hue += (m_flip * (127 / m_numFlips));
50  // convert the hsv color back to RGB
51  col = hsvCol;
52  }
@@ -478,7 +478,7 @@

56  m_flip++;
57  // modulate the flip count DO NOT USE MODULO OPERATOR BECAUSE
58  // THE FLIP COUNT COULD BE 0 THAT WILL DIVIDE BY ZERO
-
59  if (m_flip >= m_numFlips) {
+
59  if (m_flip > m_numFlips) {
60  m_flip = 0;
61  }
62 }
diff --git a/docs/orbit/classByteStream.html b/docs/orbit/classByteStream.html index aab15a7207..c145022fa7 100644 --- a/docs/orbit/classByteStream.html +++ b/docs/orbit/classByteStream.html @@ -440,7 +440,7 @@

References isCRCDirty(), m_pData, and ByteStream::RawBuffer::verify().

-

Referenced by Storage::read().

+

Referenced by Storage::read().

@@ -472,7 +472,7 @@

References m_capacity, m_pData, m_position, and vfree.

-

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

+

Referenced by init(), IRSender::loadMode(), VLSender::loadMode(), move(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), EditorConnection::run(), and ~ByteStream().

@@ -549,7 +549,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, compress_buffer, compress_size, DEBUG_LOG, DEBUG_LOGF, ByteStream::RawBuffer::flags, is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), recalcCRC(), shrink(), and ByteStream::RawBuffer::size.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

@@ -687,7 +687,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_COMRPESSED, DEBUG_LOG, DEBUG_LOGF, decompress_buffer, ERROR_LOGF, ByteStream::RawBuffer::flags, init(), is_compressed(), m_capacity, m_pData, move(), ByteStream::RawBuffer::recalcCRC(), sanity(), shrink(), ByteStream::RawBuffer::size, and ByteStream::RawBuffer::verify().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

+

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), and VLSender::loadMode().

@@ -904,7 +904,7 @@

References ByteStream::RawBuffer::buf, clear(), ByteStream::RawBuffer::crc32, ERROR_OUT_OF_MEMORY, ByteStream::RawBuffer::flags, m_capacity, m_pData, ByteStream::RawBuffer::recalcCRC(), size(), ByteStream::RawBuffer::size, and vcalloc.

-

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

+

Referenced by ByteStream(), decompress(), extend(), operator=(), and Storage::read().

@@ -1406,7 +1406,7 @@

References m_pData.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1492,7 +1492,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), EditorConnection::receiveModes(), Storage::write(), and SerialComs::write().

+

Referenced by IRSender::loadMode(), VLSender::loadMode(), EditorConnection::receiveDemoMode(), IRReceiver::receiveMode(), EditorConnection::receiveModes(), SerialComs::write(), and Storage::write().

@@ -1532,7 +1532,7 @@

References BUFFER_FLAG_DIRTY, ByteStream::RawBuffer::crc32, ByteStream::RawBuffer::flags, m_pData, ByteStream::RawBuffer::recalcCRC(), and ByteStream::RawBuffer::size.

-

Referenced by compress(), Randomizer::init(), and SerialComs::write().

+

Referenced by compress(), Randomizer::init(), SerialComs::write(), and Storage::write().

@@ -1559,7 +1559,7 @@

References moveUnserializer().

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), and EditorConnection::receiveModes().

+

Referenced by Mode::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveModes(), and Modes::unserializeSaveHeader().

@@ -1588,7 +1588,7 @@

References m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by decompress(), rawInit(), and Storage::read().

+

Referenced by decompress(), rawInit(), and Storage::read().

@@ -1698,7 +1698,7 @@

References ByteStream::RawBuffer::buf, BUFFER_FLAG_DIRTY, extend(), ByteStream::RawBuffer::flags, m_capacity, m_pData, and ByteStream::RawBuffer::size.

-

Referenced by operator+=(), SerialComs::read(), Modes::saveToBuffer(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), and VortexEngine::serializeVersion().

+

Referenced by operator+=(), SerialComs::read(), Modes::saveStorage(), Modes::serialize(), Colorset::serialize(), RGBColor::serialize(), PatternMap::serialize(), SequenceStep::serialize(), Sequence::serialize(), Pattern::serialize(), PatternArgs::serialize(), Mode::serialize(), Modes::serializeSaveHeader(), and VortexEngine::serializeVersion().

@@ -1769,7 +1769,7 @@

References m_pData, and ByteStream::RawBuffer::size.

-

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), Modes::unserialize(), and Storage::write().

+

Referenced by Modes::ModeLink::append(), append(), ByteStream(), extend(), init(), Modes::loadStorage(), Modes::ModeLink::ModeLink(), rawInit(), Storage::read(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Modes::saveToBuffer(), Mode::saveToBuffer(), Modes::unserialize(), and Storage::write().

@@ -1903,7 +1903,7 @@

References ByteStream::RawBuffer::buf, m_pData, m_position, and ByteStream::RawBuffer::size.

-

Referenced by Mode::loadFromBuffer(), Modes::loadFromBuffer(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), and unserialize8().

+

Referenced by Mode::loadFromBuffer(), Modes::loadStorage(), EditorConnection::receiveDemoMode(), EditorConnection::receiveMessage(), EditorConnection::receiveModes(), Colorset::unserialize(), RGBColor::unserialize(), Mode::unserialize(), Modes::unserialize(), PatternMap::unserialize(), SequenceStep::unserialize(), Sequence::unserialize(), PatternArgs::unserialize(), unserialize16(), unserialize32(), unserialize8(), and Modes::unserializeSaveHeader().

diff --git a/docs/orbit/classColorSelect.html b/docs/orbit/classColorSelect.html index b2528070d1..aecfa0f3a8 100644 --- a/docs/orbit/classColorSelect.html +++ b/docs/orbit/classColorSelect.html @@ -491,9 +491,9 @@

Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
bool isEmpty() const
Definition: Mode.cpp:735
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isEmpty(), Mode::isMultiLed(), Menu::m_ledSelected, m_state, and STATE_INIT.

@@ -649,7 +649,7 @@

virtual void init()
Definition: Mode.cpp:120
bool setColorsetMap(LedMap map, const Colorset &set)
Definition: Mode.cpp:616
-

References HSVColor::clear(), Leds::clearAll(), Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, Colorset::equals(), g_pButton, Mode::getColorset(), Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, m_curPage, Menu::m_curSelection, m_newColor, m_quadrant, m_slot, m_state, Menu::m_targetLeds, MAP_IS_ONE_LED, mapGetFirstLed(), Colorset::numColors(), PAGE_SIZE, QUADRANT_FIRST, QUADRANT_LAST, Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorsetMap(), STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

+

References HSVColor::clear(), Leds::clearAll(), Modes::curMode(), DELETE_CYCLE_TICKS, DELETE_THRESHOLD_TICKS, Colorset::equals(), g_pButton, Mode::getColorset(), Button::holdDuration(), HSVColor::hue, Mode::init(), Menu::leaveMenu(), m_colorset, m_curPage, Menu::m_curSelection, m_newColor, m_quadrant, m_slot, m_state, Menu::m_targetLeds, MAP_IS_ONE_LED, mapGetFirstLed(), Colorset::numColors(), PAGE_SIZE, QUADRANT_FIRST, QUADRANT_LAST, Colorset::removeColor(), HSVColor::sat, sats, Colorset::set(), Mode::setColorsetMap(), STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, STATE_PICK_VAL, HSVColor::val, and vals.

@@ -943,7 +943,7 @@

MenuAction
Definition: Menu.h:19
@ MENU_CONTINUE
Definition: Menu.h:23
-

References blinkSelection(), Leds::clearAll(), Modes::curMode(), Mode::getColorset(), m_colorset, m_curPage, m_newColor, m_quadrant, m_slot, m_state, Menu::m_targetLeds, MAP_LED_ALL, mapGetFirstLed(), Menu::MENU_CONTINUE, Menu::run(), showSelection(), showSlotSelection(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, and STATE_PICK_VAL.

+

References blinkSelection(), Leds::clearAll(), Modes::curMode(), Mode::getColorset(), m_colorset, m_curPage, m_newColor, m_quadrant, m_slot, m_state, Menu::m_targetLeds, MAP_LED_ALL, mapGetFirstLed(), Menu::MENU_CONTINUE, Menu::run(), showSelection(), showSlotSelection(), STATE_INIT, STATE_PICK_HUE1, STATE_PICK_HUE2, STATE_PICK_SAT, STATE_PICK_SLOT, and STATE_PICK_VAL.

diff --git a/docs/orbit/classColorset.html b/docs/orbit/classColorset.html index b603974833..c1a4679088 100644 --- a/docs/orbit/classColorset.html +++ b/docs/orbit/classColorset.html @@ -1506,7 +1506,7 @@

References addColorWithValueStyle(), clear(), Random::next8(), numColors(), and VAL_STYLE_COUNT.

-

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

+

Referenced by Randomizer::rollColorset(), and Modes::setDefaults().

diff --git a/docs/orbit/classEditorConnection.html b/docs/orbit/classEditorConnection.html index 957b30c93d..12c800f894 100644 --- a/docs/orbit/classEditorConnection.html +++ b/docs/orbit/classEditorConnection.html @@ -454,13 +454,13 @@

312  m_state = STATE_CLEAR_DEMO;
313  }
314 }
-
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:469
-
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:486
-
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:476
-
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:481
+
#define EDITOR_VERB_PULL_MODES
Definition: VortexConfig.h:468
+
#define EDITOR_VERB_CLEAR_DEMO
Definition: VortexConfig.h:485
+
#define EDITOR_VERB_PUSH_MODES
Definition: VortexConfig.h:475
+
#define EDITOR_VERB_DEMO_MODE
Definition: VortexConfig.h:480
bool receiveMessage(const char *message)
-

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

+

References EDITOR_VERB_CLEAR_DEMO, EDITOR_VERB_DEMO_MODE, EDITOR_VERB_PULL_MODES, EDITOR_VERB_PUSH_MODES, m_state, receiveMessage(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_PULL_MODES, and STATE_PUSH_MODES.

Referenced by run().

@@ -541,11 +541,11 @@

206  SerialComs::write(EDITOR_VERB_GOODBYE);
207  Menu::leaveMenu(true);
208 }
-
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:492
+
#define EDITOR_VERB_GOODBYE
Definition: VortexConfig.h:491
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:208
static void write(const char *msg,...)
Definition: Serial.cpp:74
-

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

+

References EDITOR_VERB_GOODBYE, Menu::leaveMenu(), and SerialComs::write().

Referenced by onLongClick(), and onLongClick2().

@@ -907,10 +907,10 @@

267  Modes::saveStorage();
268  return true;
269 }
-
static bool saveStorage()
Definition: Modes.cpp:170
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:110
+
static bool saveStorage()
Definition: Modes.cpp:209
+
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:148
-

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

+

References ByteStream::clear(), ByteStream::data(), Modes::loadFromBuffer(), m_receiveBuffer, ByteStream::peek32(), ByteStream::rawData(), ByteStream::rawSize(), ByteStream::resetUnserializer(), Modes::saveStorage(), ByteStream::size(), and ByteStream::unserialize().

Referenced by run().

@@ -1049,13 +1049,13 @@

174  }
175  return MENU_CONTINUE;
176 }
-
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:478
-
#define EDITOR_VERB_READY
Definition: VortexConfig.h:466
-
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:457
-
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:471
-
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:488
-
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:483
-
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:473
+
#define EDITOR_VERB_PUSH_MODES_ACK
Definition: VortexConfig.h:477
+
#define EDITOR_VERB_READY
Definition: VortexConfig.h:465
+
#define EDITOR_VERB_GREETING
Definition: VortexConfig.h:456
+
#define EDITOR_VERB_PULL_MODES_DONE
Definition: VortexConfig.h:470
+
#define EDITOR_VERB_CLEAR_DEMO_ACK
Definition: VortexConfig.h:487
+
#define EDITOR_VERB_DEMO_MODE_ACK
Definition: VortexConfig.h:482
+
#define EDITOR_VERB_PULL_MODES_ACK
Definition: VortexConfig.h:472
@@ -1069,7 +1069,7 @@

static bool isConnected()
Definition: Serial.cpp:34
static bool isSending()
Definition: VLSender.h:25
-

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), VLSender::isSending(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), VLSender::send(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, STATE_SEND_MODE_VL, and SerialComs::write().

+

References SerialComs::checkSerial(), ByteStream::clear(), clearDemo(), EDITOR_VERB_CLEAR_DEMO_ACK, EDITOR_VERB_DEMO_MODE_ACK, EDITOR_VERB_GREETING, EDITOR_VERB_PULL_MODES_ACK, EDITOR_VERB_PULL_MODES_DONE, EDITOR_VERB_PUSH_MODES_ACK, EDITOR_VERB_READY, handleCommand(), SerialComs::isConnected(), VLSender::isSending(), m_receiveBuffer, m_state, Menu::MENU_CONTINUE, receiveData(), receiveDemoMode(), receiveMessage(), receiveModes(), Menu::run(), VLSender::send(), sendModes(), showEditor(), STATE_CLEAR_DEMO, STATE_DEMO_MODE, STATE_DEMO_MODE_DONE, STATE_DEMO_MODE_RECEIVE, STATE_DISCONNECTED, STATE_GREETING, STATE_IDLE, STATE_PULL_MODES, STATE_PULL_MODES_DONE, STATE_PULL_MODES_SEND, STATE_PUSH_MODES, STATE_PUSH_MODES_DONE, STATE_PUSH_MODES_RECEIVE, STATE_SEND_MODE_VL, and SerialComs::write().

@@ -1102,9 +1102,9 @@

237  Modes::saveToBuffer(modesBuffer);
238  SerialComs::write(modesBuffer);
239 }
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:83
+
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:130
-

References Modes::saveToBuffer(), and SerialComs::write().

+

References Modes::saveToBuffer(), and SerialComs::write().

Referenced by run().

diff --git a/docs/orbit/classFactoryReset.html b/docs/orbit/classFactoryReset.html index 4fd68d3828..f00285c911 100644 --- a/docs/orbit/classFactoryReset.html +++ b/docs/orbit/classFactoryReset.html @@ -301,9 +301,9 @@

virtual bool init()
Definition: Menu.cpp:78
Definition: Mode.h:38
bool isMultiLed() const
Definition: Mode.cpp:764
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
-

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, MAP_LED, and QUADRANT_LAST.

+

References Modes::curMode(), DEBUG_LOG, Menu::init(), Mode::isMultiLed(), LED_MULTI, Menu::m_advanced, Menu::m_curSelection, Menu::m_ledSelected, Menu::m_targetLeds, MAP_LED, and QUADRANT_LAST.

@@ -356,7 +356,7 @@

109  if (m_advanced) {
110  uint8_t curModeIndex = Modes::curModeIndex();
111  // reset the target mode slot on the target led
-
112  const default_mode_entry &def = default_modes[curModeIndex];
+
112  const default_mode_entry &def = default_modes[curModeIndex];
113  Colorset set(def.numColors, def.cols);
114  Mode *cur = Modes::curMode();
115  cur->setPatternMap(m_targetLeds, def.patternID, nullptr, &set);
@@ -372,7 +372,7 @@

125  leaveMenu(true);
126 }
Button * g_pButton
Definition: Buttons.cpp:16
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
@ QUADRANT_COUNT
Definition: LedTypes.h:116
#define MS_TO_TICKS(ms)
Definition: TimeControl.h:13
#define FACTORY_RESET_THRESHOLD_TICKS
Definition: Timings.h:18
@@ -383,9 +383,9 @@

virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:208
bool setPatternMap(LedMap pos, PatternID pat, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:558
virtual void init()
Definition: Mode.cpp:120
-
static void resetFlags()
Definition: Modes.cpp:594
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:438
-
static bool setDefaults()
Definition: Modes.cpp:256
+
static void resetFlags()
Definition: Modes.cpp:663
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:507
+
static bool setDefaults()
Definition: Modes.cpp:325
static uint8_t curModeIndex()
Definition: Modes.h:93
static void setAutoCycle(bool enabled)
Definition: VortexEngine.h:48
Definition: DefaultModes.h:9
@@ -393,7 +393,7 @@

PatternID patternID
Definition: DefaultModes.h:10
uint8_t numColors
Definition: DefaultModes.h:11
-

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, QUADRANT_COUNT, QUADRANT_LAST, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

+

References default_mode_entry::cols, Modes::curMode(), Modes::curModeIndex(), DEFAULT_BRIGHTNESS, default_modes, FACTORY_RESET_THRESHOLD_TICKS, g_pButton, Button::holdDuration(), Mode::init(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_curSelection, Menu::m_targetLeds, MS_TO_TICKS, default_mode_entry::numColors, default_mode_entry::patternID, QUADRANT_COUNT, QUADRANT_LAST, Modes::resetFlags(), VortexEngine::setAutoCycle(), Leds::setBrightness(), Modes::setCurMode(), Modes::setDefaults(), and Mode::setPatternMap().

diff --git a/docs/orbit/classGlobalBrightness.html b/docs/orbit/classGlobalBrightness.html index 28172f0682..f42d4fce53 100644 --- a/docs/orbit/classGlobalBrightness.html +++ b/docs/orbit/classGlobalBrightness.html @@ -567,10 +567,10 @@

BRIGHTNESS_OPTION_3,
}
-
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:283
-
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:282
-
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:281
-
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_4
Definition: VortexConfig.h:282
+
#define BRIGHTNESS_OPTION_3
Definition: VortexConfig.h:281
+
#define BRIGHTNESS_OPTION_2
Definition: VortexConfig.h:280
+
#define BRIGHTNESS_OPTION_1
Definition: VortexConfig.h:279

Definition at line 25 of file GlobalBrightness.h.

diff --git a/docs/orbit/classLeds.html b/docs/orbit/classLeds.html index e9c53b5525..e1252eca99 100644 --- a/docs/orbit/classLeds.html +++ b/docs/orbit/classLeds.html @@ -1412,7 +1412,7 @@

References HSV_OFF, and setAll().

-

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ColorSelect::onLongClick(), ColorSelect::onLongClick2(), ColorSelect::onShortClick(), ModeSharing::onShortClick(), ColorSelect::onShortClick2(), ModeSharing::onShortClick2(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), ModeSharing::showSendModeIR(), ModeSharing::showSendModeVL(), VLSender::startPWM(), and VLSender::stopPWM().

+

Referenced by BlinkStepPattern::blinkOff(), DripMorphPattern::blinkOff(), LighthousePattern::blinkOff(), MeteorPattern::blinkOff(), Modes::clearModes(), Menus::closeCurMenu(), ZigzagPattern::Snake::draw(), VortexEngine::enterSleep(), ColorSelect::onLongClick(), ColorSelect::onLongClick2(), ColorSelect::onShortClick(), ModeSharing::onShortClick(), ColorSelect::onShortClick2(), ModeSharing::onShortClick2(), Menus::openMenu(), Menus::openMenuSelection(), Modes::play(), HueShiftPattern::play(), ColorSelect::run(), Menus::runMenuSelection(), Modes::setCurMode(), Menu::showBulbSelection(), EditorConnection::showEditor(), ModeSharing::showSendModeIR(), ModeSharing::showSendModeVL(), VLSender::startPWM(), and VLSender::stopPWM().

@@ -1916,7 +1916,7 @@

References m_brightness.

-

Referenced by GlobalBrightness::init(), Modes::saveToBuffer(), and VLSender::startPWM().

+

Referenced by GlobalBrightness::init(), Modes::serializeSaveHeader(), and VLSender::startPWM().

@@ -2252,7 +2252,7 @@

References m_brightness.

-

Referenced by Modes::loadFromBuffer(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), and VLSender::startPWM().

+

Referenced by FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), VLSender::startPWM(), and Modes::unserializeSaveHeader().

diff --git a/docs/orbit/classMenu.html b/docs/orbit/classMenu.html index c7900081e9..ee9de7cd14 100644 --- a/docs/orbit/classMenu.html +++ b/docs/orbit/classMenu.html @@ -486,12 +486,12 @@

@ PATTERN_STROBE
Definition: Patterns.h:25
Mode m_previewMode
Definition: Menu.h:54
virtual void init()
Definition: Mode.cpp:120
-
static Mode * curMode()
Definition: Modes.cpp:478
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:368
+
static Mode * curMode()
Definition: Modes.cpp:547
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:437
static uint8_t numModes()
Definition: Modes.h:92
-

References Modes::addMode(), Modes::curMode(), Mode::init(), m_curSelection, m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, QUADRANT_FIRST, and RGB_OFF.

+

References Modes::addMode(), Modes::curMode(), Mode::init(), m_curSelection, m_previewMode, m_shouldClose, Modes::numModes(), PATTERN_STROBE, QUADRANT_FIRST, and RGB_OFF.

Referenced by ColorSelect::init(), EditorConnection::init(), FactoryReset::init(), GlobalBrightness::init(), ModeSharing::init(), PatternSelect::init(), Randomizer::init(), and Menus::openMenu().

@@ -530,9 +530,9 @@

212  Modes::saveStorage();
213  }
214 }
-
static bool saveStorage()
Definition: Modes.cpp:170
+
static bool saveStorage()
Definition: Modes.cpp:209
-

References m_shouldClose, and Modes::saveStorage().

+

References m_shouldClose, and Modes::saveStorage().

Referenced by EditorConnection::leaveMenu(), onLongClick(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), GlobalBrightness::onLongClick(), ModeSharing::onLongClick(), PatternSelect::onLongClick(), Randomizer::onLongClick(), ColorSelect::onLongClick2(), FactoryReset::onLongClick2(), GlobalBrightness::onLongClick2(), ModeSharing::onLongClick2(), PatternSelect::onLongClick2(), and ModeSharing::receiveModeIR().

diff --git a/docs/orbit/classMode.html b/docs/orbit/classMode.html index 4c30dcc376..aa952af02c 100644 --- a/docs/orbit/classMode.html +++ b/docs/orbit/classMode.html @@ -917,7 +917,7 @@

References getPattern(), Pattern::getPatternID(), and PATTERN_NONE.

-

Referenced by isEmpty(), PatternSelect::nextPattern(), PatternSelect::onLongClick(), PatternSelect::previousPattern(), Randomizer::run(), and Modes::setCurMode().

+

Referenced by isEmpty(), PatternSelect::nextPattern(), PatternSelect::onLongClick(), PatternSelect::previousPattern(), Randomizer::run(), and Modes::setCurMode().

@@ -1137,7 +1137,7 @@

References Pattern::init(), LED_FIRST, m_multiPat, m_singlePats, and MODE_LEDCOUNT.

-

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), PatternSelect::nextPattern(), PatternSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), PatternSelect::previousPattern(), Randomizer::reRoll(), and Randomizer::run().

+

Referenced by Modes::addMode(), Modes::addSerializedMode(), EditorConnection::clearDemo(), Menu::init(), loadFromBuffer(), PatternSelect::nextPattern(), PatternSelect::onLedSelected(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), PatternSelect::previousPattern(), Randomizer::reRoll(), and Randomizer::run().

@@ -1268,7 +1268,7 @@

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, init(), ByteStream::resetUnserializer(), unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), and IRReceiver::receiveMode().

+

Referenced by Modes::ModeLink::instantiate(), EditorConnection::receiveDemoMode(), and IRReceiver::receiveMode().

@@ -1473,7 +1473,7 @@

References ByteStream::compress(), DEBUG_LOGF, serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

-

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

+

Referenced by Modes::ModeLink::init(), IRSender::loadMode(), and VLSender::loadMode().

@@ -1561,7 +1561,7 @@

References getFlags(), getSingleLedMap(), LED_FIRST, m_multiPat, m_singlePats, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, MODE_LEDCOUNT, Pattern::serialize(), and ByteStream::serialize().

-

Referenced by saveToBuffer(), and Modes::serialize().

+

Referenced by Modes::saveStorage(), saveToBuffer(), and Modes::serialize().

@@ -2030,7 +2030,7 @@

References Pattern::bind(), clearPattern(), PatternBuilder::dupe(), Pattern::init(), LED_ALL, LED_COUNT, LED_FIRST, m_multiPat, m_singlePats, MAP_FOREACH_LED, MODE_FLAG_ALL_SAME_SINGLE, MODE_FLAG_MULTI_LED, MODE_FLAG_SINGLE_LED, MODE_FLAG_SPARSE_SINGLES, PatternBuilder::unserialize(), and ByteStream::unserialize().

-

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

+

Referenced by Modes::addSerializedMode(), and loadFromBuffer().

diff --git a/docs/orbit/classModeSharing.html b/docs/orbit/classModeSharing.html index 36615b4423..c2005d8a2d 100644 --- a/docs/orbit/classModeSharing.html +++ b/docs/orbit/classModeSharing.html @@ -389,9 +389,9 @@

static bool send()
Definition: IRSender.cpp:83
void beginReceivingIR()
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
-

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, IRSender::isSending(), IRSender::loadMode(), m_sharingMode, IRSender::send(), and SHARE_SEND_IR.

+

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, IRSender::isSending(), IRSender::loadMode(), m_sharingMode, IRSender::send(), and SHARE_SEND_IR.

Referenced by onShortClick().

@@ -441,7 +441,7 @@

static bool send()
Definition: VLSender.cpp:76
static bool isSending()
Definition: VLSender.h:25
-

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, VLSender::isSending(), VLSender::loadMode(), m_sharingMode, VLSender::send(), and SHARE_SEND_VL.

+

References beginReceivingIR(), Modes::curMode(), ERROR_LOG, VLSender::isSending(), VLSender::loadMode(), m_sharingMode, VLSender::send(), and SHARE_SEND_VL.

Referenced by onShortClick2().

@@ -608,9 +608,9 @@

106 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:208
Mode m_previewMode
Definition: Menu.h:54
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:418
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:487
-

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), Menu::m_previewMode, and Modes::updateCurMode().

@@ -801,7 +801,7 @@

bool m_advanced
Definition: Menu.h:67
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

+

References IRReceiver::dataReady(), DEBUG_LOG, DEBUG_LOGF, ERROR_LOG, Time::getCurtime(), Menu::leaveMenu(), Menu::m_advanced, Menu::m_previewMode, m_timeOutStartTime, MAX_TIMEOUT_DURATION, IRReceiver::onNewData(), IRReceiver::receiveMode(), IRReceiver::resetIRState(), and Modes::updateCurMode().

Referenced by run().

diff --git a/docs/orbit/classModes-members.html b/docs/orbit/classModes-members.html index dcee8b8a9c..dfebd0dbea 100644 --- a/docs/orbit/classModes-members.html +++ b/docs/orbit/classModes-members.html @@ -128,17 +128,19 @@ saveStorage()Modesstatic saveToBuffer(ByteStream &saveBuffer)Modesstatic serialize(ByteStream &buffer)Modesstatic - setAdvancedMenus(bool active, bool save=true)Modesinlinestatic - setCurMode(uint8_t index)Modesstatic - setDefaults()Modesstatic - setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic - setKeychainMode(bool active, bool save=true)Modesinlinestatic - setLocked(bool locked, bool save=true)Modesinlinestatic - setOneClickMode(bool enable, bool save=true)Modesinlinestatic - setStartupMode(uint8_t index)Modesstatic - shiftCurMode(int32_t offset=1)Modesstatic - startupMode()Modesstatic - unserialize(ByteStream &buffer)Modesstatic + serializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic + setAdvancedMenus(bool active, bool save=true)Modesinlinestatic + setCurMode(uint8_t index)Modesstatic + setDefaults()Modesstatic + setFlag(uint8_t flag, bool enable, bool save=true)Modesstatic + setKeychainMode(bool active, bool save=true)Modesinlinestatic + setLocked(bool locked, bool save=true)Modesinlinestatic + setOneClickMode(bool enable, bool save=true)Modesinlinestatic + setStartupMode(uint8_t index)Modesstatic + shiftCurMode(int32_t offset=1)Modesstatic + startupMode()Modesstatic + unserialize(ByteStream &buffer)Modesstatic + unserializeSaveHeader(ByteStream &saveBuffer)Modesprivatestatic updateCurMode(const Mode *mode)Modesstatic diff --git a/docs/orbit/classModes.html b/docs/orbit/classModes.html index 5f485e61c6..80edb396a8 100644 --- a/docs/orbit/classModes.html +++ b/docs/orbit/classModes.html @@ -198,6 +198,10 @@ + + + + @@ -274,36 +278,36 @@

-

Definition at line 394 of file Modes.cpp.

-
395 {
-
396 #if MAX_MODES != 0
-
397  // max modes
-
398  if (m_numModes >= MAX_MODES) {
-
399  return false;
-
400  }
-
401 #endif
-
402  if (!m_storedModes) {
-
403  m_storedModes = new ModeLink(mode);
-
404  if (!m_storedModes) {
- -
406  return false;
-
407  }
-
408  } else {
-
409  if (!m_storedModes->append(mode)) {
- -
411  return false;
-
412  }
-
413  }
-
414  m_numModes++;
-
415  return true;
-
416 }
+

Definition at line 463 of file Modes.cpp.

+
464 {
+
465 #if MAX_MODES != 0
+
466  // max modes
+
467  if (m_numModes >= MAX_MODES) {
+
468  return false;
+
469  }
+
470 #endif
+
471  if (!m_storedModes) {
+
472  m_storedModes = new ModeLink(mode);
+
473  if (!m_storedModes) {
+ +
475  return false;
+
476  }
+
477  } else {
+
478  if (!m_storedModes->append(mode)) {
+ +
480  return false;
+
481  }
+
482  }
+
483  m_numModes++;
+
484  return true;
+
485 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
-
#define MAX_MODES
Definition: VortexConfig.h:168
- -
static ModeLink * m_storedModes
Definition: Modes.h:220
-
static uint8_t m_numModes
Definition: Modes.h:214
+
#define MAX_MODES
Definition: VortexConfig.h:167
+ +
static ModeLink * m_storedModes
Definition: Modes.h:223
+
static uint8_t m_numModes
Definition: Modes.h:217
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -347,29 +351,29 @@

-

Definition at line 375 of file Modes.cpp.

-
376 {
-
377  // max modes
-
378 #if MAX_MODES != 0
-
379  if (m_numModes >= MAX_MODES) {
-
380  return false;
-
381  }
-
382 #endif
-
383  if (id >= PATTERN_COUNT) {
-
384  return false;
-
385  }
-
386  Mode tmpMode(id, args, set);
-
387  // must init the mode so that it can be serialized
-
388  tmpMode.init();
-
389  // not a very good way to do this but it ensures the mode is
-
390  // added in the same way
-
391  return addMode(&tmpMode);
-
392 }
+

Definition at line 444 of file Modes.cpp.

+
445 {
+
446  // max modes
+
447 #if MAX_MODES != 0
+
448  if (m_numModes >= MAX_MODES) {
+
449  return false;
+
450  }
+
451 #endif
+
452  if (id >= PATTERN_COUNT) {
+
453  return false;
+
454  }
+
455  Mode tmpMode(id, args, set);
+
456  // must init the mode so that it can be serialized
+
457  tmpMode.init();
+
458  // not a very good way to do this but it ensures the mode is
+
459  // added in the same way
+
460  return addMode(&tmpMode);
+
461 }
@ PATTERN_COUNT
Definition: Patterns.h:101
Definition: Mode.h:38
-
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:368
+
static bool addMode(PatternID id, RGBColor c1, RGBColor c2=RGB_OFF, RGBColor c3=RGB_OFF, RGBColor c4=RGB_OFF, RGBColor c5=RGB_OFF, RGBColor c6=RGB_OFF, RGBColor c7=RGB_OFF, RGBColor c8=RGB_OFF)
Definition: Modes.cpp:437
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and PATTERN_COUNT.

@@ -449,14 +453,14 @@

-

Definition at line 368 of file Modes.cpp.

-
370 {
-
371  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
-
372  return addMode(id, nullptr, &set);
-
373 }
+

Definition at line 437 of file Modes.cpp.

+
439 {
+
440  Colorset set(c1, c2, c3, c4, c5, c6, c7, c8);
+
441  return addMode(id, nullptr, &set);
+
442 }
-

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

+

Referenced by addMode(), addSerializedMode(), Menu::init(), and setDefaults().

@@ -484,23 +488,23 @@

-

Definition at line 311 of file Modes.cpp.

-
312 {
-
313 #if MAX_MODES != 0
-
314  if (m_numModes >= MAX_MODES) {
-
315  return false;
-
316  }
-
317 #endif
-
318  if (!m_storedModes->append(serializedMode)) {
- -
320  return false;
-
321  }
-
322  // increment mode counter
-
323  m_numModes++;
-
324  return true;
-
325 }
+

Definition at line 380 of file Modes.cpp.

+
381 {
+
382 #if MAX_MODES != 0
+
383  if (m_numModes >= MAX_MODES) {
+
384  return false;
+
385  }
+
386 #endif
+
387  if (!m_storedModes->append(serializedMode)) {
+ +
389  return false;
+
390  }
+
391  // increment mode counter
+
392  m_numModes++;
+
393  return true;
+
394 }
-

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

+

References Modes::ModeLink::append(), ERROR_OUT_OF_MEMORY, m_numModes, m_storedModes, and MAX_MODES.

@@ -528,31 +532,31 @@

-

Definition at line 291 of file Modes.cpp.

-
292 {
-
293 #if MAX_MODES != 0
-
294  if (m_numModes >= MAX_MODES) {
-
295  return false;
-
296  }
-
297 #endif
-
298  // we must unserialize then re-serialize here because the
-
299  // input argument may contain other patterns in the buffer
-
300  // so we cannot just append the input arg to m_storedModes
-
301  Mode tmpMode;
-
302  if (!tmpMode.unserialize(serializedMode)) {
-
303  return false;
-
304  }
-
305  // initialize the mode because a pattern could theoretically serialize
-
306  // differently after it has initialized
-
307  tmpMode.init();
-
308  return addMode(&tmpMode);
-
309 }
+

Definition at line 360 of file Modes.cpp.

+
361 {
+
362 #if MAX_MODES != 0
+
363  if (m_numModes >= MAX_MODES) {
+
364  return false;
+
365  }
+
366 #endif
+
367  // we must unserialize then re-serialize here because the
+
368  // input argument may contain other patterns in the buffer
+
369  // so we cannot just append the input arg to m_storedModes
+
370  Mode tmpMode;
+
371  if (!tmpMode.unserialize(serializedMode)) {
+
372  return false;
+
373  }
+
374  // initialize the mode because a pattern could theoretically serialize
+
375  // differently after it has initialized
+
376  tmpMode.init();
+
377  return addMode(&tmpMode);
+
378 }
virtual void init()
Definition: Mode.cpp:120
virtual bool unserialize(ByteStream &buffer)
Definition: Mode.cpp:253
-

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

+

References addMode(), Mode::init(), m_numModes, MAX_MODES, and Mode::unserialize().

-

Referenced by unserialize().

+

Referenced by loadStorage(), and unserialize().

@@ -584,9 +588,9 @@

133  return getFlag(MODES_FLAG_ADV_MENUS);
134  }
#define MODES_FLAG_ADV_MENUS
Definition: Modes.h:22
-
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:589
+
static bool getFlag(uint8_t flag)
Definition: Modes.cpp:658
-

References getFlag(), and MODES_FLAG_ADV_MENUS.

+

References getFlag(), and MODES_FLAG_ADV_MENUS.

Referenced by Menus::runMenuSelection().

@@ -619,9 +623,9 @@

54 {
55  clearModes();
56 }
-
static void clearModes()
Definition: Modes.cpp:548
+
static void clearModes()
Definition: Modes.cpp:617
-

References clearModes().

+

References clearModes().

Referenced by VortexEngine::cleanup().

@@ -650,25 +654,25 @@

-

Definition at line 548 of file Modes.cpp.

-
549 {
-
550  if (!m_numModes || !m_storedModes) {
-
551  return;
-
552  }
-
553  // delete the first node and it will delete the entire chain
-
554  delete m_storedModes;
-
555  m_pCurModeLink = nullptr;
-
556  m_storedModes = nullptr;
-
557  m_numModes = 0;
-
558  // might as well clear the leds
-
559  Leds::clearAll();
-
560 }
+

Definition at line 617 of file Modes.cpp.

+
618 {
+
619  if (!m_numModes || !m_storedModes) {
+
620  return;
+
621  }
+
622  // delete the first node and it will delete the entire chain
+
623  delete m_storedModes;
+
624  m_pCurModeLink = nullptr;
+
625  m_storedModes = nullptr;
+
626  m_numModes = 0;
+
627  // might as well clear the leds
+
628  Leds::clearAll();
+
629 }
static void clearAll()
Definition: Leds.h:30
-
static ModeLink * m_pCurModeLink
Definition: Modes.h:217
+
static ModeLink * m_pCurModeLink
Definition: Modes.h:220
-

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

+

References Leds::clearAll(), m_numModes, m_pCurModeLink, and m_storedModes.

-

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

+

Referenced by cleanup(), loadStorage(), setDefaults(), and unserialize().

@@ -695,28 +699,28 @@

-

Definition at line 478 of file Modes.cpp.

-
479 {
-
480  // empty mode list
-
481  if (!m_numModes) {
-
482  return nullptr;
-
483  }
-
484  if (!m_pCurModeLink) {
-
485  if (!initCurMode()) {
-
486  ERROR_LOG("Failed to initialize current mode");
-
487  return nullptr;
-
488  }
-
489  }
-
490  // get current mode, instantiate it if necessary
-
491  return m_pCurModeLink->instantiate();
-
492 }
+

Definition at line 547 of file Modes.cpp.

+
548 {
+
549  // empty mode list
+
550  if (!m_numModes) {
+
551  return nullptr;
+
552  }
+
553  if (!m_pCurModeLink) {
+
554  if (!initCurMode()) {
+
555  ERROR_LOG("Failed to initialize current mode");
+
556  return nullptr;
+
557  }
+
558  }
+
559  // get current mode, instantiate it if necessary
+
560  return m_pCurModeLink->instantiate();
+
561 }
#define ERROR_LOG(msg)
Definition: Log.h:29
- -
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:676
+ +
static Mode * initCurMode(bool force=false)
Definition: Modes.cpp:745
-

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

+

References ERROR_LOG, initCurMode(), Modes::ModeLink::instantiate(), m_numModes, and m_pCurModeLink.

-

Referenced by ModeSharing::beginSendingIR(), ModeSharing::beginSendingVL(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), nextModeSkipEmpty(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), PatternSelect::previousPattern(), ColorSelect::run(), and updateCurMode().

+

Referenced by ModeSharing::beginSendingIR(), ModeSharing::beginSendingVL(), VortexEngine::curMode(), Menu::init(), ColorSelect::init(), FactoryReset::init(), Randomizer::init(), nextModeSkipEmpty(), ColorSelect::onLongClick(), FactoryReset::onLongClick(), PatternSelect::onLongClick(), PatternSelect::previousPattern(), ColorSelect::run(), and updateCurMode().

@@ -745,9 +749,9 @@

Definition at line 93 of file Modes.h.

93 { return m_curMode; }
-
static uint8_t m_curMode
Definition: Modes.h:211
+
static uint8_t m_curMode
Definition: Modes.h:214
-

References m_curMode.

+

References m_curMode.

Referenced by VortexEngine::enterSleep(), and FactoryReset::onLongClick().

@@ -776,29 +780,29 @@

-

Definition at line 527 of file Modes.cpp.

-
528 {
-
529  if (!m_numModes || !m_pCurModeLink) {
-
530  return;
-
531  }
-
532  // unlink the current mode so it can be deleted and
-
533  // update the current mode link accordingly
-
534  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
-
535  delete m_pCurModeLink;
-
536  m_pCurModeLink = newCur;
-
537  if (m_curMode) {
-
538  m_curMode--;
-
539  } else {
- -
541  }
-
542  m_numModes--;
-
543  if (!m_numModes) {
-
544  m_storedModes = nullptr;
-
545  }
-
546 }
- +

Definition at line 596 of file Modes.cpp.

+
597 {
+
598  if (!m_numModes || !m_pCurModeLink) {
+
599  return;
+
600  }
+
601  // unlink the current mode so it can be deleted and
+
602  // update the current mode link accordingly
+
603  ModeLink *newCur = m_pCurModeLink->unlinkSelf();
+
604  delete m_pCurModeLink;
+
605  m_pCurModeLink = newCur;
+
606  if (m_curMode) {
+
607  m_curMode--;
+
608  } else {
+ +
610  }
+
611  m_numModes--;
+
612  if (!m_numModes) {
+
613  m_storedModes = nullptr;
+
614  }
+
615 }
+
-

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

+

References m_curMode, m_numModes, m_pCurModeLink, m_storedModes, and Modes::ModeLink::unlinkSelf().

@@ -826,13 +830,13 @@

-

Definition at line 589 of file Modes.cpp.

-
590 {
-
591  return ((m_globalFlags & flag) != 0);
-
592 }
-
static uint8_t m_globalFlags
Definition: Modes.h:223
+

Definition at line 658 of file Modes.cpp.

+
659 {
+
660  return ((m_globalFlags & flag) != 0);
+
661 }
+
static uint8_t m_globalFlags
Definition: Modes.h:226
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by advancedMenusEnabled(), keychainModeEnabled(), locked(), and oneClickModeEnabled().

@@ -862,23 +866,23 @@

-

Definition at line 663 of file Modes.cpp.

-
664 {
-
665  if (index >= m_numModes) {
-
666  return nullptr;
-
667  }
-
668  ModeLink *ptr = m_storedModes;
-
669  while (index > 0 && ptr) {
-
670  ptr = ptr->next();
-
671  index--;
-
672  }
-
673  return ptr;
-
674 }
- +

Definition at line 732 of file Modes.cpp.

+
733 {
+
734  if (index >= m_numModes) {
+
735  return nullptr;
+
736  }
+
737  ModeLink *ptr = m_storedModes;
+
738  while (index > 0 && ptr) {
+
739  ptr = ptr->next();
+
740  index--;
+
741  }
+
742  return ptr;
+
743 }
+
-

References m_numModes, m_storedModes, and Modes::ModeLink::next().

+

References m_numModes, m_storedModes, and Modes::ModeLink::next().

-

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

+

Referenced by initCurMode(), setCurMode(), and shiftCurMode().

@@ -927,11 +931,11 @@

49 #endif
50  return true;
51 }
-
static bool saveStorage()
Definition: Modes.cpp:170
-
static bool setDefaults()
Definition: Modes.cpp:256
-
static bool loadStorage()
Definition: Modes.cpp:153
+
static bool saveStorage()
Definition: Modes.cpp:209
+
static bool setDefaults()
Definition: Modes.cpp:325
+
static bool loadStorage()
Definition: Modes.cpp:172
-

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

+

References loadStorage(), m_globalFlags, MODES_FLAG_ADV_MENUS, saveStorage(), and setDefaults().

Referenced by VortexEngine::init().

@@ -961,31 +965,31 @@

-

Definition at line 676 of file Modes.cpp.

-
677 {
-
678  if (!m_numModes) {
-
679  return nullptr;
-
680  }
-
681  // cleanup the current mode link
-
682  if (m_pCurModeLink) {
- -
684  }
-
685  // update the current mode link based on the curmode index
- -
687  if (!m_pCurModeLink) {
-
688  return nullptr;
-
689  }
-
690  if (force) {
- -
692  }
-
693  return m_pCurModeLink->instantiate();
-
694 }
- -
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:663
+

Definition at line 745 of file Modes.cpp.

+
746 {
+
747  if (!m_numModes) {
+
748  return nullptr;
+
749  }
+
750  // cleanup the current mode link
+
751  if (m_pCurModeLink) {
+ +
753  }
+
754  // update the current mode link based on the curmode index
+ +
756  if (!m_pCurModeLink) {
+
757  return nullptr;
+
758  }
+
759  if (force) {
+ +
761  }
+
762  return m_pCurModeLink->instantiate();
+
763 }
+ +
static ModeLink * getModeLink(uint32_t index)
Definition: Modes.cpp:732
-

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

+

References getModeLink(), Modes::ModeLink::instantiate(), m_curMode, m_numModes, m_pCurModeLink, and Modes::ModeLink::uninstantiate().

-

Referenced by curMode(), play(), and updateCurMode().

+

Referenced by curMode(), play(), and updateCurMode().

@@ -1018,7 +1022,7 @@

141  }
#define MODES_FLAG_KEYCHAIN
Definition: Modes.h:24
-

References getFlag(), and MODES_FLAG_KEYCHAIN.

+

References getFlag(), and MODES_FLAG_KEYCHAIN.

@@ -1047,9 +1051,9 @@

Definition at line 96 of file Modes.h.

96 { return m_lastSwitchTime; }
-
static uint32_t m_lastSwitchTime
Definition: Modes.h:226
+
static uint32_t m_lastSwitchTime
Definition: Modes.h:229
-

References m_lastSwitchTime.

+

References m_lastSwitchTime.

Referenced by VortexEngine::runMainLogic().

@@ -1079,59 +1083,38 @@

-

Definition at line 110 of file Modes.cpp.

-
111 {
-
112  if (!modesBuffer.decompress()) {
-
113  // failed to decompress?
-
114  return false;
-
115  }
-
116  // reset the unserializer index before unserializing anything
-
117  modesBuffer.resetUnserializer();
-
118  uint8_t major = 0;
-
119  uint8_t minor = 0;
-
120  // unserialize the vortex version
-
121  modesBuffer.unserialize(&major);
-
122  modesBuffer.unserialize(&minor);
-
123  // check the version for incompatibility
-
124  if (!VortexEngine::checkVersion(major, minor)) {
-
125  // incompatible version
-
126  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
-
127  return false;
-
128  }
-
129  // NOTE: instead of global brightness the duo uses this to store the
-
130  // startup mode ID. The duo doesn't offer a global brightness option
-
131  // unserialize the global brightness
-
132  modesBuffer.unserialize(&m_globalFlags);
-
133  // unserialize the global brightness
-
134  uint8_t brightness = 0;
-
135  modesBuffer.unserialize(&brightness);
-
136  if (brightness) {
-
137  Leds::setBrightness(brightness);
-
138  }
-
139  // now just unserialize the list of modes
-
140  if (!unserialize(modesBuffer)) {
-
141  return false;
-
142  }
-
143  // startupMode is 1-based offset that encodes both the index to start at and
-
144  // whether the system is enabled, hence why 0 cannot be used as an offset
-
145  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
-
146  if (oneClickModeEnabled() && startupMode > 0) {
-
147  // set the current mode to the startup mode
- -
149  }
-
150  return true;
-
151 }
-
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
-
static void setBrightness(uint8_t brightness)
Definition: Leds.h:124
+

Definition at line 148 of file Modes.cpp.

+
149 {
+
150  if (!modesBuffer.decompress()) {
+
151  // failed to decompress?
+
152  return false;
+
153  }
+
154  // read out the header first
+
155  if (!unserializeSaveHeader(modesBuffer)) {
+
156  return false;
+
157  }
+
158  // now just unserialize the list of modes
+
159  if (!unserialize(modesBuffer)) {
+
160  return false;
+
161  }
+
162  // startupMode is 1-based offset that encodes both the index to start at and
+
163  // whether the system is enabled, hence why 0 cannot be used as an offset
+
164  uint8_t startupMode = (m_globalFlags & 0xF0) >> 4;
+
165  if (oneClickModeEnabled() && startupMode > 0) {
+
166  // set the current mode to the startup mode
+ +
168  }
+
169  return true;
+
170 }
static bool oneClickModeEnabled()
Definition: Modes.h:118
-
static uint8_t startupMode()
Definition: Modes.cpp:570
-
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:438
-
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:226
-
static bool checkVersion(uint8_t major, uint8_t minor)
+
static bool unserializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:101
+
static uint8_t startupMode()
Definition: Modes.cpp:639
+
static Mode * setCurMode(uint8_t index)
Definition: Modes.cpp:507
+
static bool unserialize(ByteStream &buffer)
Definition: Modes.cpp:295
-

References VortexEngine::checkVersion(), ByteStream::decompress(), ERROR_LOGF, m_globalFlags, oneClickModeEnabled(), ByteStream::resetUnserializer(), Leds::setBrightness(), setCurMode(), startupMode(), unserialize(), and ByteStream::unserialize().

+

References ByteStream::decompress(), m_globalFlags, oneClickModeEnabled(), setCurMode(), startupMode(), unserialize(), and unserializeSaveHeader().

-

Referenced by loadStorage(), and EditorConnection::receiveModes().

+

Referenced by EditorConnection::receiveModes().

@@ -1158,27 +1141,50 @@

-

Definition at line 153 of file Modes.cpp.

-
154 {
-
155  // this is good on memory, but it erases what they have stored
-
156  // before we know whether there is something actually saved
-
157  clearModes();
-
158  ByteStream modesBuffer;
-
159  // only read storage if the modebuffer isn't filled
-
160  if (!Storage::read(modesBuffer) || !modesBuffer.size()) {
-
161  DEBUG_LOG("Empty buffer read from storage");
-
162  // this kinda sucks whatever they had loaded is gone
-
163  return false;
-
164  }
-
165  return loadFromBuffer(modesBuffer);
-
166 }
+

Definition at line 172 of file Modes.cpp.

+
173 {
+
174  ByteStream headerBuffer;
+
175  // only read storage if the modebuffer isn't filled
+
176  if (!Storage::read(0, headerBuffer) || !headerBuffer.size()) {
+
177  DEBUG_LOG("Empty buffer read from storage");
+
178  // this kinda sucks whatever they had loaded is gone
+
179  return false;
+
180  }
+
181  // this erases what is stored before we know whether there is data
+
182  // but it's the easiest way to just re-load new data from storage
+
183  clearModes();
+
184  // read the header and load the data
+
185  if (!unserializeSaveHeader(headerBuffer)) {
+
186  return false;
+
187  }
+
188  // unserialize the number of modes next
+
189  uint8_t numModes = 0;
+
190  headerBuffer.unserialize(&numModes);
+
191  if (!numModes) {
+
192  DEBUG_LOG("Did not find any modes");
+
193  // this kinda sucks whatever they had loaded is gone
+
194  return false;
+
195  }
+
196  // iterate each mode and read it out of it's storage slot then add it
+
197  for (uint8_t i = 0; i < numModes; ++i) {
+
198  ByteStream modeBuffer(MAX_MODE_SIZE);
+
199  // read each mode from a storage slot and load it
+
200  if (!Storage::read(i + 1, modeBuffer) || !addSerializedMode(modeBuffer)) {
+
201  return false;
+
202  }
+
203  }
+
204  return true;
+
205 }
#define DEBUG_LOG(msg)
Definition: Log.h:40
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
bool unserialize(uint8_t *byte)
Definition: ByteStream.cpp:417
uint32_t size() const
Definition: ByteStream.h:123
-
static bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:110
-
static bool read(ByteStream &buffer)
Definition: Storage.cpp:135
+
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:360
+
static uint8_t numModes()
Definition: Modes.h:92
+
static bool read(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:156
-

References clearModes(), DEBUG_LOG, loadFromBuffer(), Storage::read(), and ByteStream::size().

+

References addSerializedMode(), clearModes(), DEBUG_LOG, MAX_MODE_SIZE, numModes(), Storage::read(), ByteStream::size(), ByteStream::unserialize(), and unserializeSaveHeader().

Referenced by init().

@@ -1213,7 +1219,7 @@

127  }

#define MODES_FLAG_LOCKED
Definition: Modes.h:18
-

References getFlag(), and MODES_FLAG_LOCKED.

+

References getFlag(), and MODES_FLAG_LOCKED.

Referenced by setLocked(), and VortexEngine::tick().

@@ -1242,16 +1248,16 @@

-

Definition at line 495 of file Modes.cpp.

-
496 {
-
497  if (!m_numModes) {
-
498  return nullptr;
-
499  }
-
500  // iterate the cur mode forward
-
501  return setCurMode(m_curMode + 1);
-
502 }
+

Definition at line 564 of file Modes.cpp.

+
565 {
+
566  if (!m_numModes) {
+
567  return nullptr;
+
568  }
+
569  // iterate the cur mode forward
+
570  return setCurMode(m_curMode + 1);
+
571 }
-

References m_curMode, m_numModes, and setCurMode().

+

References m_curMode, m_numModes, and setCurMode().

@@ -1278,18 +1284,18 @@

-

Definition at line 517 of file Modes.cpp.

-
518 {
-
519  do {
-
520  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
-
521  break;
-
522  }
-
523  } while (m_curMode != 0);
-
524  return curMode();
-
525 }
-
static Mode * curMode()
Definition: Modes.cpp:478
+

Definition at line 586 of file Modes.cpp.

+
587 {
+
588  do {
+
589  if (setCurMode(m_curMode + 1) && !curMode()->isEmpty()) {
+
590  break;
+
591  }
+
592  } while (m_curMode != 0);
+
593  return curMode();
+
594 }
+
static Mode * curMode()
Definition: Modes.cpp:547
-

References curMode(), m_curMode, and setCurMode().

+

References curMode(), m_curMode, and setCurMode().

Referenced by play(), and VortexEngine::runMainLogic().

@@ -1321,9 +1327,9 @@

Definition at line 92 of file Modes.h.

92 { return m_numModes; }
-

References m_numModes.

+

References m_numModes.

-

Referenced by Menu::init(), previousMode(), and unserialize().

+

Referenced by Menu::init(), loadStorage(), previousMode(), and unserialize().

@@ -1356,9 +1362,9 @@

120  }
#define MODES_FLAG_ONE_CLICK
Definition: Modes.h:20
-

References getFlag(), and MODES_FLAG_ONE_CLICK.

+

References getFlag(), and MODES_FLAG_ONE_CLICK.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -1411,11 +1417,11 @@

Button * g_pButton
Definition: Buttons.cpp:16
Button * g_pButton2
Definition: Buttons.cpp:17
bool onShortClick() const
Definition: Button.h:34
- -
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:517
-
static Mode * previousMode()
Definition: Modes.cpp:505
+ +
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:586
+
static Mode * previousMode()
Definition: Modes.cpp:574
-

References Leds::clearAll(), DEBUG_LOG, g_pButton, g_pButton2, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), Modes::ModeLink::play(), and previousMode().

+

References Leds::clearAll(), DEBUG_LOG, g_pButton, g_pButton2, initCurMode(), m_numModes, m_pCurModeLink, nextModeSkipEmpty(), Button::onShortClick(), Modes::ModeLink::play(), and previousMode().

Referenced by VortexEngine::runMainLogic().

@@ -1444,20 +1450,19 @@

-

Definition at line 505 of file Modes.cpp.

-
506 {
-
507  if (!m_numModes) {
-
508  return nullptr;
-
509  }
-
510  // iterate the cur mode backwards
-
511  if (!m_curMode) {
-
512  return setCurMode(numModes() - 1);
-
513  }
-
514  return setCurMode(m_curMode - 1);
-
515 }
-
static uint8_t numModes()
Definition: Modes.h:92
+

Definition at line 574 of file Modes.cpp.

+
575 {
+
576  if (!m_numModes) {
+
577  return nullptr;
+
578  }
+
579  // iterate the cur mode backwards
+
580  if (!m_curMode) {
+
581  return setCurMode(numModes() - 1);
+
582  }
+
583  return setCurMode(m_curMode - 1);
+
584 }
-

References m_curMode, m_numModes, numModes(), and setCurMode().

+

References m_curMode, m_numModes, numModes(), and setCurMode().

Referenced by play().

@@ -1486,12 +1491,12 @@

-

Definition at line 594 of file Modes.cpp.

-
595 {
-
596  m_globalFlags = 0;
-
597 }
+

Definition at line 663 of file Modes.cpp.

+
664 {
+
665  m_globalFlags = 0;
+
666 }
-

References m_globalFlags.

+

References m_globalFlags.

Referenced by FactoryReset::onLongClick().

@@ -1520,21 +1525,21 @@

-

Definition at line 696 of file Modes.cpp.

-
697 {
-
698  if (!m_pCurModeLink) {
-
699  // if there's no loaded mode currently then there's nothing
-
700  // to save so there's no error
-
701  return false;
-
702  }
-
703  // force the current mode to save back to serial to catch changes
-
704  return m_pCurModeLink->save();
-
705 }
- +

Definition at line 765 of file Modes.cpp.

+
766 {
+
767  if (!m_pCurModeLink) {
+
768  // if there's no loaded mode currently then there's nothing
+
769  // to save so there's no error
+
770  return false;
+
771  }
+
772  // force the current mode to save back to serial to catch changes
+
773  return m_pCurModeLink->save();
+
774 }
+
-

References m_pCurModeLink, and Modes::ModeLink::save().

+

References m_pCurModeLink, and Modes::ModeLink::save().

-

Referenced by serialize(), and updateCurMode().

+

Referenced by saveStorage(), serialize(), and updateCurMode().

@@ -1561,31 +1566,63 @@

-

Definition at line 170 of file Modes.cpp.

-
171 {
-
172  DEBUG_LOG("Saving modes...");
-
173  // A ByteStream to hold all the serialized data
-
174  ByteStream modesBuffer(STORAGE_SIZE / 2);
-
175  // save data to the buffer
-
176  if (!saveToBuffer(modesBuffer)) {
-
177  return false;
-
178  }
-
179  // write the serial buffer to flash storage, this
-
180  // will compress the buffer and include crc/flags
-
181  if (!Storage::write(modesBuffer)) {
-
182  DEBUG_LOG("Failed to write storage");
-
183  return false;
-
184  }
-
185  DEBUG_LOG("Success saving modes to storage");
-
186  return true;
-
187 }
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
-
static bool saveToBuffer(ByteStream &saveBuffer)
Definition: Modes.cpp:83
-
static bool write(ByteStream &buffer)
Definition: Storage.cpp:58
+

Definition at line 209 of file Modes.cpp.

+
210 {
+
211  DEBUG_LOG("Saving modes...");
+
212  ByteStream headerBuffer(MAX_MODE_SIZE);
+
213  if (!serializeSaveHeader(headerBuffer)) {
+
214  return false;
+
215  }
+
216  // serialize the number of modes
+
217  if (!headerBuffer.serialize(m_numModes)) {
+
218  return false;
+
219  }
+
220  if (!Storage::write(0, headerBuffer)) {
+
221  return false;
+
222  }
+
223  // make sure the current mode is saved in case it has changed somehow
+
224  saveCurMode();
+
225  // uninstantiate cur mode so we have stack space to serialize
+
226  if (m_pCurModeLink) {
+ +
228  }
+
229  uint16_t i = 0;
+
230  ModeLink *ptr = m_storedModes;
+
231  while (ptr && i < MAX_MODES) {
+
232  ByteStream modeBuffer(MAX_MODE_SIZE);
+
233  // instantiate the mode temporarily
+
234  Mode *mode = ptr->instantiate();
+
235  if (!mode) {
+ +
237  return false;
+
238  }
+
239  // serialize it into the target modes buffer
+
240  mode->serialize(modeBuffer);
+
241  // just uninstansiate the mode after serializing
+
242  ptr->uninstantiate();
+
243  // next mode
+
244  ptr = ptr->next();
+
245  // now write this mode into a storage slot (skip first slot, that's header)
+
246  if (!Storage::write(++i, modeBuffer)) {
+
247  return false;
+
248  }
+
249  }
+
250  // reinstanstiate the current mode
+ +
252  return false;
+
253  }
+
254  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
255  return true;
+
256 }
+
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
+
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
+
static bool saveCurMode()
Definition: Modes.cpp:765
+
static bool serializeSaveHeader(ByteStream &saveBuffer)
Definition: Modes.cpp:82
+
static bool write(uint16_t slot, ByteStream &buffer)
Definition: Storage.cpp:60
-

References DEBUG_LOG, saveToBuffer(), STORAGE_SIZE, and Storage::write().

+

References DEBUG_LOG, DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, MAX_MODE_SIZE, MAX_MODES, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), serializeSaveHeader(), Modes::ModeLink::uninstantiate(), and Storage::write().

-

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

+

Referenced by VortexEngine::enterSleep(), init(), Menu::leaveMenu(), EditorConnection::receiveModes(), and setFlag().

@@ -1613,39 +1650,27 @@

-

Definition at line 83 of file Modes.cpp.

-
84 {
-
85  // serialize the engine version into the modes buffer
-
86  if (!VortexEngine::serializeVersion(modesBuffer)) {
-
87  return false;
-
88  }
-
89  // NOTE: instead of global brightness the duo uses this to store the
-
90  // startup mode ID. The duo doesn't offer a global brightness option
-
91  if (!modesBuffer.serialize(m_globalFlags)) {
-
92  return false;
-
93  }
-
94  // serialize the global brightness
-
95  if (!modesBuffer.serialize((uint8_t)Leds::getBrightness())) {
-
96  return false;
-
97  }
-
98  // serialize all modes data into the modesBuffer
-
99  if (!serialize(modesBuffer)) {
-
100  return false;
-
101  }
-
102  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
-
103  if (!modesBuffer.compress()) {
-
104  return false;
-
105  }
-
106  return true;
-
107 }
-
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
-
static uint8_t getBrightness()
Definition: Leds.h:123
-
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:190
-
static bool serializeVersion(ByteStream &stream)
+

Definition at line 130 of file Modes.cpp.

+
131 {
+
132  // first write out the header
+
133  if (!serializeSaveHeader(modesBuffer)) {
+
134  return false;
+
135  }
+
136  // serialize all modes data into the modesBuffer
+
137  if (!serialize(modesBuffer)) {
+
138  return false;
+
139  }
+
140  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
141  if (!modesBuffer.compress()) {
+
142  return false;
+
143  }
+
144  return true;
+
145 }
+
static bool serialize(ByteStream &buffer)
Definition: Modes.cpp:259
-

References ByteStream::compress(), DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, serialize(), ByteStream::serialize(), VortexEngine::serializeVersion(), and ByteStream::size().

+

References ByteStream::compress(), DEBUG_LOGF, serialize(), serializeSaveHeader(), and ByteStream::size().

-

Referenced by saveStorage(), and EditorConnection::sendModes().

+

Referenced by EditorConnection::sendModes().

@@ -1673,46 +1698,96 @@

-

Definition at line 190 of file Modes.cpp.

-
191 {
-
192  // serialize the number of modes
-
193  if (!modesBuffer.serialize(m_numModes)) {
-
194  return false;
-
195  }
-
196  // make sure the current mode is saved in case it has changed somehow
-
197  saveCurMode();
-
198  // uninstantiate cur mode so we have stack space to serialize
-
199  if (m_pCurModeLink) {
- -
201  }
-
202  ModeLink *ptr = m_storedModes;
-
203  while (ptr) {
-
204  // instantiate the mode temporarily
-
205  Mode *mode = ptr->instantiate();
-
206  if (!mode) {
- -
208  return false;
-
209  }
-
210  // serialize it into the target modes buffer
-
211  mode->serialize(modesBuffer);
-
212  // just uninstansiate the mode after serializing
-
213  ptr->uninstantiate();
-
214  // next mode
-
215  ptr = ptr->next();
-
216  }
-
217  // reinstanstiate the current mode
- -
219  return false;
-
220  }
-
221  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
-
222  return true;
-
223 }
-
virtual void serialize(ByteStream &buffer, uint8_t numLeds=0) const
Definition: Mode.cpp:207
-
static bool saveCurMode()
Definition: Modes.cpp:696
+

Definition at line 259 of file Modes.cpp.

+
260 {
+
261  // serialize the number of modes
+
262  if (!modesBuffer.serialize(m_numModes)) {
+
263  return false;
+
264  }
+
265  // make sure the current mode is saved in case it has changed somehow
+
266  saveCurMode();
+
267  // uninstantiate cur mode so we have stack space to serialize
+
268  if (m_pCurModeLink) {
+ +
270  }
+
271  ModeLink *ptr = m_storedModes;
+
272  while (ptr) {
+
273  // instantiate the mode temporarily
+
274  Mode *mode = ptr->instantiate();
+
275  if (!mode) {
+ +
277  return false;
+
278  }
+
279  // serialize it into the target modes buffer
+
280  mode->serialize(modesBuffer);
+
281  // just uninstansiate the mode after serializing
+
282  ptr->uninstantiate();
+
283  // next mode
+
284  ptr = ptr->next();
+
285  }
+
286  // reinstanstiate the current mode
+ +
288  return false;
+
289  }
+
290  DEBUG_LOGF("Serialized num modes: %u", m_numModes);
+
291  return true;
+
292 }
-

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

+

References DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Modes::ModeLink::instantiate(), m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), saveCurMode(), Mode::serialize(), ByteStream::serialize(), and Modes::ModeLink::uninstantiate().

-

Referenced by saveToBuffer().

+

Referenced by saveToBuffer().

+ +
+ + +

◆ serializeSaveHeader()

+ +
+
+

Static Private Member Functions

static bool serializeSaveHeader (ByteStream &saveBuffer)
 
static bool unserializeSaveHeader (ByteStream &saveBuffer)
 
static ModeLinkgetModeLink (uint32_t index)
 
static ModeinitCurMode (bool force=false)
+ + + + +
+ + + + + + + + +
bool Modes::serializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 82 of file Modes.cpp.

+
83 {
+
84  // serialize the engine version into the modes buffer
+
85  if (!VortexEngine::serializeVersion(saveBuffer)) {
+
86  return false;
+
87  }
+
88  // NOTE: instead of global brightness the duo uses this to store the
+
89  // startup mode ID. The duo doesn't offer a global brightness option
+
90  if (!saveBuffer.serialize(m_globalFlags)) {
+
91  return false;
+
92  }
+
93  // serialize the global brightness
+
94  if (!saveBuffer.serialize((uint8_t)Leds::getBrightness())) {
+
95  return false;
+
96  }
+
97  DEBUG_LOGF("Serialized all modes, uncompressed size: %u", modesBuffer.size());
+
98  return true;
+
99 }
+
bool serialize(uint8_t byte)
Definition: ByteStream.cpp:341
+
static uint8_t getBrightness()
Definition: Leds.h:123
+
static bool serializeVersion(ByteStream &stream)
+
+

References DEBUG_LOGF, Leds::getBrightness(), m_globalFlags, ByteStream::serialize(), and VortexEngine::serializeVersion().

+ +

Referenced by saveStorage(), and saveToBuffer().

@@ -1754,9 +1829,9 @@

129  {
130  return setFlag(MODES_FLAG_ADV_MENUS, active, save);
131  }
-
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:576
+
static bool setFlag(uint8_t flag, bool enable, bool save=true)
Definition: Modes.cpp:645
-

References MODES_FLAG_ADV_MENUS, and setFlag().

+

References MODES_FLAG_ADV_MENUS, and setFlag().

Referenced by Menus::runMenuSelection().

@@ -1786,51 +1861,51 @@

-

Definition at line 438 of file Modes.cpp.

-
439 {
-
440  if (!m_numModes) {
-
441  return nullptr;
-
442  }
-
443  // clear the LEDs when switching modes
-
444  Leds::clearAll();
-
445  // if we have a current mode open, close it
-
446  if (m_pCurModeLink) {
- -
448  }
-
449  int8_t newModeIdx = index % m_numModes;
-
450  // lookup the new mode link
-
451  ModeLink *newCurLink = getModeLink(newModeIdx);
-
452  if (!newCurLink) {
-
453  // what
-
454  return nullptr;
-
455  }
-
456  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
-
457  Mode *newCur = newCurLink->instantiate();
-
458  if (!newCur) {
- -
460  return nullptr;
-
461  }
-
462  // update to the new mode
-
463  m_curMode = newModeIdx;
-
464  m_pCurModeLink = newCurLink;
-
465  // record the current time as the last switch time
- -
467  // update the global startup mode to be this mode, if we turn off
-
468  // and turn back on into one click mode it will select this one
-
469  Modes::setStartupMode(newModeIdx);
-
470  // log the change
-
471  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
-
472  m_curMode, m_numModes - 1, newCur->getPatternID());
-
473  // return the new current mode
-
474  return newCur;
-
475 }
+

Definition at line 507 of file Modes.cpp.

+
508 {
+
509  if (!m_numModes) {
+
510  return nullptr;
+
511  }
+
512  // clear the LEDs when switching modes
+
513  Leds::clearAll();
+
514  // if we have a current mode open, close it
+
515  if (m_pCurModeLink) {
+ +
517  }
+
518  int8_t newModeIdx = index % m_numModes;
+
519  // lookup the new mode link
+
520  ModeLink *newCurLink = getModeLink(newModeIdx);
+
521  if (!newCurLink) {
+
522  // what
+
523  return nullptr;
+
524  }
+
525  // instantiate the new mode so it is ready, also so it can be checked for PATTERN_NONE
+
526  Mode *newCur = newCurLink->instantiate();
+
527  if (!newCur) {
+ +
529  return nullptr;
+
530  }
+
531  // update to the new mode
+
532  m_curMode = newModeIdx;
+
533  m_pCurModeLink = newCurLink;
+
534  // record the current time as the last switch time
+ +
536  // update the global startup mode to be this mode, if we turn off
+
537  // and turn back on into one click mode it will select this one
+
538  Modes::setStartupMode(newModeIdx);
+
539  // log the change
+
540  DEBUG_LOGF("Switch to Mode: %u / %u (pattern id: %u)",
+
541  m_curMode, m_numModes - 1, newCur->getPatternID());
+
542  // return the new current mode
+
543  return newCur;
+
544 }
PatternID getPatternID(LedPos pos=LED_ANY) const
Definition: Mode.cpp:481
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:562
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:631
static uint32_t getCurtime()
Definition: TimeControl.h:40
-

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

+

References Leds::clearAll(), DEBUG_LOGF, ERROR_OUT_OF_MEMORY, Time::getCurtime(), getModeLink(), Mode::getPatternID(), Modes::ModeLink::instantiate(), m_curMode, m_lastSwitchTime, m_numModes, m_pCurModeLink, setStartupMode(), and Modes::ModeLink::uninstantiate().

-

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

+

Referenced by loadFromBuffer(), nextMode(), nextModeSkipEmpty(), FactoryReset::onLongClick(), and previousMode().

@@ -1857,42 +1932,42 @@

-

Definition at line 256 of file Modes.cpp.

-
257 {
-
258  clearModes();
-
259 #if DEMO_ALL_PATTERNS == 1
-
260  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
-
261  PatternID default_start = PATTERN_FIRST;
-
262  PatternID default_end = PATTERN_LAST;
-
263  // add 65 randomized modes
-
264  for (int i = 0; i < 65; ++i) {
-
265  Mode tmpMode;
-
266  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
-
267  // create a random pattern ID from all patterns
- -
269  Colorset randSet;
-
270  randSet.randomize(8);
-
271  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
-
272  }
-
273  // add another mode with the given pattern and colorset
-
274  if (!addMode(&tmpMode)) {
-
275  ERROR_LOG("Failed to add mode");
-
276  // return false?
-
277  }
-
278  }
-
279  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
-
280 #else
-
281  // add each default mode with each of the given colors
-
282  for (uint8_t i = 0; i < num_default_modes; ++i) {
-
283  const default_mode_entry &def = default_modes[i];
-
284  Colorset set(def.numColors, def.cols);
-
285  addMode(def.patternID, nullptr, &set);
-
286  }
-
287 #endif
-
288  return true;
-
289 }
-
const default_mode_entry default_modes[]
Definition: DefaultModes.cpp:7
+

Definition at line 325 of file Modes.cpp.

+
326 {
+
327  clearModes();
+
328 #if DEMO_ALL_PATTERNS == 1
+
329  // RGB_RED, RGB_YELLOW, RGB_GREEN, RGB_CYAN, RGB_BLUE, RGB_PURPLE
+
330  PatternID default_start = PATTERN_FIRST;
+
331  PatternID default_end = PATTERN_LAST;
+
332  // add 65 randomized modes
+
333  for (int i = 0; i < 65; ++i) {
+
334  Mode tmpMode;
+
335  for (LedPos led = LED_FIRST; led < LED_COUNT; ++led) {
+
336  // create a random pattern ID from all patterns
+ +
338  Colorset randSet;
+
339  randSet.randomize(8);
+
340  tmpMode.setPatternAt(led, randomPattern, nullptr, &randSet);
+
341  }
+
342  // add another mode with the given pattern and colorset
+
343  if (!addMode(&tmpMode)) {
+
344  ERROR_LOG("Failed to add mode");
+
345  // return false?
+
346  }
+
347  }
+
348  DEBUG_LOGF("Added default patterns %u through %u", default_start, default_end);
+
349 #else
+
350  // add each default mode with each of the given colors
+
351  for (uint8_t i = 0; i < num_default_modes; ++i) {
+
352  const default_mode_entry &def = default_modes[i];
+
353  Colorset set(def.numColors, def.cols);
+
354  addMode(def.patternID, nullptr, &set);
+
355  }
+
356 #endif
+
357  return true;
+
358 }
const uint8_t num_default_modes
+
const default_mode_entry default_modes[MAX_MODES]
Definition: DefaultModes.cpp:7
LedPos
Definition: LedTypes.h:11
@ LED_COUNT
Definition: LedTypes.h:68
@ LED_FIRST
Definition: LedTypes.h:13
@@ -1907,7 +1982,7 @@

PatternID patternID
Definition: DefaultModes.h:10

uint8_t numColors
Definition: DefaultModes.h:11
-

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

+

References addMode(), clearModes(), default_mode_entry::cols, DEBUG_LOGF, default_modes, ERROR_LOG, LED_COUNT, LED_FIRST, num_default_modes, default_mode_entry::numColors, PATTERN_FIRST, PATTERN_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, default_mode_entry::patternID, and Colorset::randomize().

Referenced by init(), and FactoryReset::onLongClick().

@@ -1953,20 +2028,20 @@

-

Definition at line 576 of file Modes.cpp.

-
577 {
-
578  // then actually if it's enabled ensure the upper nibble is set
-
579  if (enable) {
-
580  // set the cur mode index as the upper nibble
-
581  m_globalFlags |= flag;
-
582  } else {
-
583  m_globalFlags &= ~flag;
-
584  }
-
585  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
-
586  return !save || saveStorage();
-
587 }
+

Definition at line 645 of file Modes.cpp.

+
646 {
+
647  // then actually if it's enabled ensure the upper nibble is set
+
648  if (enable) {
+
649  // set the cur mode index as the upper nibble
+
650  m_globalFlags |= flag;
+
651  } else {
+
652  m_globalFlags &= ~flag;
+
653  }
+
654  DEBUG_LOGF("Toggled instant on/off to %s", enable ? "on" : "off");
+
655  return !save || saveStorage();
+
656 }
-

References DEBUG_LOGF, m_globalFlags, and saveStorage().

+

References DEBUG_LOGF, m_globalFlags, and saveStorage().

Referenced by setAdvancedMenus(), setKeychainMode(), setLocked(), and setOneClickMode().

@@ -2011,7 +2086,7 @@

137  return setFlag(MODES_FLAG_KEYCHAIN, active, save);

138  }
-

References MODES_FLAG_KEYCHAIN, and setFlag().

+

References MODES_FLAG_KEYCHAIN, and setFlag().

@@ -2055,7 +2130,7 @@

124  }
static bool locked()
Definition: Modes.h:125
-

References locked(), MODES_FLAG_LOCKED, and setFlag().

+

References locked(), MODES_FLAG_LOCKED, and setFlag().

Referenced by VortexEngine::tick().

@@ -2100,7 +2175,7 @@

116  return setFlag(MODES_FLAG_ONE_CLICK, enable, save);
117  }
-

References MODES_FLAG_ONE_CLICK, and setFlag().

+

References MODES_FLAG_ONE_CLICK, and setFlag().

@@ -2128,17 +2203,17 @@

-

Definition at line 562 of file Modes.cpp.

-
563 {
-
564  // zero out the upper nibble to disable
-
565  m_globalFlags &= 0x0F;
-
566  // or in the index value shifted into the upper nibble
-
567  m_globalFlags |= (index << 4) & 0xF0;
-
568 }
+

Definition at line 631 of file Modes.cpp.

+
632 {
+
633  // zero out the upper nibble to disable
+
634  m_globalFlags &= 0x0F;
+
635  // or in the index value shifted into the upper nibble
+
636  m_globalFlags |= (index << 4) & 0xF0;
+
637 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by VortexEngine::enterSleep(), and setCurMode().

+

Referenced by VortexEngine::enterSleep(), and setCurMode().

@@ -2166,47 +2241,47 @@

-

Definition at line 329 of file Modes.cpp.

-
330 {
-
331  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
-
332  if (newPos >= m_numModes) {
-
333  return false;
-
334  }
-
335  if (newPos == m_curMode) {
-
336  return true;
-
337  }
-
338  // get the target mode at the position of the shift
-
339  ModeLink *target = getModeLink(newPos);
-
340  if (!target) {
-
341  // invalid new position?
-
342  return false;
-
343  }
-
344  // special case for moving first in list forward
-
345  if (!m_curMode && offset > 0) {
-
346  // update main list ptr
- -
348  }
-
349  // unlink the current link
- -
351  // update the current position to reflect our new pos
-
352  m_curMode = newPos;
-
353  // then re-link the mode at the new spot
-
354  if (offset < 0) {
-
355  // link the link before our target link
-
356  target->linkBefore(m_pCurModeLink);
-
357  // special case for moving into first in list
-
358  if (!m_curMode) {
- -
360  }
-
361  } else {
-
362  // link the link after our target link
-
363  target->linkAfter(m_pCurModeLink);
-
364  }
-
365  return true;
-
366 }
- +

Definition at line 398 of file Modes.cpp.

+
399 {
+
400  uint32_t newPos = (uint32_t)((int32_t)m_curMode + offset);
+
401  if (newPos >= m_numModes) {
+
402  return false;
+
403  }
+
404  if (newPos == m_curMode) {
+
405  return true;
+
406  }
+
407  // get the target mode at the position of the shift
+
408  ModeLink *target = getModeLink(newPos);
+
409  if (!target) {
+
410  // invalid new position?
+
411  return false;
+
412  }
+
413  // special case for moving first in list forward
+
414  if (!m_curMode && offset > 0) {
+
415  // update main list ptr
+ +
417  }
+
418  // unlink the current link
+ +
420  // update the current position to reflect our new pos
+
421  m_curMode = newPos;
+
422  // then re-link the mode at the new spot
+
423  if (offset < 0) {
+
424  // link the link before our target link
+
425  target->linkBefore(m_pCurModeLink);
+
426  // special case for moving into first in list
+
427  if (!m_curMode) {
+ +
429  }
+
430  } else {
+
431  // link the link after our target link
+
432  target->linkAfter(m_pCurModeLink);
+
433  }
+
434  return true;
+
435 }
+
-

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

+

References getModeLink(), Modes::ModeLink::linkAfter(), Modes::ModeLink::linkBefore(), m_curMode, m_numModes, m_pCurModeLink, m_storedModes, Modes::ModeLink::next(), and Modes::ModeLink::unlinkSelf().

@@ -2233,15 +2308,15 @@

-

Definition at line 570 of file Modes.cpp.

-
571 {
-
572  // zero out the upper nibble to disable
-
573  return (m_globalFlags & 0xF0) >> 4;
-
574 }
+

Definition at line 639 of file Modes.cpp.

+
640 {
+
641  // zero out the upper nibble to disable
+
642  return (m_globalFlags & 0xF0) >> 4;
+
643 }
-

References m_globalFlags.

+

References m_globalFlags.

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer().

@@ -2269,40 +2344,100 @@

-

Definition at line 226 of file Modes.cpp.

-
227 {
-
228  DEBUG_LOG("Loading modes...");
-
229  // this is good on memory, but it erases what they have stored before we
-
230  // know whether there is something actually saved in the serial buffer
-
231  clearModes();
-
232  // unserialize the number of modes next
-
233  uint8_t numModes = 0;
-
234  modesBuffer.unserialize(&numModes);
-
235  if (!numModes) {
-
236  DEBUG_LOG("Did not find any modes");
-
237  // this kinda sucks whatever they had loaded is gone
-
238  return false;
-
239  }
-
240  // foreach expected mode
-
241  for (uint8_t i = 0; i < numModes; ++i) {
-
242  // just copy the serialized mode into the internal storage because
-
243  // we store the modes in a serialized manner so that they are smaller
-
244  // then we unpack them when we instantiate the mode
-
245  if (!addSerializedMode(modesBuffer)) {
-
246  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
-
247  // clear work so far?
-
248  clearModes();
-
249  return false;
-
250  }
-
251  }
-
252  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
-
253  return (m_numModes == numModes);
-
254 }
-
static bool addSerializedMode(ByteStream &serializedMode)
Definition: Modes.cpp:291
+

Definition at line 295 of file Modes.cpp.

+
296 {
+
297  DEBUG_LOG("Loading modes...");
+
298  // this is good on memory, but it erases what they have stored before we
+
299  // know whether there is something actually saved in the serial buffer
+
300  clearModes();
+
301  // unserialize the number of modes next
+
302  uint8_t numModes = 0;
+
303  modesBuffer.unserialize(&numModes);
+
304  if (!numModes) {
+
305  DEBUG_LOG("Did not find any modes");
+
306  // this kinda sucks whatever they had loaded is gone
+
307  return false;
+
308  }
+
309  // foreach expected mode
+
310  for (uint8_t i = 0; i < numModes; ++i) {
+
311  // just copy the serialized mode into the internal storage because
+
312  // we store the modes in a serialized manner so that they are smaller
+
313  // then we unpack them when we instantiate the mode
+
314  if (!addSerializedMode(modesBuffer)) {
+
315  DEBUG_LOGF("Failed to add mode %u after unserialization", i);
+
316  // clear work so far?
+
317  clearModes();
+
318  return false;
+
319  }
+
320  }
+
321  DEBUG_LOGF("Loaded %u modes from storage (%u bytes)", numModes, modesBuffer.size());
+
322  return (m_numModes == numModes);
+
323 }
+
+

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+ +

Referenced by loadFromBuffer().

+ +
+ + +

◆ unserializeSaveHeader()

+ +
+
+ + + + + +
+ + + + + + + + +
bool Modes::unserializeSaveHeader (ByteStreamsaveBuffer)
+
+staticprivate
+
+ +

Definition at line 101 of file Modes.cpp.

+
102 {
+
103  // reset the unserializer index before unserializing anything
+
104  saveHeader.resetUnserializer();
+
105  uint8_t major = 0;
+
106  uint8_t minor = 0;
+
107  // unserialize the vortex version
+
108  saveHeader.unserialize(&major);
+
109  saveHeader.unserialize(&minor);
+
110  // check the version for incompatibility
+
111  if (!VortexEngine::checkVersion(major, minor)) {
+
112  // incompatible version
+
113  ERROR_LOGF("Incompatible savefile version: %u.%u", major, minor);
+
114  return false;
+
115  }
+
116  // NOTE: instead of global brightness the duo uses this to store the
+
117  // startup mode ID. The duo doesn't offer a global brightness option
+
118  // unserialize the global brightness
+
119  saveHeader.unserialize(&m_globalFlags);
+
120  // unserialize the global brightness
+
121  uint8_t brightness = 0;
+
122  saveHeader.unserialize(&brightness);
+
123  if (brightness) {
+
124  Leds::setBrightness(brightness);
+
125  }
+
126  return true;
+
127 }
+
#define ERROR_LOGF(msg,...)
Definition: Log.h:30
+
static void setBrightness(uint8_t brightness)
Definition: Leds.h:124
+
static bool checkVersion(uint8_t major, uint8_t minor)
-

References addSerializedMode(), clearModes(), DEBUG_LOG, DEBUG_LOGF, m_numModes, numModes(), ByteStream::size(), and ByteStream::unserialize().

+

References VortexEngine::checkVersion(), ERROR_LOGF, m_globalFlags, ByteStream::resetUnserializer(), Leds::setBrightness(), and ByteStream::unserialize().

-

Referenced by loadFromBuffer().

+

Referenced by loadFromBuffer(), and loadStorage().

@@ -2330,26 +2465,26 @@

-

Definition at line 418 of file Modes.cpp.

-
419 {
-
420  if (!mode) {
-
421  return false;
-
422  }
-
423  Mode *pCur = curMode();
-
424  if (!pCur) {
-
425  return false;
-
426  }
-
427  // utilize copy operator
-
428  *pCur = *mode;
-
429  // immediately save this mode to the internal mode storage
-
430  if (!saveCurMode()) {
-
431  return false;
-
432  }
-
433  // initialize the new mode
-
434  return initCurMode();
-
435 }
+

Definition at line 487 of file Modes.cpp.

+
488 {
+
489  if (!mode) {
+
490  return false;
+
491  }
+
492  Mode *pCur = curMode();
+
493  if (!pCur) {
+
494  return false;
+
495  }
+
496  // utilize copy operator
+
497  *pCur = *mode;
+
498  // immediately save this mode to the internal mode storage
+
499  if (!saveCurMode()) {
+
500  return false;
+
501  }
+
502  // initialize the new mode
+
503  return initCurMode();
+
504 }
-

References curMode(), initCurMode(), and saveCurMode().

+

References curMode(), initCurMode(), and saveCurMode().

Referenced by ModeSharing::onLongClick(), Randomizer::onLongClick(), and ModeSharing::receiveModeIR().

@@ -2376,9 +2511,9 @@

-

Definition at line 211 of file Modes.h.

+

Definition at line 214 of file Modes.h.

-

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

+

Referenced by curModeIndex(), deleteCurMode(), initCurMode(), nextMode(), nextModeSkipEmpty(), previousMode(), setCurMode(), and shiftCurMode().

@@ -2402,9 +2537,9 @@

-

Definition at line 223 of file Modes.h.

+

Definition at line 226 of file Modes.h.

-

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), saveToBuffer(), setFlag(), setStartupMode(), and startupMode().

+

Referenced by getFlag(), init(), loadFromBuffer(), resetFlags(), serializeSaveHeader(), setFlag(), setStartupMode(), startupMode(), and unserializeSaveHeader().

@@ -2428,9 +2563,9 @@

-

Definition at line 226 of file Modes.h.

+

Definition at line 229 of file Modes.h.

-

Referenced by lastSwitchTime(), and setCurMode().

+

Referenced by lastSwitchTime(), and setCurMode().

@@ -2454,9 +2589,9 @@

-

Definition at line 214 of file Modes.h.

+

Definition at line 217 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

+

Referenced by addMode(), addModeFromBuffer(), addSerializedMode(), clearModes(), curMode(), deleteCurMode(), getModeLink(), initCurMode(), nextMode(), numModes(), play(), previousMode(), saveStorage(), serialize(), setCurMode(), shiftCurMode(), and unserialize().

@@ -2480,9 +2615,9 @@

-

Definition at line 217 of file Modes.h.

+

Definition at line 220 of file Modes.h.

-

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), serialize(), setCurMode(), and shiftCurMode().

+

Referenced by clearModes(), curMode(), deleteCurMode(), initCurMode(), play(), saveCurMode(), saveStorage(), serialize(), setCurMode(), and shiftCurMode().

@@ -2506,9 +2641,9 @@

-

Definition at line 220 of file Modes.h.

+

Definition at line 223 of file Modes.h.

-

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), serialize(), and shiftCurMode().

+

Referenced by addMode(), addModeFromBuffer(), clearModes(), deleteCurMode(), getModeLink(), saveStorage(), serialize(), and shiftCurMode().

diff --git a/docs/orbit/classModes.js b/docs/orbit/classModes.js index ae97a62325..0622c676b3 100644 --- a/docs/orbit/classModes.js +++ b/docs/orbit/classModes.js @@ -33,6 +33,7 @@ var classModes = [ "saveStorage", "classModes.html#a1756081ee85dbcf672ddad5a3dcb4690", null ], [ "saveToBuffer", "classModes.html#a9b64018ed3d72c3667f0eaef5fd6495f", null ], [ "serialize", "classModes.html#afb881f5315e4197bb01625b1268eca9d", null ], + [ "serializeSaveHeader", "classModes.html#a4432825def9ab0a3edb0c480e21c14e1", null ], [ "setAdvancedMenus", "classModes.html#ad4938ad48f465a7a59d9bcdaa2f8eaca", null ], [ "setCurMode", "classModes.html#a65f088d9076706c4976f7282be323e50", null ], [ "setDefaults", "classModes.html#a790f299aa425bdc73af7f584ee30472b", null ], @@ -44,6 +45,7 @@ var classModes = [ "shiftCurMode", "classModes.html#a7cb704d905f26b1d1e9e748c87b547a1", null ], [ "startupMode", "classModes.html#a354ffb53eeff1a351ef81ce55eae472a", null ], [ "unserialize", "classModes.html#ae5c68f28c424a2a08ba659e9373898e3", null ], + [ "unserializeSaveHeader", "classModes.html#a0e4a896bf673ecc51bf52f3efabf8aca", null ], [ "updateCurMode", "classModes.html#a263cf02fb83d954b91c85d2d1e5411ee", null ], [ "m_curMode", "classModes.html#aee36ec773858cf347b90bd1538b0a2b8", null ], [ "m_globalFlags", "classModes.html#a9929c8efa425648fa8a2e85028b1b303", null ], diff --git a/docs/orbit/classModes_1_1ModeLink.html b/docs/orbit/classModes_1_1ModeLink.html index 9952c11c04..cd15253d51 100644 --- a/docs/orbit/classModes_1_1ModeLink.html +++ b/docs/orbit/classModes_1_1ModeLink.html @@ -154,7 +154,7 @@

Detailed Description

-

Definition at line 156 of file Modes.h.

+

Definition at line 159 of file Modes.h.

Constructor & Destructor Documentation

◆ ModeLink() [1/2]

@@ -182,28 +182,28 @@

-

Definition at line 707 of file Modes.cpp.

-
707  :
-
708  m_pInstantiatedMode(nullptr),
-
709  m_storedMode(),
-
710  m_next(nullptr),
-
711  m_prev(nullptr)
-
712 {
-
713  if (src) {
-
714  init(src);
-
715  }
-
716  if (src && inst) {
-
717  instantiate();
-
718  }
-
719 }
- - - - - - +

Definition at line 776 of file Modes.cpp.

+
776  :
+
777  m_pInstantiatedMode(nullptr),
+
778  m_storedMode(),
+
779  m_next(nullptr),
+
780  m_prev(nullptr)
+
781 {
+
782  if (src) {
+
783  init(src);
+
784  }
+
785  if (src && inst) {
+
786  instantiate();
+
787  }
+
788 }
+ + + + + +
-

References init(), and instantiate().

+

References init(), and instantiate().

@@ -233,20 +233,20 @@

-

Definition at line 721 of file Modes.cpp.

-
721  :
-
722  m_pInstantiatedMode(nullptr),
-
723  m_storedMode(src),
-
724  m_next(nullptr),
-
725  m_prev(nullptr)
-
726 {
-
727  if (src.size() && inst) {
-
728  instantiate();
-
729  }
-
730 }
+

Definition at line 790 of file Modes.cpp.

+
790  :
+
791  m_pInstantiatedMode(nullptr),
+
792  m_storedMode(src),
+
793  m_next(nullptr),
+
794  m_prev(nullptr)
+
795 {
+
796  if (src.size() && inst) {
+
797  instantiate();
+
798  }
+
799 }
uint32_t size() const
Definition: ByteStream.h:123
-

References instantiate(), and ByteStream::size().

+

References instantiate(), and ByteStream::size().

@@ -265,15 +265,15 @@

-

Definition at line 732 of file Modes.cpp.

-
733 {
-
734  if (m_next) {
-
735  delete m_next;
-
736  }
-
737  if (m_pInstantiatedMode) {
-
738  delete m_pInstantiatedMode;
-
739  }
-
740 }
+

Definition at line 801 of file Modes.cpp.

+
802 {
+
803  if (m_next) {
+
804  delete m_next;
+
805  }
+
806  if (m_pInstantiatedMode) {
+
807  delete m_pInstantiatedMode;
+
808  }
+
809 }
@@ -294,27 +294,27 @@

-

Definition at line 773 of file Modes.cpp.

-
774 {
-
775  if (!next.size()) {
-
776  return false;
-
777  }
-
778  // if not end of chain, recurse on next link
-
779  if (m_next) {
-
780  return m_next->append(next);
-
781  }
-
782  m_next = new ModeLink(next);
-
783  if (!m_next) {
- -
785  return false;
-
786  }
-
787  m_next->m_prev = this;
-
788  return true;
-
789 }
+

Definition at line 842 of file Modes.cpp.

+
843 {
+
844  if (!next.size()) {
+
845  return false;
+
846  }
+
847  // if not end of chain, recurse on next link
+
848  if (m_next) {
+
849  return m_next->append(next);
+
850  }
+
851  m_next = new ModeLink(next);
+
852  if (!m_next) {
+ +
854  return false;
+
855  }
+
856  m_next->m_prev = this;
+
857  return true;
+
858 }
#define ERROR_OUT_OF_MEMORY()
Definition: Log.h:45
- - - + + +

References ERROR_OUT_OF_MEMORY, and ByteStream::size().

@@ -336,27 +336,27 @@

-

Definition at line 755 of file Modes.cpp.

-
756 {
-
757  if (!next) {
-
758  return false;
-
759  }
-
760  // if not end of chain, recurse on next link
-
761  if (m_next) {
-
762  return m_next->append(next);
-
763  }
-
764  m_next = new ModeLink(next);
-
765  if (!m_next) {
- -
767  return false;
-
768  }
-
769  m_next->m_prev = this;
-
770  return true;
-
771 }
+

Definition at line 824 of file Modes.cpp.

+
825 {
+
826  if (!next) {
+
827  return false;
+
828  }
+
829  // if not end of chain, recurse on next link
+
830  if (m_next) {
+
831  return m_next->append(next);
+
832  }
+
833  m_next = new ModeLink(next);
+
834  if (!m_next) {
+ +
836  return false;
+
837  }
+
838  m_next->m_prev = this;
+
839  return true;
+
840 }

References ERROR_OUT_OF_MEMORY.

-

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

+

Referenced by Modes::addMode(), and Modes::addModeFromBuffer().

@@ -383,10 +383,10 @@

-

Definition at line 187 of file Modes.h.

-
187 { return m_storedMode; }
+

Definition at line 190 of file Modes.h.

+
190 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -406,25 +406,25 @@

-

Definition at line 742 of file Modes.cpp.

-
743 {
-
744  if (!mode) {
-
745  return false;
-
746  }
- -
748  // serialize the mode so it can be instantiated anytime
-
749  if (!mode->saveToBuffer(m_storedMode)) {
-
750  return false;
-
751  }
-
752  return true;
-
753 }
+

Definition at line 811 of file Modes.cpp.

+
812 {
+
813  if (!mode) {
+
814  return false;
+
815  }
+ +
817  // serialize the mode so it can be instantiated anytime
+
818  if (!mode->saveToBuffer(m_storedMode)) {
+
819  return false;
+
820  }
+
821  return true;
+
822 }
void clear()
Definition: ByteStream.cpp:107
virtual bool saveToBuffer(ByteStream &saveBuffer, uint8_t numLeds=0) const
Definition: Mode.cpp:169
- +

References Mode::saveToBuffer().

-

Referenced by ModeLink().

+

Referenced by ModeLink().

@@ -443,30 +443,30 @@

-

Definition at line 842 of file Modes.cpp.

-
843 {
-
844  if (m_pInstantiatedMode) {
-
845  return m_pInstantiatedMode;
-
846  }
-
847  Mode *newMode = new Mode();
-
848  if (!newMode) {
- -
850  return nullptr;
-
851  }
- -
853  if (!newMode->loadFromBuffer(m_storedMode)) {
-
854  return nullptr;
-
855  }
-
856  m_pInstantiatedMode = newMode;
-
857  return m_pInstantiatedMode;
-
858 }
+

Definition at line 911 of file Modes.cpp.

+
912 {
+
913  if (m_pInstantiatedMode) {
+
914  return m_pInstantiatedMode;
+
915  }
+
916  Mode *newMode = new Mode();
+
917  if (!newMode) {
+ +
919  return nullptr;
+
920  }
+ +
922  if (!newMode->loadFromBuffer(m_storedMode)) {
+
923  return nullptr;
+
924  }
+
925  m_pInstantiatedMode = newMode;
+
926  return m_pInstantiatedMode;
+
927 }
void resetUnserializer()
Definition: ByteStream.cpp:391
Definition: Mode.h:38
virtual bool loadFromBuffer(ByteStream &saveBuffer)
Definition: Mode.cpp:179

References ERROR_OUT_OF_MEMORY, and Mode::loadFromBuffer().

-

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::curMode(), Modes::initCurMode(), ModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -486,22 +486,22 @@

-

Definition at line 816 of file Modes.cpp.

-
817 {
-
818  if (!link) {
-
819  return;
-
820  }
-
821  if (m_next) {
-
822  m_next->m_prev = link;
-
823  link->m_next = m_next;
-
824  }
-
825  m_next = link;
-
826  link->m_prev = this;
-
827 }
+

Definition at line 885 of file Modes.cpp.

+
886 {
+
887  if (!link) {
+
888  return;
+
889  }
+
890  if (m_next) {
+
891  m_next->m_prev = link;
+
892  link->m_next = m_next;
+
893  }
+
894  m_next = link;
+
895  link->m_prev = this;
+
896 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -521,22 +521,22 @@

-

Definition at line 829 of file Modes.cpp.

-
830 {
-
831  if (!link) {
-
832  return;
-
833  }
-
834  if (m_prev) {
-
835  m_prev->m_next = link;
-
836  link->m_prev = m_prev;
-
837  }
-
838  m_prev = link;
-
839  link->m_next = this;
-
840 }
+

Definition at line 898 of file Modes.cpp.

+
899 {
+
900  if (!link) {
+
901  return;
+
902  }
+
903  if (m_prev) {
+
904  m_prev->m_next = link;
+
905  link->m_prev = m_prev;
+
906  }
+
907  m_prev = link;
+
908  link->m_next = this;
+
909 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::shiftCurMode().

+

Referenced by Modes::shiftCurMode().

@@ -563,10 +563,10 @@

-

Definition at line 188 of file Modes.h.

-
188 { return m_pInstantiatedMode; }
+

Definition at line 191 of file Modes.h.

+
191 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -593,12 +593,12 @@

-

Definition at line 189 of file Modes.h.

-
189 { return m_next; }
+

Definition at line 192 of file Modes.h.

+
192 { return m_next; }
-

References m_next.

+

References m_next.

-

Referenced by Modes::getModeLink(), Modes::serialize(), and Modes::shiftCurMode().

+

Referenced by Modes::getModeLink(), Modes::saveStorage(), Modes::serialize(), and Modes::shiftCurMode().

@@ -625,10 +625,10 @@

-

Definition at line 193 of file Modes.h.

-
193 { return m_storedMode; }
+

Definition at line 196 of file Modes.h.

+
196 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -655,10 +655,10 @@

-

Definition at line 192 of file Modes.h.

-
192 { return m_storedMode; }
+

Definition at line 195 of file Modes.h.

+
195 { return m_storedMode; }
-

References m_storedMode.

+

References m_storedMode.

@@ -685,10 +685,10 @@

-

Definition at line 194 of file Modes.h.

-
194 { return m_pInstantiatedMode; }
+

Definition at line 197 of file Modes.h.

+
197 { return m_pInstantiatedMode; }
-

References m_pInstantiatedMode.

+

References m_pInstantiatedMode.

@@ -707,13 +707,13 @@

-

Definition at line 791 of file Modes.cpp.

-
792 {
-
793  if (!m_pInstantiatedMode) {
-
794  return;
-
795  }
- -
797 }
+

Definition at line 860 of file Modes.cpp.

+
861 {
+
862  if (!m_pInstantiatedMode) {
+
863  return;
+
864  }
+ +
866 }
virtual void play()
Definition: Mode.cpp:139

Referenced by Modes::play().

@@ -743,10 +743,10 @@

-

Definition at line 190 of file Modes.h.

-
190 { return m_prev; }
+

Definition at line 193 of file Modes.h.

+
193 { return m_prev; }
-

References m_prev.

+

References m_prev.

@@ -765,16 +765,16 @@

-

Definition at line 868 of file Modes.cpp.

-
869 {
-
870  if (!m_pInstantiatedMode) {
-
871  return false;
-
872  }
- - -
875 }
+

Definition at line 937 of file Modes.cpp.

+
938 {
+
939  if (!m_pInstantiatedMode) {
+
940  return false;
+
941  }
+ + +
944 }
-

Referenced by Modes::saveCurMode().

+

Referenced by Modes::saveCurMode().

@@ -793,15 +793,15 @@

-

Definition at line 860 of file Modes.cpp.

-
861 {
-
862  if (m_pInstantiatedMode) {
-
863  delete m_pInstantiatedMode;
-
864  m_pInstantiatedMode = nullptr;
-
865  }
-
866 }
+

Definition at line 929 of file Modes.cpp.

+
930 {
+
931  if (m_pInstantiatedMode) {
+
932  delete m_pInstantiatedMode;
+
933  m_pInstantiatedMode = nullptr;
+
934  }
+
935 }
-

Referenced by Modes::initCurMode(), Modes::serialize(), and Modes::setCurMode().

+

Referenced by Modes::initCurMode(), Modes::saveStorage(), Modes::serialize(), and Modes::setCurMode().

@@ -820,26 +820,26 @@

-

Definition at line 799 of file Modes.cpp.

-
800 {
-
801  // unlink this node from the chain
-
802  if (m_prev) {
-
803  m_prev->m_next = m_next;
-
804  }
-
805  if (m_next) {
-
806  m_next->m_prev = m_prev;
-
807  }
-
808  // grab the new link that will take this place
-
809  ModeLink *newLink = m_prev ? m_prev : m_next;
-
810  // clear the links of this node
-
811  m_prev = nullptr;
-
812  m_next = nullptr;
-
813  return newLink;
-
814 }
+

Definition at line 868 of file Modes.cpp.

+
869 {
+
870  // unlink this node from the chain
+
871  if (m_prev) {
+
872  m_prev->m_next = m_next;
+
873  }
+
874  if (m_next) {
+
875  m_next->m_prev = m_prev;
+
876  }
+
877  // grab the new link that will take this place
+
878  ModeLink *newLink = m_prev ? m_prev : m_next;
+
879  // clear the links of this node
+
880  m_prev = nullptr;
+
881  m_next = nullptr;
+
882  return newLink;
+
883 }
-

References m_next, and m_prev.

+

References m_next, and m_prev.

-

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

+

Referenced by Modes::deleteCurMode(), and Modes::shiftCurMode().

@@ -864,9 +864,9 @@

-

Definition at line 198 of file Modes.h.

+

Definition at line 201 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), next(), and unlinkSelf().

@@ -890,9 +890,9 @@

-

Definition at line 196 of file Modes.h.

+

Definition at line 199 of file Modes.h.

-

Referenced by mode(), and operator Mode *().

+

Referenced by mode(), and operator Mode *().

@@ -916,9 +916,9 @@

-

Definition at line 199 of file Modes.h.

+

Definition at line 202 of file Modes.h.

-

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

+

Referenced by linkAfter(), linkBefore(), prev(), and unlinkSelf().

@@ -942,9 +942,9 @@

-

Definition at line 197 of file Modes.h.

+

Definition at line 200 of file Modes.h.

-

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

+

Referenced by buffer(), operator ByteStream(), and operator ByteStream &().

diff --git a/docs/orbit/classPatternBuilder.html b/docs/orbit/classPatternBuilder.html index f6e8133f6e..07a80a0624 100644 --- a/docs/orbit/classPatternBuilder.html +++ b/docs/orbit/classPatternBuilder.html @@ -426,12 +426,12 @@

153  case PATTERN_TRACER: return PatternArgs(3, 0, 0, 20, 1);
155  case PATTERN_MINIRIBBON: return PatternArgs(1);
-
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 1);
- - - - - +
156  case PATTERN_BLEND: return PatternArgs(BLEND_ON_DURATION, BLEND_OFF_DURATION, 0, 0, 0, 5, 0);
+ + + + +
162  case PATTERN_SOLID: return PatternArgs(250);
163 
164  // =====================
diff --git a/docs/orbit/classPatternSelect.html b/docs/orbit/classPatternSelect.html index 3e0eb0ee09..ee2d9b4459 100644 --- a/docs/orbit/classPatternSelect.html +++ b/docs/orbit/classPatternSelect.html @@ -202,7 +202,7 @@

Detailed Description

-

Definition at line 10 of file PatternSelect.h.

+

Definition at line 9 of file PatternSelect.h.

Member Enumeration Documentation

◆ PatternSelectState

@@ -228,15 +228,15 @@

STATE_PICK_PATTERN  -

Definition at line 35 of file PatternSelect.h.

-
36  {
-
37  // currently picking the list of patterns
- -
39  // currently picking a pattern in the list
- -
41  };
- - +

Definition at line 34 of file PatternSelect.h.

+
35  {
+
36  // currently picking the list of patterns
+ +
38  // currently picking a pattern in the list
+ +
40  };
+ +
@@ -277,9 +277,9 @@

20 }
@ PATTERN_FIRST
Definition: Patterns.h:18
Menu(const RGBColor &col, bool advanced)
Definition: Menu.cpp:63
- -
PatternSelectState m_state
Definition: PatternSelect.h:44
-
PatternID m_newPatternID
Definition: PatternSelect.h:47
+ +
PatternSelectState m_state
Definition: PatternSelect.h:43
+
PatternID m_newPatternID
Definition: PatternSelect.h:46
@@ -343,7 +343,7 @@

#define DEBUG_LOG(msg)
Definition: Log.h:40
virtual bool init()
Definition: Menu.cpp:78
-

References DEBUG_LOG, Menu::init(), m_newPatternID, m_state, PATTERN_FIRST, and STATE_PICK_LIST.

+

References DEBUG_LOG, Menu::init(), m_newPatternID, m_state, PATTERN_FIRST, and STATE_PICK_LIST.

@@ -423,7 +423,7 @@

virtual void init()
Definition: Mode.cpp:120
bool setPattern(PatternID pat, LedPos pos=LED_ANY, const PatternArgs *args=nullptr, const Colorset *set=nullptr)
Definition: Mode.cpp:490
-

References DEBUG_LOGF, Mode::getPatternID(), Mode::init(), Mode::isMultiLed(), isMultiLedPatternID(), LED_MULTI, m_newPatternID, Menu::m_previewMode, m_started, Menu::m_targetLeds, MAP_LED, MAP_LED_ALL, mapGetFirstLed(), PATTERN_FIRST, PATTERN_MULTI_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, Mode::setPattern(), and Mode::setPatternMap().

+

References DEBUG_LOGF, Mode::getPatternID(), Mode::init(), Mode::isMultiLed(), isMultiLedPatternID(), LED_MULTI, m_newPatternID, Menu::m_previewMode, m_started, Menu::m_targetLeds, MAP_LED, MAP_LED_ALL, mapGetFirstLed(), PATTERN_FIRST, PATTERN_MULTI_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, Mode::setPattern(), and Mode::setPatternMap().

Referenced by onShortClick().

@@ -528,9 +528,9 @@

Quadrant m_curSelection
Definition: Menu.h:63
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:208
Definition: Mode.h:38
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
-

References Modes::curMode(), DEBUG_LOGF, Mode::getPatternID(), Mode::init(), Menu::leaveMenu(), Menu::m_curSelection, m_newPatternID, Menu::m_previewMode, m_state, PATTERN_COUNT, PATTERN_FIRST, QUADRANT_FIRST, QUADRANT_LAST, Mode::setPattern(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References Modes::curMode(), DEBUG_LOGF, Mode::getPatternID(), Mode::init(), Menu::leaveMenu(), Menu::m_curSelection, m_newPatternID, Menu::m_previewMode, m_state, PATTERN_COUNT, PATTERN_FIRST, QUADRANT_FIRST, QUADRANT_LAST, Mode::setPattern(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -609,7 +609,7 @@

@ QUADRANT_COUNT
Definition: LedTypes.h:116
-

References Menu::m_curSelection, m_state, nextPattern(), QUADRANT_COUNT, STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References Menu::m_curSelection, m_state, nextPattern(), QUADRANT_COUNT, STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -656,7 +656,7 @@

114 }
void previousPattern()
-

References Menu::m_curSelection, m_state, previousPattern(), QUADRANT_LAST, STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References Menu::m_curSelection, m_state, previousPattern(), QUADRANT_LAST, STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -716,7 +716,7 @@

180 }
@ PATTERN_SOLID
Definition: Patterns.h:56
-

References Modes::curMode(), DEBUG_LOGF, Mode::getPatternID(), Mode::init(), Mode::isMultiLed(), isMultiLedPatternID(), LED_MULTI, Menu::m_targetLeds, MAP_LED, MAP_LED_ALL, mapGetFirstLed(), PATTERN_MULTI_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, PATTERN_SOLID, Mode::setPattern(), and Mode::setPatternMap().

+

References Modes::curMode(), DEBUG_LOGF, Mode::getPatternID(), Mode::init(), Mode::isMultiLed(), isMultiLedPatternID(), LED_MULTI, Menu::m_targetLeds, MAP_LED, MAP_LED_ALL, mapGetFirstLed(), PATTERN_MULTI_FIRST, PATTERN_MULTI_LAST, PATTERN_SINGLE_FIRST, PATTERN_SINGLE_LAST, PATTERN_SOLID, Mode::setPattern(), and Mode::setPatternMap().

Referenced by onShortClick2().

@@ -781,7 +781,7 @@

void showPatternSelection()
void showListSelection()
-

References Menu::blinkSelection(), Menu::m_previewMode, m_state, Menu::MENU_CONTINUE, Mode::play(), Menu::run(), showListSelection(), showPatternSelection(), Menus::showSelection(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

+

References Menu::blinkSelection(), Menu::m_previewMode, m_state, Menu::MENU_CONTINUE, Mode::play(), Menu::run(), showListSelection(), showPatternSelection(), Menus::showSelection(), STATE_PICK_LIST, and STATE_PICK_PATTERN.

@@ -892,7 +892,7 @@

-

Definition at line 47 of file PatternSelect.h.

+

Definition at line 46 of file PatternSelect.h.

Referenced by init(), nextPattern(), and onLongClick().

@@ -918,7 +918,7 @@

-

Definition at line 50 of file PatternSelect.h.

+

Definition at line 49 of file PatternSelect.h.

@@ -942,7 +942,7 @@

-

Definition at line 54 of file PatternSelect.h.

+

Definition at line 53 of file PatternSelect.h.

Referenced by nextPattern().

@@ -968,7 +968,7 @@

-

Definition at line 44 of file PatternSelect.h.

+

Definition at line 43 of file PatternSelect.h.

Referenced by init(), onLongClick(), onShortClick(), onShortClick2(), and run().

diff --git a/docs/orbit/classRandomizer.html b/docs/orbit/classRandomizer.html index 4f19f0eb0a..1c7c4822d0 100644 --- a/docs/orbit/classRandomizer.html +++ b/docs/orbit/classRandomizer.html @@ -552,14 +552,14 @@

Definition: Mode.h:38
const Pattern * getPattern(LedPos pos=LED_ANY) const
Definition: Mode.cpp:414
bool hasMultiLed() const
Definition: Mode.cpp:682
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
void serialize(ByteStream &buffer) const
Definition: Pattern.cpp:57
void seed(uint32_t newseed)
Definition: Random.cpp:18
Random m_multiRandCtx
Definition: Randomizer.h:30
Random m_singlesRandCtx[LED_COUNT]
Definition: Randomizer.h:29
-

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

+

References Modes::curMode(), DEBUG_LOG, Mode::getPattern(), Mode::hasMultiLed(), Menu::init(), LED_COUNT, LED_FIRST, LED_MULTI, m_multiRandCtx, m_singlesRandCtx, ByteStream::recalcCRC(), Random::seed(), and Pattern::serialize().

@@ -603,9 +603,9 @@

133 }
virtual void leaveMenu(bool doSave=false)
Definition: Menu.cpp:208
Mode m_previewMode
Definition: Menu.h:54
-
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:418
+
static bool updateCurMode(const Mode *mode)
Definition: Modes.cpp:487
-

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

+

References Menu::leaveMenu(), m_needToSelect, Menu::m_previewMode, and Modes::updateCurMode().

diff --git a/docs/orbit/classStorage-members.html b/docs/orbit/classStorage-members.html index 2ae4c06dd9..353eb5d807 100644 --- a/docs/orbit/classStorage-members.html +++ b/docs/orbit/classStorage-members.html @@ -94,9 +94,9 @@ init()Storagestatic lastSaveSize()Storagestatic m_lastSaveSizeStorageprivatestatic - read(ByteStream &buffer)Storagestatic + read(uint16_t slot, ByteStream &buffer)Storagestatic Storage()Storageprivate - write(ByteStream &buffer)Storagestatic + write(uint16_t slot, ByteStream &buffer)Storagestatic diff --git a/docs/orbit/classStorage.html b/docs/orbit/classStorage.html index d81584928d..7b673e997e 100644 --- a/docs/orbit/classStorage.html +++ b/docs/orbit/classStorage.html @@ -101,10 +101,10 @@   static void cleanup ()   -static bool write (ByteStream &buffer) -  -static bool read (ByteStream &buffer) -  +static bool write (uint16_t slot, ByteStream &buffer) +  +static bool read (uint16_t slot, ByteStream &buffer) +  static uint32_t lastSaveSize ()   @@ -145,9 +145,9 @@

-

Definition at line 39 of file Storage.cpp.

-
40 {
-
41 }
+

Definition at line 41 of file Storage.cpp.

+
42 {
+
43 }
@@ -175,9 +175,9 @@

-

Definition at line 53 of file Storage.cpp.

-
54 {
-
55 }
+

Definition at line 55 of file Storage.cpp.

+
56 {
+
57 }

Referenced by VortexEngine::cleanup().

@@ -206,18 +206,18 @@

-

Definition at line 43 of file Storage.cpp.

-
44 {
-
45 #ifdef VORTEX_LIB
-
46  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
-
47  m_storageFilename = DEFAULT_STORAGE_FILENAME;
-
48  }
-
49 #endif
-
50  return true;
-
51 }
-
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:21
+

Definition at line 45 of file Storage.cpp.

+
46 {
+
47 #ifdef VORTEX_LIB
+
48  if (!m_storageFilename.length() && Vortex::storageEnabled()) {
+
49  m_storageFilename = DEFAULT_STORAGE_FILENAME;
+
50  }
+
51 #endif
+
52  return true;
+
53 }
+
#define DEFAULT_STORAGE_FILENAME
Definition: Storage.cpp:23
-

References DEFAULT_STORAGE_FILENAME.

+

References DEFAULT_STORAGE_FILENAME.

Referenced by VortexEngine::init().

@@ -246,18 +246,18 @@

-

Definition at line 191 of file Storage.cpp.

-
192 {
-
193  return m_lastSaveSize;
-
194 }
+

Definition at line 216 of file Storage.cpp.

+
217 {
+
218  return m_lastSaveSize;
+
219 }
static uint32_t m_lastSaveSize
Definition: Storage.h:40

References m_lastSaveSize.

- -

◆ read()

+ +

◆ read()

@@ -268,9 +268,19 @@

bool Storage::read

+ + + + + + - + + + + +
(uint16_t slot,
ByteStreambuffer)buffer 
)
@@ -280,65 +290,71 @@

-

Definition at line 135 of file Storage.cpp.

-
136 {
-
137 #ifdef VORTEX_LIB
-
138  if (!Vortex::storageEnabled()) {
-
139  // return false here, but true in write because we don't want to return
-
140  // an empty buffer after returning true
-
141  return false;
-
142  }
-
143 #endif
-
144  uint32_t size = STORAGE_SIZE;
-
145  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4) {
-
146  return false;
-
147  }
-
148  if (!buffer.init(size)) {
-
149  return false;
-
150  }
-
151 #ifdef VORTEX_EMBEDDED
-
152  // read directly into the raw data of the byte array
-
153  memcpy(buffer.rawData(), (const void *)_storagedata, size);
-
154 #elif defined(_WIN32)
-
155  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-
156  if (hFile == INVALID_HANDLE_VALUE) {
-
157  // error
-
158  return false;
-
159  }
-
160  DWORD bytesRead = 0;
-
161  if (!ReadFile(hFile, buffer.rawData(), size, &bytesRead, NULL)) {
-
162  // error
-
163  return false;
-
164  }
-
165  CloseHandle(hFile);
-
166 #else
-
167  FILE *f = fopen(STORAGE_FILENAME, "r");
-
168  if (!f) {
-
169  return false;
-
170  }
-
171  if (!fread(buffer.rawData(), sizeof(char), size, f)) {
-
172  return false;
-
173  }
-
174  fclose(f);
-
175 #endif
-
176  // ensure the internal buffer is sane after reading it out, this
-
177  // prevents segfaults if the internal size reports larger than capacity
-
178  buffer.sanity();
-
179  // check crc immediately since we read into raw data copying the
-
180  // array could be dangerous
-
181  if (!buffer.checkCRC()) {
-
182  buffer.clear();
-
183  ERROR_LOG("Could not verify buffer");
-
184  return false;
-
185  }
-
186  m_lastSaveSize = size;
-
187  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
-
188  return true;
-
189 }
+

Definition at line 156 of file Storage.cpp.

+
157 {
+
158 #ifdef VORTEX_LIB
+
159  if (!Vortex::storageEnabled()) {
+
160  // return false here, but true in write because we don't want to return
+
161  // an empty buffer after returning true
+
162  return false;
+
163  }
+
164 #endif
+
165  uint32_t size = MAX_MODE_SIZE;
+
166  if (size > STORAGE_SIZE || size < sizeof(ByteStream::RawBuffer) + 4 || slot >= NUM_MODE_SLOTS) {
+
167  return false;
+
168  }
+
169  if (!buffer.init(size)) {
+
170  return false;
+
171  }
+
172 #ifdef VORTEX_EMBEDDED
+
173  // read directly into the raw data of the byte array
+
174  memcpy(buffer.rawData(), (const void *)(_storagedata + (slot * MAX_MODE_SIZE)), size);
+
175 #elif defined(_WIN32)
+
176  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+
177  if (hFile == INVALID_HANDLE_VALUE) {
+
178  // error
+
179  return false;
+
180  }
+
181  DWORD bytesRead = 0;
+
182  DWORD offset = slot * MAX_MODE_SIZE;
+
183  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
184  if (!ReadFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &bytesRead, NULL)) {
+
185  // error
+
186  return false;
+
187  }
+
188  CloseHandle(hFile);
+
189 #else
+
190  FILE *f = fopen(STORAGE_FILENAME, "r");
+
191  if (!f) {
+
192  return false;
+
193  }
+
194  long offset = slot * MAX_MODE_SIZE;
+
195  fseek(f, offset, SEEK_SET);
+
196  if (!fread(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
197  return false;
+
198  }
+
199  fclose(f);
+
200 #endif
+
201  // ensure the internal buffer is sane after reading it out, this
+
202  // prevents segfaults if the internal size reports larger than capacity
+
203  buffer.sanity();
+
204  // check crc immediately since we read into raw data copying the
+
205  // array could be dangerous
+
206  if (!buffer.checkCRC()) {
+
207  buffer.clear();
+
208  ERROR_LOG("Could not verify buffer");
+
209  return false;
+
210  }
+
211  m_lastSaveSize = size;
+
212  DEBUG_LOGF("Loaded savedata (Size: %u)", buffer.size());
+
213  return true;
+
214 }
#define DEBUG_LOGF(msg,...)
Definition: Log.h:41
#define ERROR_LOG(msg)
Definition: Log.h:29
-
#define STORAGE_FILENAME
Definition: Storage.cpp:27
-
#define STORAGE_SIZE
Definition: VortexConfig.h:501
+
#define STORAGE_FILENAME
Definition: Storage.cpp:29
+
#define MAX_MODE_SIZE
Definition: VortexConfig.h:499
+
#define STORAGE_SIZE
Definition: VortexConfig.h:506
+
#define NUM_MODE_SLOTS
Definition: VortexConfig.h:502
bool init(uint32_t capacity=0, const uint8_t *buf=nullptr)
Definition: ByteStream.cpp:82
void * rawData() const
Definition: ByteStream.h:121
void clear()
Definition: ByteStream.cpp:107
@@ -347,14 +363,14 @@

void sanity()
Definition: ByteStream.cpp:319

-

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References ByteStream::checkCRC(), ByteStream::clear(), DEBUG_LOGF, ERROR_LOG, ByteStream::init(), m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, ByteStream::rawData(), ByteStream::sanity(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::loadStorage().

+

Referenced by Modes::loadStorage().

- -

◆ write()

+ +

◆ write()

@@ -365,9 +381,19 @@

bool Storage::write ( + uint16_t  + slot, + + + + ByteStream &  - buffer) + buffer  + + + ) + @@ -377,87 +403,107 @@

-

Definition at line 58 of file Storage.cpp.

-
59 {
-
60 #ifdef VORTEX_LIB
-
61  if (!Vortex::storageEnabled()) {
-
62  // success so the system thinks it all worked
-
63  return true;
-
64  }
-
65 #endif
-
66  // check size
-
67  if (buffer.rawSize() > STORAGE_SIZE) {
-
68  ERROR_LOG("Buffer too big for storage space");
-
69  return false;
-
70  }
-
71 #ifdef VORTEX_EMBEDDED
-
72  // clear existing storage
-
73  NVMCTRL->ADDR.reg = ((uint32_t)_storagedata) / 2;
-
74  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
-
75  while (!NVMCTRL->INTFLAG.bit.READY) {}
-
76 
-
77  // set the last save size
-
78  m_lastSaveSize = buffer.size();
-
79 
-
80  // write out the buffer to storage
-
81  // Calculate data boundaries
-
82  uint32_t size = (buffer.rawSize() + 3) / 4;
-
83  volatile uint32_t *dst_addr = (volatile uint32_t *)_storagedata;
-
84  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
-
85 
-
86  // Disable automatic page write
-
87  NVMCTRL->CTRLB.bit.MANW = 1;
-
88 
-
89  // Do writes in pages
-
90  while (size) {
-
91  // Execute "PBC" Page Buffer Clear
-
92  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
-
93  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
94 
-
95  // Fill page buffer
-
96  uint32_t i;
-
97  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
-
98  *dst_addr = *(uint32_t *)(src_addr);
-
99  src_addr += sizeof(uint32_t);
-
100  dst_addr++;
-
101  size--;
-
102  }
-
103 
-
104  // Execute "WP" Write Page
-
105  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
-
106  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
-
107  }
-
108 #elif defined(_WIN32)
-
109  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
-
110  if (hFile == INVALID_HANDLE_VALUE) {
-
111  // error
-
112  return false;
-
113  }
-
114  DWORD written = 0;
-
115  if (!WriteFile(hFile, buffer.rawData(), buffer.rawSize(), &written, NULL)) {
-
116  // error
-
117  return false;
-
118  }
-
119  CloseHandle(hFile);
-
120 #else
-
121  FILE *f = fopen(STORAGE_FILENAME, "w");
-
122  if (!f) {
-
123  return false;
+

Definition at line 60 of file Storage.cpp.

+
61 {
+
62 #ifdef VORTEX_LIB
+
63  if (!Vortex::storageEnabled()) {
+
64  // success so the system thinks it all worked
+
65  return true;
+
66  }
+
67 #endif
+
68  // check size
+
69  if (buffer.rawSize() > MAX_MODE_SIZE) {
+
70  ERROR_LOG("Buffer too big for storage space");
+
71  return false;
+
72  }
+
73  if (slot >= NUM_MODE_SLOTS) {
+
74  return false;
+
75  }
+
76  // just in case
+
77  buffer.recalcCRC();
+
78 #ifdef VORTEX_EMBEDDED
+
79  // the target slot to store in
+
80  uint32_t storage_slot = (uint32_t)_storagedata + (slot * MAX_MODE_SIZE);
+
81 
+
82  // Number of rows to erase for one slot
+
83  uint16_t rows_to_erase = MAX_MODE_SIZE / (PAGE_SIZE * 4);
+
84  // Erase only the rows containing the slot
+
85  for (uint16_t i = 0; i < rows_to_erase; ++i) {
+
86  // Set the address for the row to erase
+
87  NVMCTRL->ADDR.reg = (uint32_t)(storage_slot + (i * PAGE_SIZE * 4)) / 2;
+
88  // Execute the erase command
+
89  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_ER;
+
90  // Wait for the erase operation to complete
+
91  while (!NVMCTRL->INTFLAG.bit.READY) {}
+
92  }
+
93 
+
94  // set the last save size
+
95  m_lastSaveSize = buffer.size();
+
96 
+
97  // write out the buffer to storage
+
98  // Calculate data boundaries
+
99  uint32_t size = (buffer.rawSize() + 3) / 4;
+
100  volatile uint32_t *dst_addr = (volatile uint32_t *)storage_slot;
+
101  const uint8_t *src_addr = (uint8_t *)buffer.rawData();
+
102 
+
103  // Disable automatic page write
+
104  NVMCTRL->CTRLB.bit.MANW = 1;
+
105 
+
106  // Do writes in pages
+
107  while (size) {
+
108  // Execute "PBC" Page Buffer Clear
+
109  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC;
+
110  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
+
111 
+
112  // Fill page buffer
+
113  uint32_t i;
+
114  for (i = 0; i < (PAGE_SIZE / 4) && size; i++) {
+
115  *dst_addr = *(uint32_t *)(src_addr);
+
116  src_addr += sizeof(uint32_t);
+
117  dst_addr++;
+
118  size--;
+
119  }
+
120 
+
121  // Execute "WP" Write Page
+
122  NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_WP;
+
123  while (NVMCTRL->INTFLAG.bit.READY == 0) {}
124  }
-
125  if (!fwrite(buffer.rawData(), sizeof(char), buffer.rawSize(), f)) {
-
126  return false;
-
127  }
-
128  fclose(f);
-
129 #endif // VORTEX_EMBEDDED
-
130  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
-
131  return true;
-
132 }
-
#define PAGE_SIZE
Definition: Storage.cpp:32
+
125 #elif defined(_WIN32)
+
126  HANDLE hFile = CreateFile(STORAGE_FILENAME, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
127  if (hFile == INVALID_HANDLE_VALUE) {
+
128  // error
+
129  return false;
+
130  }
+
131  DWORD written = 0;
+
132  DWORD offset = slot * MAX_MODE_SIZE;
+
133  SetFilePointer(hFile, offset, NULL, FILE_BEGIN);
+
134  if (!WriteFile(hFile, buffer.rawData(), MAX_MODE_SIZE, &written, NULL)) {
+
135  // error
+
136  return false;
+
137  }
+
138  CloseHandle(hFile);
+
139 #else
+
140  FILE *f = fopen(STORAGE_FILENAME, "w");
+
141  if (!f) {
+
142  return false;
+
143  }
+
144  long offset = slot * MAX_MODE_SIZE;
+
145  fseek(f, offset, SEEK_SET);
+
146  if (!fwrite(buffer.rawData(), sizeof(char), MAX_MODE_SIZE, f)) {
+
147  return false;
+
148  }
+
149  fclose(f);
+
150 #endif // VORTEX_EMBEDDED
+
151  DEBUG_LOGF("Wrote %u bytes to storage (max: %u)", m_lastSaveSize, STORAGE_SIZE);
+
152  return true;
+
153 }
+
#define PAGE_SIZE
Definition: Storage.cpp:34
+
uint32_t recalcCRC(bool force=false)
Definition: ByteStream.cpp:301
uint32_t rawSize() const
Definition: ByteStream.h:122
-

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, PAGE_SIZE, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

+

References DEBUG_LOGF, ERROR_LOG, m_lastSaveSize, MAX_MODE_SIZE, NUM_MODE_SLOTS, PAGE_SIZE, ByteStream::rawData(), ByteStream::rawSize(), ByteStream::recalcCRC(), ByteStream::size(), STORAGE_FILENAME, and STORAGE_SIZE.

-

Referenced by Modes::saveStorage().

+

Referenced by Modes::saveStorage().

@@ -484,7 +530,7 @@

Definition at line 40 of file Storage.h.

-

Referenced by lastSaveSize(), read(), and write().

+

Referenced by lastSaveSize(), read(), and write().

diff --git a/docs/orbit/classStorage.js b/docs/orbit/classStorage.js index 8d55c03aba..12c499441b 100644 --- a/docs/orbit/classStorage.js +++ b/docs/orbit/classStorage.js @@ -4,7 +4,7 @@ var classStorage = [ "cleanup", "classStorage.html#a2a1ce108c9a17f6175bfb9a9aba51703", null ], [ "init", "classStorage.html#a065812a8dbd82d731291b5aa7ce3edf9", null ], [ "lastSaveSize", "classStorage.html#a79176e030af1f92f563c2b19316fe3dd", null ], - [ "read", "classStorage.html#a5f7d41fcbfbc0840addbaa0345e1594d", null ], - [ "write", "classStorage.html#a28703a07e21e576760f1b84202c55a01", null ], + [ "read", "classStorage.html#a463f451de890486dd483575e47defbc7", null ], + [ "write", "classStorage.html#a97a1b036dedd7b94a91899638c2248c1", null ], [ "m_lastSaveSize", "classStorage.html#ae85ca521ae89c408fb045d2890951458", null ] ]; \ No newline at end of file diff --git a/docs/orbit/classTime.html b/docs/orbit/classTime.html index c84734dc47..ae1815a5b2 100644 --- a/docs/orbit/classTime.html +++ b/docs/orbit/classTime.html @@ -311,7 +311,7 @@

References m_curTick, and SIMULATION_TICK.

-

Referenced by Timer::alarm(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkQuadrant(), Leds::blinkQuadrantFive(), Leds::blinkRange(), Menu::blinkSelection(), SerialComs::checkSerial(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveModeIR(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), PatternSelect::showListSelection(), Timer::start(), and Button::update().

+

Referenced by Timer::alarm(), Leds::blinkAll(), Leds::blinkIndex(), Leds::blinkMap(), Leds::blinkPair(), Leds::blinkPairs(), Leds::blinkQuadrant(), Leds::blinkQuadrantFive(), Leds::blinkRange(), Menu::blinkSelection(), SerialComs::checkSerial(), Timer::onEnd(), Timer::onStart(), Menus::openMenuSelection(), ModeSharing::receiveModeIR(), Randomizer::run(), VortexEngine::runMainLogic(), Menus::runMenuSelection(), IRSender::send(), VLSender::send(), Modes::setCurMode(), Menu::showBulbSelection(), PatternSelect::showListSelection(), Timer::start(), and Button::update().

@@ -424,11 +424,11 @@

68  return true;
69 }
uint64_t start
Definition: TimeControl.cpp:19
-
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:189
+
#define DEFAULT_TICKRATE
Definition: VortexConfig.h:188
static uint32_t m_firstTime
Definition: TimeControl.h:121
static uint32_t m_prevTime
Definition: TimeControl.h:118
-

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

+

References DEFAULT_TICKRATE, m_curTick, m_firstTime, m_prevTime, microseconds(), and start.

Referenced by VortexEngine::init().

@@ -525,7 +525,7 @@

153 #endif
154 }
-

References DEFAULT_TICKRATE.

+

References DEFAULT_TICKRATE.

@@ -590,7 +590,7 @@

110  uint32_t sleepTime = 0;
111  if (required > elapsed_us) {
112  // in vortex lib on linux we can just sleep instead of spinning
-
113  // but on arduino we must spin and on windows it actually ends
+
113  // but on embedded we must spin and on windows it actually ends
114  // up being more accurate to poll QPF + QPC via microseconds()
115  sleepTime = required - elapsed_us;
116  }
diff --git a/docs/orbit/classVortexEngine.html b/docs/orbit/classVortexEngine.html index 69dcf1340a..7975ebbf83 100644 --- a/docs/orbit/classVortexEngine.html +++ b/docs/orbit/classVortexEngine.html @@ -206,7 +206,7 @@

References VORTEX_VERSION_MAJOR.

-

Referenced by Mode::loadFromBuffer(), and Modes::loadFromBuffer().

+

Referenced by Mode::loadFromBuffer(), and Modes::unserializeSaveHeader().

@@ -236,7 +236,7 @@

Definition at line 86 of file VortexEngine.cpp.

87 {
88  // cleanup in reverse order
-
89  // NOTE: the arduino doesn't actually cleanup,
+
89  // NOTE: the embedded doesn't actually cleanup,
90  // but the test frameworks do
91 #ifdef VORTEX_LIB
@@ -258,11 +258,11 @@

static void cleanup()
Definition: Menus.cpp:77

static void cleanup()
Definition: Modes.cpp:53
static void cleanup()
Definition: Serial.cpp:30
-
static void cleanup()
Definition: Storage.cpp:53
+
static void cleanup()
Definition: Storage.cpp:55
static void cleanup()
Definition: TimeControl.cpp:71
static void cleanup()
Definition: VLSender.cpp:38
-

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), and VLSender::cleanup().

+

References Buttons::cleanup(), Leds::cleanup(), Menus::cleanup(), Modes::cleanup(), SerialComs::cleanup(), Storage::cleanup(), Time::cleanup(), IRReceiver::cleanup(), IRSender::cleanup(), and VLSender::cleanup().

Referenced by wakeup().

@@ -300,9 +300,9 @@

201  return nullptr;
202 #endif
203 }
-
static Mode * curMode()
Definition: Modes.cpp:478
+
static Mode * curMode()
Definition: Modes.cpp:547
-

References Modes::curMode().

+

References Modes::curMode().

@@ -348,12 +348,12 @@

#define DEBUG_LOG(msg)
Definition: Log.h:40
static void clearAll()
Definition: Leds.h:30
static void update()
Definition: Leds.cpp:331
-
static bool saveStorage()
Definition: Modes.cpp:170
+
static bool saveStorage()
Definition: Modes.cpp:209
static uint8_t curModeIndex()
Definition: Modes.h:93
-
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:562
+
static void setStartupMode(uint8_t index)
Definition: Modes.cpp:631
static volatile bool m_sleeping
Definition: VortexEngine.h:52
-

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

+

References Leds::clearAll(), Modes::curModeIndex(), DEBUG_LOG, m_sleeping, Modes::saveStorage(), Modes::setStartupMode(), and Leds::update().

@@ -445,11 +445,11 @@

static bool init()
Definition: Menus.cpp:70
static bool init()
Definition: Modes.cpp:30
static bool init()
Definition: Serial.cpp:23
-
static bool init()
Definition: Storage.cpp:43
+
static bool init()
Definition: Storage.cpp:45
static bool init()
Definition: TimeControl.cpp:50
static bool init()
Definition: VLSender.cpp:33
-

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), and VLSender::init().

+

References DEBUG_LOG, Buttons::init(), Leds::init(), Menus::init(), Modes::init(), SerialComs::init(), Storage::init(), Time::init(), IRReceiver::init(), IRSender::init(), and VLSender::init().

Referenced by wakeup().

@@ -522,13 +522,13 @@

static void holdAll(RGBColor col)
Definition: Leds.cpp:324
static bool openMenuSelection()
Definition: Menus.cpp:226
static bool run()
Definition: Menus.cpp:88
-
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:517
+
static Mode * nextModeSkipEmpty()
Definition: Modes.cpp:586
static void play()
Definition: Modes.cpp:58
static uint32_t lastSwitchTime()
Definition: Modes.h:96
static uint32_t getCurtime()
Definition: TimeControl.h:40
static bool m_autoCycle
Definition: VortexEngine.h:55
-

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

+

References AUTO_CYCLE_MODES_CLICKS, AUTO_RANDOM_DELAY, DEBUG_LOG, g_pButton, Time::getCurtime(), Leds::holdAll(), Button::holdDuration(), Button::isPressed(), Modes::lastSwitchTime(), m_autoCycle, MENU_TRIGGER_THRESHOLD_TICKS, Modes::nextModeSkipEmpty(), Button::onConsecutivePresses(), Menus::openMenuSelection(), Modes::play(), RGB_GREEN, RGB_RED, and Menus::run().

Referenced by tick().

@@ -569,7 +569,7 @@

References ByteStream::serialize(), VORTEX_VERSION_MAJOR, and VORTEX_VERSION_MINOR.

-

Referenced by Modes::saveToBuffer(), and Mode::saveToBuffer().

+

Referenced by Mode::saveToBuffer(), and Modes::serializeSaveHeader().

diff --git a/docs/orbit/dir_000007_000010.html b/docs/orbit/dir_000007_000010.html index 4d69e759c9..949d898cab 100644 --- a/docs/orbit/dir_000007_000010.html +++ b/docs/orbit/dir_000007_000010.html @@ -83,7 +83,7 @@ +

Menus → Patterns Relation

File in VortexEngine/src/MenusIncludes file in VortexEngine/src/Patterns
MenuList / EditorConnection.cppPatternArgs.h
MenuList / PatternSelect.cppPattern.h
MenuList / PatternSelect.cppPatternBuilder.h
MenuList / Randomizer.cppPattern.h
MenuList / Randomizer.cppPatternBuilder.h
+

MenuList → Patterns Relation

File in VortexEngine/src/Menus/MenuListIncludes file in VortexEngine/src/Patterns
EditorConnection.cppPatternArgs.h
PatternSelect.cppPattern.h
PatternSelect.cppPatternBuilder.h
Randomizer.cppPattern.h
Randomizer.cppPatternBuilder.h
@@ -138,7 +138,7 @@

Definition at line 11 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

@@ -156,7 +156,7 @@

Definition at line 10 of file DefaultModes.h.

-

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().

+

Referenced by FactoryReset::onLongClick(), and Modes::setDefaults().