kopia lustrzana https://github.com/Aircoookie/WLED
Fixed analog overlay not settable
rodzic
a2c8796e04
commit
eca3f12fed
|
@ -363,10 +363,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||||
CJSON(latitude, if_ntp[F("lt")]);
|
CJSON(latitude, if_ntp[F("lt")]);
|
||||||
|
|
||||||
JsonObject ol = doc[F("ol")];
|
JsonObject ol = doc[F("ol")];
|
||||||
prev = overlayDefault;
|
CJSON(overlayCurrent ,ol[F("clock")]); // 0
|
||||||
CJSON(overlayDefault ,ol[F("clock")]); // 0
|
|
||||||
CJSON(countdownMode, ol[F("cntdwn")]);
|
CJSON(countdownMode, ol[F("cntdwn")]);
|
||||||
if (prev != overlayDefault) overlayCurrent = overlayDefault;
|
|
||||||
|
|
||||||
CJSON(overlayMin, ol["min"]);
|
CJSON(overlayMin, ol["min"]);
|
||||||
CJSON(overlayMax, ol[F("max")]);
|
CJSON(overlayMax, ol[F("max")]);
|
||||||
|
@ -772,7 +770,7 @@ void serializeConfig() {
|
||||||
if_ntp[F("lt")] = latitude;
|
if_ntp[F("lt")] = latitude;
|
||||||
|
|
||||||
JsonObject ol = doc.createNestedObject("ol");
|
JsonObject ol = doc.createNestedObject("ol");
|
||||||
ol[F("clock")] = overlayDefault;
|
ol[F("clock")] = overlayCurrent;
|
||||||
ol[F("cntdwn")] = countdownMode;
|
ol[F("cntdwn")] = countdownMode;
|
||||||
|
|
||||||
ol["min"] = overlayMin;
|
ol["min"] = overlayMin;
|
||||||
|
|
|
@ -322,10 +322,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||||
// force a sunrise/sunset re-calculation
|
// force a sunrise/sunset re-calculation
|
||||||
calculateSunriseAndSunset();
|
calculateSunriseAndSunset();
|
||||||
|
|
||||||
if (request->hasArg(F("OL"))) {
|
overlayCurrent = request->hasArg(F("OL")) ? 1 : 0;
|
||||||
overlayDefault = request->arg(F("OL")).toInt();
|
|
||||||
overlayCurrent = overlayDefault;
|
|
||||||
}
|
|
||||||
|
|
||||||
overlayMin = request->arg(F("O1")).toInt();
|
overlayMin = request->arg(F("O1")).toInt();
|
||||||
overlayMax = request->arg(F("O2")).toInt();
|
overlayMax = request->arg(F("O2")).toInt();
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2203060
|
#define VERSION 2203061
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
@ -383,7 +383,7 @@ WLED_GLOBAL bool useAMPM _INIT(false); // 12h/24h clock format
|
||||||
WLED_GLOBAL byte currentTimezone _INIT(0); // Timezone ID. Refer to timezones array in wled10_ntp.ino
|
WLED_GLOBAL byte currentTimezone _INIT(0); // Timezone ID. Refer to timezones array in wled10_ntp.ino
|
||||||
WLED_GLOBAL int utcOffsetSecs _INIT(0); // Seconds to offset from UTC before timzone calculation
|
WLED_GLOBAL int utcOffsetSecs _INIT(0); // Seconds to offset from UTC before timzone calculation
|
||||||
|
|
||||||
WLED_GLOBAL byte overlayDefault _INIT(0); // 0: no overlay 1: analog clock 2: was single-digit clock 3: was cronixie
|
WLED_GLOBAL byte overlayCurrent _INIT(0); // 0: no overlay 1: analog clock 2: was single-digit clock 3: was cronixie
|
||||||
WLED_GLOBAL byte overlayMin _INIT(0), overlayMax _INIT(DEFAULT_LED_COUNT - 1); // boundaries of overlay mode
|
WLED_GLOBAL byte overlayMin _INIT(0), overlayMax _INIT(DEFAULT_LED_COUNT - 1); // boundaries of overlay mode
|
||||||
|
|
||||||
WLED_GLOBAL byte analogClock12pixel _INIT(0); // The pixel in your strip where "midnight" would be
|
WLED_GLOBAL byte analogClock12pixel _INIT(0); // The pixel in your strip where "midnight" would be
|
||||||
|
@ -496,9 +496,6 @@ WLED_GLOBAL bool hueAuthRequired _INIT(false);
|
||||||
WLED_GLOBAL bool hueReceived _INIT(false);
|
WLED_GLOBAL bool hueReceived _INIT(false);
|
||||||
WLED_GLOBAL bool hueStoreAllowed _INIT(false), hueNewKey _INIT(false);
|
WLED_GLOBAL bool hueStoreAllowed _INIT(false), hueNewKey _INIT(false);
|
||||||
|
|
||||||
// overlays
|
|
||||||
WLED_GLOBAL byte overlayCurrent _INIT(overlayDefault);
|
|
||||||
|
|
||||||
// countdown
|
// countdown
|
||||||
WLED_GLOBAL unsigned long countdownTime _INIT(1514764800L);
|
WLED_GLOBAL unsigned long countdownTime _INIT(1514764800L);
|
||||||
WLED_GLOBAL bool countdownOverTriggered _INIT(true);
|
WLED_GLOBAL bool countdownOverTriggered _INIT(true);
|
||||||
|
|
|
@ -141,8 +141,7 @@ void loadSettingsFromEEPROM()
|
||||||
useAMPM = EEPROM.read(329);
|
useAMPM = EEPROM.read(329);
|
||||||
strip.gammaCorrectBri = EEPROM.read(330);
|
strip.gammaCorrectBri = EEPROM.read(330);
|
||||||
strip.gammaCorrectCol = EEPROM.read(331);
|
strip.gammaCorrectCol = EEPROM.read(331);
|
||||||
overlayDefault = EEPROM.read(332);
|
overlayCurrent = EEPROM.read(332);
|
||||||
if (lastEEPROMversion < 8 && overlayDefault > 0) overlayDefault--; //overlay mode 1 (solid) was removed
|
|
||||||
|
|
||||||
alexaEnabled = EEPROM.read(333);
|
alexaEnabled = EEPROM.read(333);
|
||||||
|
|
||||||
|
@ -360,8 +359,6 @@ void loadSettingsFromEEPROM()
|
||||||
//2551 - 2559 reserved for Usermods, usable by default
|
//2551 - 2559 reserved for Usermods, usable by default
|
||||||
//2560 - 2943 usable, NOT reserved (need to increase EEPSIZE accordingly, new WLED core features may override this section)
|
//2560 - 2943 usable, NOT reserved (need to increase EEPSIZE accordingly, new WLED core features may override this section)
|
||||||
//2944 - 3071 reserved for Usermods (need to increase EEPSIZE to 3072 in const.h)
|
//2944 - 3071 reserved for Usermods (need to increase EEPSIZE to 3072 in const.h)
|
||||||
|
|
||||||
overlayCurrent = overlayDefault;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -575,7 +575,7 @@ void getSettingsJS(byte subPage, char* dest)
|
||||||
sprintf_P(tm, PSTR("Sunrise: %02d:%02d Sunset: %02d:%02d"), hour(sunrise), minute(sunrise), hour(sunset), minute(sunset));
|
sprintf_P(tm, PSTR("Sunrise: %02d:%02d Sunset: %02d:%02d"), hour(sunrise), minute(sunrise), hour(sunset), minute(sunset));
|
||||||
sappends('m',SET_F("(\"times\")[1]"),tm);
|
sappends('m',SET_F("(\"times\")[1]"),tm);
|
||||||
}
|
}
|
||||||
sappend('i',SET_F("OL"),overlayCurrent);
|
sappend('c',SET_F("OL"),overlayCurrent);
|
||||||
sappend('v',SET_F("O1"),overlayMin);
|
sappend('v',SET_F("O1"),overlayMin);
|
||||||
sappend('v',SET_F("O2"),overlayMax);
|
sappend('v',SET_F("O2"),overlayMax);
|
||||||
sappend('v',SET_F("OM"),analogClock12pixel);
|
sappend('v',SET_F("OM"),analogClock12pixel);
|
||||||
|
|
Ładowanie…
Reference in New Issue