Only add 16 to macros if they are not 0

This commit is contained in:
cschwinne 2020-11-09 20:48:44 +01:00
parent 7f973ad131
commit 9d7f1d230c
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2011091
#define VERSION 2011092
// ESP8266-01 (blue) got too little storage space to work with WLED. 0.10.2 is the last release supporting this unit.

View File

@ -208,7 +208,8 @@ void loadSettingsFromEEPROM()
timerHours[i] = EEPROM.read(2260 + i);
timerMinutes[i] = EEPROM.read(2270 + i);
timerWeekday[i] = EEPROM.read(2280 + i);
timerMacro[i] = EEPROM.read(2290 + i) + 16; //add 16 to work with macro --> preset mapping
timerMacro[i] = EEPROM.read(2290 + i);
if (timerMacro[i] > 0) timerMacro[i] += 16; //add 16 to work with macro --> preset mapping
if (timerWeekday[i] == 0) timerWeekday[i] = 255;
if (timerMacro[i] == 0) timerWeekday[i] = timerWeekday[i] & 0b11111110;
}