Only add 16 to macros if they are not 0

pull/1332/head^2
cschwinne 2020-11-09 20:48:44 +01:00
rodzic 7f973ad131
commit 9d7f1d230c
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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.

Wyświetl plik

@ -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;
}