From 84e4a4bb5218b7501ec5006d38b9067c683e4445 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Wed, 16 Dec 2020 00:10:48 +0100 Subject: [PATCH] Fixed an issue that made it impossible to deactivate timed presets --- CHANGELOG.md | 5 +++++ wled00/cfg.cpp | 6 ++++-- wled00/wled.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e779b2c0..55503660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 0a22ee2c..7904f272 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -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]++; } diff --git a/wled00/wled.h b/wled00/wled.h index fada17d9..bd4de87f 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -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