Merge branch 'master' into dev

Retained GPIO16 as default on ESP32.
This commit is contained in:
Blaz Kristan 2021-11-22 22:50:26 +01:00
commit b07bbab069
7 changed files with 30 additions and 17 deletions

View File

@ -2,7 +2,18 @@
### Builds after release 0.12.0 ### 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" - Version bump to 0.13.0-b5 "Toki"
- Improv Serial support (PR #2334) - Improv Serial support (PR #2334)
@ -388,6 +399,7 @@
- Added support for WESP32 ethernet board (PR #1764) - Added support for WESP32 ethernet board (PR #1764)
- Added Caching for main UI (PR #1704) - Added Caching for main UI (PR #1704)
- Added Tetrix mode (PR #1729) - 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 - Added memory check on Bus creation
#### Build 2102050 #### Build 2102050

View File

@ -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)! 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 ## 🖼️ Images
<img src="/images/macbook-pro-space-gray-on-the-wooden-table.jpg" width="50%"><img src="/images/walking-with-iphone-x.jpg" width="50%"> <img src="/images/macbook-pro-space-gray-on-the-wooden-table.jpg" width="50%"><img src="/images/walking-with-iphone-x.jpg" width="50%">
@ -82,7 +82,7 @@ Any | 5v 3-pin ARGB for PC | Any PC RGB device that supports the 5v 3-pin ARGB m
## ✌️ Other ## ✌️ Other
Licensed under the MIT license 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! Uses Linearicons by Perxis!

View File

@ -967,7 +967,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Colorful", "Colorful",
"Traffic Light", "Traffic Light",
"Sweep Random", "Sweep Random",
"Running 2@!,Width;!,!,;!", "Chase 2@!,Width;!,!,;!",
"Aurora", "Aurora",
"Stream", "Stream",
"Scanner", "Scanner",
@ -984,7 +984,7 @@ const char JSON_mode_names[] PROGMEM = R"=====([
"Two Areas@!,Size;1,2,Bg;!", "Two Areas@!,Size;1,2,Bg;!",
"Running Dual", "Running Dual",
"Halloween", "Halloween",
"Tri Chase@!,Size;1,2,3;", "Chase 3@!,Size;1,2,3;",
"Tri Wipe@!,Width;1,2,3;", "Tri Wipe@!,Width;1,2,3;",
"Tri Fade", "Tri Fade",
"Lightning", "Lightning",

View File

@ -320,8 +320,8 @@
#ifdef WLED_ENABLE_DMX #ifdef WLED_ENABLE_DMX
#if (LEDPIN == 2) #if (LEDPIN == 2)
#undef LEDPIN #undef LEDPIN
#define LEDPIN 3 #define LEDPIN 1
#warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 3." #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 1."
#endif #endif
#endif #endif

View File

@ -355,10 +355,11 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
deletePreset(ps); deletePreset(ps);
} }
if (getVal(root["ps"], &presetCycCurr, 1, 5)) { //load preset (clears state request!) ps = presetCycCurr;
DEBUG_PRINTLN(F("Applying preset")); if (getVal(root["ps"], &ps, presetCycMin, presetCycMax)) { //load preset (clears state request!)
if (!presetId) unloadPlaylist(); //stop playlist if preset changed manually if (!presetId) unloadPlaylist(); //stop playlist if preset changed manually
applyPreset(presetCycCurr, callMode); if (ps >= presetCycMin && ps <= presetCycMax) presetCycCurr = ps;
applyPreset(ps, callMode);
return stateResponse; return stateResponse;
} }

View File

@ -538,6 +538,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~") const char* str2 = strchr(str,'~'); //min/max range (for preset cycle, e.g. "1~5~")
if (str2) { if (str2) {
byte p2 = atoi(str2+1); byte p2 = atoi(str2+1);
presetCycMin = p1; presetCycMax = p2;
while (isdigit((str2+1)[0])) str2++; while (isdigit((str2+1)[0])) str2++;
parseNumber(str2+1, val, p1, p2); parseNumber(str2+1, val, p1, p2);
} else { } else {
@ -646,17 +647,14 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply)
pos = req.indexOf(F("PS=")); //saves current in preset pos = req.indexOf(F("PS=")); //saves current in preset
if (pos > 0) savePreset(getNumVal(&req, pos)); if (pos > 0) savePreset(getNumVal(&req, pos));
byte presetCycleMin = 1;
byte presetCycleMax = 5;
pos = req.indexOf(F("P1=")); //sets first preset for cycle 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 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 //apply preset
if (updateVal(&req, "PL=", &presetCycCurr, presetCycleMin, presetCycleMax)) { if (updateVal(&req, "PL=", &presetCycCurr, presetCycMin, presetCycMax)) {
applyPreset(presetCycCurr); applyPreset(presetCycCurr);
} }

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2111211 #define VERSION 2111220
//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
@ -520,6 +520,8 @@ WLED_GLOBAL byte improvError _INIT(0);
WLED_GLOBAL int16_t currentPlaylist _INIT(-1); WLED_GLOBAL int16_t currentPlaylist _INIT(-1);
//still used for "PL=~" HTTP API command //still used for "PL=~" HTTP API command
WLED_GLOBAL byte presetCycCurr _INIT(0); WLED_GLOBAL byte presetCycCurr _INIT(0);
WLED_GLOBAL byte presetCycMin _INIT(1);
WLED_GLOBAL byte presetCycMax _INIT(5);
// realtime // realtime
WLED_GLOBAL byte realtimeMode _INIT(REALTIME_MODE_INACTIVE); WLED_GLOBAL byte realtimeMode _INIT(REALTIME_MODE_INACTIVE);