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
#### 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
- 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];}
} 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)));
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)
{
if (index == 0 || index > 250) return;
bool docAlloc = fileDoc;
bool docAlloc = (fileDoc != nullptr);
JsonObject sObj = saveobj;
if (!docAlloc) {
DEBUGFS_PRINTLN(F("Allocating saving buffer"));
fileDoc = new DynamicJsonDocument(JSON_BUFFER_SIZE);
sObj = fileDoc->to<JsonObject>();
DynamicJsonDocument lDoc(JSON_BUFFER_SIZE);
sObj = lDoc.to<JsonObject>();
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"));
sObj.remove(F("psave"));
sObj.remove(F("v"));
}
if (!sObj["o"]) {
DEBUGFS_PRINTLN(F("Save current state"));
serializeState(sObj, true, sObj["ib"], sObj["sb"]);
currentPreset = index;
}
sObj.remove("o");
sObj.remove("ib");
sObj.remove("sb");
sObj.remove(F("error"));
sObj.remove(F("time"));
if (!sObj["o"]) {
DEBUGFS_PRINTLN(F("Save current state"));
serializeState(sObj, true, sObj["ib"], sObj["sb"]);
currentPreset = index;
}
sObj.remove("o");
sObj.remove("ib");
sObj.remove("sb");
sObj.remove(F("error"));
sObj.remove(F("time"));
writeObjectToFileUsingId("/presets.json", index, fileDoc);
if (!docAlloc) delete fileDoc;
writeObjectToFileUsingId("/presets.json", index, fileDoc);
}
presetsModifiedTime = now(); //unix time
updateFSInfo();
}

View File

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

View File

@ -8,7 +8,7 @@
*/
// 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
//#define WLED_USE_MY_CONFIG