From 9d7f1d230cba26fc9f8f77fa2f9da0c29a7c15b0 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Mon, 9 Nov 2020 20:48:44 +0100 Subject: [PATCH] Only add 16 to macros if they are not 0 --- wled00/wled.h | 2 +- wled00/wled_eeprom.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wled00/wled.h b/wled00/wled.h index 36884a7f..2f59cb51 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -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. diff --git a/wled00/wled_eeprom.cpp b/wled00/wled_eeprom.cpp index aa3ddf9d..a67443a3 100644 --- a/wled00/wled_eeprom.cpp +++ b/wled00/wled_eeprom.cpp @@ -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; }