Skip to content

Commit

Permalink
Fixed an issue that made it impossible to deactivate timed presets
Browse files Browse the repository at this point in the history
  • Loading branch information
Aircoookie committed Dec 15, 2020
1 parent 34c9c5a commit 84e4a4b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

### 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

- Added Preset ID quick display option (PR #1462)
Expand Down
6 changes: 4 additions & 2 deletions wled00/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ void deserializeConfig() {
CJSON(timerMacro[it], timer[F("macro")]);

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")]);
if (timerWeekday[it] != dowPrev) { //present in JSON
timerWeekday[it] <<= 1; //add active bit
bool act = timer[F("en")] | actPrev;
int act = timer[F("en")] | actPrev;
if (act) timerWeekday[it]++;
}

Expand Down
2 changes: 1 addition & 1 deletion wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// 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
//#define WLED_USE_MY_CONFIG
Expand Down

0 comments on commit 84e4a4b

Please sign in to comment.