diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5582843d..ba305fbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,18 @@
### Builds after release 0.12.0
-#### Build 2111160
+#### Build 2111220
+
+- Fixed preset cycle not working from preset called by UI
+- Reintroduced permanent min. and max. cycle bounds
+
+#### Build 2111190
+
+- Changed default ESP32 LED pin from 16 to 2
+- Renamed "Running 2" to "Chase 2"
+- Renamed "Tri Chase" to "Chase 3"
+
+#### Build 2111170
- Version bump to 0.13.0-b5 "Toki"
- Improv Serial support (PR #2334)
@@ -388,6 +399,7 @@
- Added support for WESP32 ethernet board (PR #1764)
- Added Caching for main UI (PR #1704)
- Added Tetrix mode (PR #1729)
+- Removed Merry Christmas mode (use "Chase 2" - called Running 2 before 0.13.0)
- Added memory check on Bus creation
#### Build 2102050
diff --git a/readme.md b/readme.md
index 506f7de7..e7682100 100644
--- a/readme.md
+++ b/readme.md
@@ -51,7 +51,7 @@ A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control
See the [documentation on our official site](https://kno.wled.ge)!
-[On this page](https://github.com/Aircoookie/WLED/wiki/Learning-the-ropes) you can find excellent tutorials made by the community and helpful tools to help you get your new lamp up and running!
+[On this page](https://kno.wled.ge/basics/tutorials/) you can find excellent tutorials made by the community and helpful tools to help you get your new lamp up and running!
## 🖼️ Images
@@ -82,7 +82,7 @@ Any | 5v 3-pin ARGB for PC | Any PC RGB device that supports the 5v 3-pin ARGB m
## ✌️ Other
Licensed under the MIT license
-Credits [here](https://github.com/Aircoookie/WLED/wiki/Contributors-&-About)!
+Credits [here](https://kno.wled.ge/about/contributors/)!
Uses Linearicons by Perxis!
diff --git a/wled00/FX.h b/wled00/FX.h
index 6bb7afc1..b88d69bc 100644
--- a/wled00/FX.h
+++ b/wled00/FX.h
@@ -925,9 +925,9 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Solid","Blink","Breathe","Wipe","Wipe Random","Random Colors","Sweep","Dynamic","Colorloop","Rainbow",
"Scan","Scan Dual","Fade","Theater","Theater Rainbow","Running","Saw","Twinkle","Dissolve","Dissolve Rnd",
"Sparkle","Sparkle Dark","Sparkle+","Strobe","Strobe Rainbow","Strobe Mega","Blink Rainbow","Android","Chase","Chase Random",
-"Chase Rainbow","Chase Flash","Chase Flash Rnd","Rainbow Runner","Colorful","Traffic Light","Sweep Random","Running 2","Aurora","Stream",
+"Chase Rainbow","Chase Flash","Chase Flash Rnd","Rainbow Runner","Colorful","Traffic Light","Sweep Random","Chase 2","Aurora","Stream",
"Scanner","Lighthouse","Fireworks","Rain","Tetrix","Fire Flicker","Gradient","Loading","Police","Police All",
-"Two Dots","Two Areas","Running Dual","Halloween","Tri Chase","Tri Wipe","Tri Fade","Lightning","ICU","Multi Comet",
+"Two Dots","Two Areas","Running Dual","Halloween","Chase 3","Tri Wipe","Tri Fade","Lightning","ICU","Multi Comet",
"Scanner Dual","Stream 2","Oscillate","Pride 2015","Juggle","Palette","Fire 2012","Colorwaves","Bpm","Fill Noise",
"Noise 1","Noise 2","Noise 3","Noise 4","Colortwinkles","Lake","Meteor","Meteor Smooth","Railway","Ripple",
"Twinklefox","Twinklecat","Halloween Eyes","Solid Pattern","Solid Pattern Tri","Spots","Spots Fade","Glitter","Candle","Fireworks Starburst",
diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp
index 3f1e1690..7c3d9c86 100644
--- a/wled00/cfg.cpp
+++ b/wled00/cfg.cpp
@@ -223,7 +223,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
CJSON(macroNl, light_nl["macro"]);
JsonObject def = doc[F("def")];
- CJSON(bootPreset, def[F("ps")]);
+ CJSON(bootPreset, def["ps"]);
CJSON(turnOnAtBoot, def["on"]); // true
CJSON(briS, def["bri"]); // 128
@@ -599,7 +599,7 @@ void serializeConfig() {
light_nl["macro"] = macroNl;
JsonObject def = doc.createNestedObject("def");
- def[F("ps")] = bootPreset;
+ def["ps"] = bootPreset;
def["on"] = turnOnAtBoot;
def["bri"] = briS;
diff --git a/wled00/const.h b/wled00/const.h
index 37afca7f..5b834bf3 100644
--- a/wled00/const.h
+++ b/wled00/const.h
@@ -313,15 +313,15 @@
#ifdef ESP8266
#define LEDPIN 2 // GPIO2 (D4) on Wemod D1 mini compatible boards
#else
- #define LEDPIN 16 // aligns with GPIO2 (D4) on Wemos D1 mini32 compatible boards
+ #define LEDPIN 2 // Changed from 16 to restore compatibility with ESP32-pico
#endif
#endif
#ifdef WLED_ENABLE_DMX
#if (LEDPIN == 2)
#undef LEDPIN
- #define LEDPIN 3
- #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 3."
+ #define LEDPIN 1
+ #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 1."
#endif
#endif
diff --git a/wled00/data/style.css b/wled00/data/style.css
index 06c2e8a3..879b19b3 100644
--- a/wled00/data/style.css
+++ b/wled00/data/style.css
@@ -9,6 +9,10 @@ body {
hr {
border-color: #666;
}
+a {
+ color: #28f;
+ text-decoration: none;
+}
button, .btn {
background: #333;
color: #fff;
diff --git a/wled00/html_settings.h b/wled00/html_settings.h
index a41ced99..6df18570 100644
--- a/wled00/html_settings.h
+++ b/wled00/html_settings.h
@@ -6,7 +6,7 @@
*/
// Autogenerated from wled00/data/style.css, do not edit!!
-const char PAGE_settingsCss[] PROGMEM = R"=====()=====";
+const char PAGE_settingsCss[] PROGMEM = R"=====()=====";
// Autogenerated from wled00/data/settings.htm, do not edit!!
diff --git a/wled00/json.cpp b/wled00/json.cpp
index 32eca013..abe8d6f4 100644
--- a/wled00/json.cpp
+++ b/wled00/json.cpp
@@ -150,21 +150,21 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
//temporary, strip object gets updated via colorUpdated()
if (id == strip.getMainSegmentId()) {
- byte effectPrev = effectCurrent;
- effectCurrent = elem["fx"] | effectCurrent;
- if (!presetId && effectCurrent != effectPrev) unloadPlaylist(); //stop playlist if active and FX changed manually
+ if (getVal(elem["fx"], &effectCurrent, 1, strip.getModeCount())) { //load effect ('r' random, '~' inc/dec, 1-255 exact value)
+ if (!presetId) unloadPlaylist(); //stop playlist if active and FX changed manually
+ }
effectSpeed = elem[F("sx")] | effectSpeed;
effectIntensity = elem[F("ix")] | effectIntensity;
- effectPalette = elem["pal"] | effectPalette;
+ getVal(elem["pal"], &effectPalette, 1, strip.getPaletteCount());
} else { //permanent
- byte fx = elem["fx"] | seg.mode;
- if (fx != seg.mode && fx < strip.getModeCount()) {
+ byte fx = seg.mode;
+ if (getVal(elem["fx"], &fx, 1, strip.getModeCount())) { //load effect ('r' random, '~' inc/dec, 1-255 exact value)
strip.setMode(id, fx);
if (!presetId) unloadPlaylist(); //stop playlist if active and FX changed manually
}
seg.speed = elem[F("sx")] | seg.speed;
seg.intensity = elem[F("ix")] | seg.intensity;
- seg.palette = elem["pal"] | seg.palette;
+ getVal(elem["pal"], &seg.palette, 1, strip.getPaletteCount());
}
JsonArray iarr = elem[F("i")]; //set individual LEDs
@@ -346,9 +346,11 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
deletePreset(ps);
}
- if (getVal(root["ps"], &presetCycCurr, 1, 5)) { //load preset (clears state request!)
+ ps = presetCycCurr;
+ if (getVal(root["ps"], &ps, presetCycMin, presetCycMax)) { //load preset (clears state request!)
if (!presetId) unloadPlaylist(); //stop playlist if preset changed manually
- applyPreset(presetCycCurr, callMode);
+ if (ps >= presetCycMin && ps <= presetCycMax) presetCycCurr = ps;
+ applyPreset(ps, callMode);
return stateResponse;
}
@@ -438,7 +440,7 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme
if (!forPreset) {
if (errorFlag) root[F("error")] = errorFlag;
- root[F("ps")] = (currentPreset > 0) ? currentPreset : -1;
+ root["ps"] = (currentPreset > 0) ? currentPreset : -1;
root[F("pl")] = currentPlaylist;
usermods.addToJsonState(root);
diff --git a/wled00/set.cpp b/wled00/set.cpp
index a0e31a2f..187a8618 100644
--- a/wled00/set.cpp
+++ b/wled00/set.cpp
@@ -549,6 +549,7 @@ void parseNumber(const char* str, byte* val, byte minv, byte maxv)
const char* str2 = strchr(str,'~'); //min/max range (for preset cycle, e.g. "1~5~")
if (str2) {
byte p2 = atoi(str2+1);
+ presetCycMin = p1; presetCycMax = p2;
while (isdigit((str2+1)[0])) str2++;
parseNumber(str2+1, val, p1, p2);
} else {
@@ -657,17 +658,14 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply)
pos = req.indexOf(F("PS=")); //saves current in preset
if (pos > 0) savePreset(getNumVal(&req, pos));
- byte presetCycleMin = 1;
- byte presetCycleMax = 5;
-
pos = req.indexOf(F("P1=")); //sets first preset for cycle
- if (pos > 0) presetCycleMin = getNumVal(&req, pos);
+ if (pos > 0) presetCycMin = getNumVal(&req, pos);
pos = req.indexOf(F("P2=")); //sets last preset for cycle
- if (pos > 0) presetCycleMax = getNumVal(&req, pos);
+ if (pos > 0) presetCycMax = getNumVal(&req, pos);
//apply preset
- if (updateVal(&req, "PL=", &presetCycCurr, presetCycleMin, presetCycleMax)) {
+ if (updateVal(&req, "PL=", &presetCycCurr, presetCycMin, presetCycMax)) {
applyPreset(presetCycCurr);
}
diff --git a/wled00/wled.h b/wled00/wled.h
index 40cecd9f..f63ef4b6 100644
--- a/wled00/wled.h
+++ b/wled00/wled.h
@@ -516,6 +516,8 @@ WLED_GLOBAL byte improvError _INIT(0);
WLED_GLOBAL int16_t currentPlaylist _INIT(-1);
//still used for "PL=~" HTTP API command
WLED_GLOBAL byte presetCycCurr _INIT(0);
+WLED_GLOBAL byte presetCycMin _INIT(1);
+WLED_GLOBAL byte presetCycMax _INIT(5);
// realtime
WLED_GLOBAL byte realtimeMode _INIT(REALTIME_MODE_INACTIVE);