Fixed preset only disabling on second effect/color change (fixes #2038 )

This commit is contained in:
cschwinne 2021-06-25 10:12:21 +02:00
parent 1e5420e6a7
commit 4cd3a614de
4 changed files with 6 additions and 5 deletions

View File

@ -2,6 +2,10 @@
### Builds after release 0.12.0
#### Build 2106250
- Fixed preset only disabling on second effect/color change
#### Build 2106241
- BREAKING: Added ability for usermods to force a config save if config incomplete. `readFromConfig()` needs to return a `bool` to indicate if the config is complete

View File

@ -111,8 +111,7 @@ void colorUpdated(int callMode)
{
effectChanged = false;
if (realtimeTimeout == UINT32_MAX) realtimeTimeout = 0;
if (isPreset) {isPreset = false;}
else {currentPreset = -1;}
currentPreset = -1; //something changed, so we are no longer in the preset
notify(callMode);

View File

@ -29,7 +29,6 @@ bool applyPreset(byte index)
if (!errorFlag) {
currentPreset = index;
isPreset = true;
return true;
}
return false;

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2106240
#define VERSION 2106250
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG
@ -562,7 +562,6 @@ WLED_GLOBAL bool doCloseFile _INIT(false);
// presets
WLED_GLOBAL int16_t currentPreset _INIT(-1);
WLED_GLOBAL bool isPreset _INIT(false);
WLED_GLOBAL byte errorFlag _INIT(0);