Fixed an issue that made it impossible to deactivate timed presets

This commit is contained in:
cschwinne 2020-12-16 00:10:48 +01:00
parent 34c9c5a9b1
commit 84e4a4bb52
3 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,11 @@
### Development versions after 0.11.0 release ### Development versions after 0.11.0 release
#### Build 2012150
- Added Blends FX (PR #1491)
- Fixed an issue that made it impossible to deactivate timed presets
#### Build 2012140 #### Build 2012140
- Added Preset ID quick display option (PR #1462) - Added Preset ID quick display option (PR #1462)

View File

@ -279,11 +279,13 @@ void deserializeConfig() {
CJSON(timerMacro[it], timer[F("macro")]); CJSON(timerMacro[it], timer[F("macro")]);
byte dowPrev = timerWeekday[it]; byte dowPrev = timerWeekday[it];
bool actPrev = timerWeekday[it] & 0x01; //note: act is currently only 0 or 1.
//the reason we are not using bool is that the on-disk type in 0.11.0 was already int
int actPrev = timerWeekday[it] & 0x01;
CJSON(timerWeekday[it], timer[F("dow")]); CJSON(timerWeekday[it], timer[F("dow")]);
if (timerWeekday[it] != dowPrev) { //present in JSON if (timerWeekday[it] != dowPrev) { //present in JSON
timerWeekday[it] <<= 1; //add active bit timerWeekday[it] <<= 1; //add active bit
bool act = timer[F("en")] | actPrev; int act = timer[F("en")] | actPrev;
if (act) timerWeekday[it]++; if (act) timerWeekday[it]++;
} }

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2012140 #define VERSION 2012150
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG