Release of WLED v0.11.0

This commit is contained in:
cschwinne 2020-11-29 22:07:12 +01:00
parent c01dd232c5
commit 3a3948e74f
5 changed files with 35 additions and 20 deletions

View File

@ -2,6 +2,13 @@
### WLED version 0.11.0 ### WLED version 0.11.0
#### Build 2011290
- Release of WLED 0.11.0 "Mirai"
- Workaround for weird empty %f Espalexa issue
- Fixed crash on saving preset with HTTP API `PS`
- Improved performance for color changes in non-main segment
#### Build 2011270 #### Build 2011270
- Added tooltips for speed and intensity sliders (PR #1378) - Added tooltips for speed and intensity sliders (PR #1378)

View File

@ -68,6 +68,7 @@ void deserializeSegment(JsonObject elem, byte it)
if (i == 1) {colSec[0] = rgbw[0]; colSec[1] = rgbw[1]; colSec[2] = rgbw[2]; colSec[3] = rgbw[3];} if (i == 1) {colSec[0] = rgbw[0]; colSec[1] = rgbw[1]; colSec[2] = rgbw[2]; colSec[3] = rgbw[3];}
} else { //normal case, apply directly to segment (=> no transition!) } else { //normal case, apply directly to segment (=> no transition!)
seg.colors[i] = ((rgbw[3] << 24) | ((rgbw[0]&0xFF) << 16) | ((rgbw[1]&0xFF) << 8) | ((rgbw[2]&0xFF))); seg.colors[i] = ((rgbw[3] << 24) | ((rgbw[0]&0xFF) << 16) | ((rgbw[1]&0xFF) << 8) | ((rgbw[2]&0xFF)));
if (seg.mode == FX_MODE_STATIC) strip.trigger(); //instant refresh
} }
} }
} }

View File

@ -37,33 +37,37 @@ bool applyPreset(byte index)
void savePreset(byte index, bool persist, const char* pname, JsonObject saveobj) void savePreset(byte index, bool persist, const char* pname, JsonObject saveobj)
{ {
if (index == 0 || index > 250) return; if (index == 0 || index > 250) return;
bool docAlloc = fileDoc; bool docAlloc = (fileDoc != nullptr);
JsonObject sObj = saveobj; JsonObject sObj = saveobj;
if (!docAlloc) { if (!docAlloc) {
DEBUGFS_PRINTLN(F("Allocating saving buffer")); DEBUGFS_PRINTLN(F("Allocating saving buffer"));
fileDoc = new DynamicJsonDocument(JSON_BUFFER_SIZE); DynamicJsonDocument lDoc(JSON_BUFFER_SIZE);
sObj = fileDoc->to<JsonObject>(); sObj = lDoc.to<JsonObject>();
if (pname) sObj["n"] = pname; if (pname) sObj["n"] = pname;
} else { DEBUGFS_PRINTLN(F("Save current state"));
serializeState(sObj, true);
currentPreset = index;
writeObjectToFileUsingId("/presets.json", index, &lDoc);
} else { //from JSON API
DEBUGFS_PRINTLN(F("Reuse recv buffer")); DEBUGFS_PRINTLN(F("Reuse recv buffer"));
sObj.remove(F("psave")); sObj.remove(F("psave"));
sObj.remove(F("v")); sObj.remove(F("v"));
}
if (!sObj["o"]) { if (!sObj["o"]) {
DEBUGFS_PRINTLN(F("Save current state")); DEBUGFS_PRINTLN(F("Save current state"));
serializeState(sObj, true, sObj["ib"], sObj["sb"]); serializeState(sObj, true, sObj["ib"], sObj["sb"]);
currentPreset = index; currentPreset = index;
} }
sObj.remove("o"); sObj.remove("o");
sObj.remove("ib"); sObj.remove("ib");
sObj.remove("sb"); sObj.remove("sb");
sObj.remove(F("error")); sObj.remove(F("error"));
sObj.remove(F("time")); sObj.remove(F("time"));
writeObjectToFileUsingId("/presets.json", index, fileDoc); writeObjectToFileUsingId("/presets.json", index, fileDoc);
if (!docAlloc) delete fileDoc; }
presetsModifiedTime = now(); //unix time presetsModifiedTime = now(); //unix time
updateFSInfo(); updateFSInfo();
} }

View File

@ -144,8 +144,11 @@ private:
char buf_col[80] = ""; char buf_col[80] = "";
//color support //color support
if (static_cast<uint8_t>(dev->getType()) > 2) if (static_cast<uint8_t>(dev->getType()) > 2)
sprintf_P(buf_col,PSTR(",\"hue\":%u,\"sat\":%u,\"effect\":\"none\",\"xy\":[%f,%f]") //TODO: %f is not working for some reason on ESP8266 in v0.11.0 (was fine in 0.10.2). Need to investigate
,dev->getHue(), dev->getSat(), dev->getX(), dev->getY()); //sprintf_P(buf_col,PSTR(",\"hue\":%u,\"sat\":%u,\"effect\":\"none\",\"xy\":[%f,%f]")
// ,dev->getHue(), dev->getSat(), dev->getX(), dev->getY());
sprintf_P(buf_col,PSTR(",\"hue\":%u,\"sat\":%u,\"effect\":\"none\",\"xy\":[%s,%s]"),dev->getHue(), dev->getSat(),
((String)dev->getX()).c_str(), ((String)dev->getY()).c_str());
char buf_ct[16] = ""; char buf_ct[16] = "";
//white spectrum support //white spectrum support

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2011270 #define VERSION 2011290
//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