Merge branch '0_15' of https://github.com/Aircoookie/WLED into ledmaps-realtime
This commit is contained in:
@@ -31,9 +31,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
getStringFromJson(cmDNS, id[F("mdns")], 33);
|
||||
getStringFromJson(serverDescription, id[F("name")], 33);
|
||||
getStringFromJson(alexaInvocationName, id[F("inv")], 33);
|
||||
#ifdef WLED_ENABLE_SIMPLE_UI
|
||||
CJSON(simplifiedUI, id[F("sui")]);
|
||||
#endif
|
||||
|
||||
JsonObject nw = doc["nw"];
|
||||
#ifndef WLED_DISABLE_ESPNOW
|
||||
@@ -88,11 +86,10 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
// initialize LED pins and lengths prior to other HW (except for ethernet)
|
||||
JsonObject hw_led = hw["led"];
|
||||
|
||||
uint8_t autoWhiteMode = RGBW_MODE_MANUAL_ONLY;
|
||||
uint16_t total = hw_led[F("total")] | strip.getLengthTotal();
|
||||
CJSON(strip.ablMilliampsMax, hw_led[F("maxpwr")]);
|
||||
CJSON(strip.milliampsPerLed, hw_led[F("ledma")]); // no longer used
|
||||
Bus::setGlobalAWMode(hw_led[F("rgbwm")] | 255);
|
||||
Bus::setGlobalAWMode(hw_led[F("rgbwm")] | AW_GLOBAL_DISABLED);
|
||||
CJSON(correctWB, hw_led["cct"]);
|
||||
CJSON(cctFromRgb, hw_led[F("cr")]);
|
||||
CJSON(strip.cctBlending, hw_led[F("cb")]);
|
||||
@@ -158,7 +155,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
}
|
||||
|
||||
uint16_t length = elm["len"] | 1;
|
||||
uint8_t colorOrder = (int)elm[F("order")];
|
||||
uint8_t colorOrder = (int)elm[F("order")]; // contains white channel swap option in upper nibble
|
||||
uint8_t skipFirst = elm[F("skip")];
|
||||
uint16_t start = elm["start"] | 0;
|
||||
if (length==0 || start + length > MAX_LEDS) continue; // zero length or we reached max. number of LEDs, just stop
|
||||
@@ -166,7 +163,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
bool reversed = elm["rev"];
|
||||
bool refresh = elm["ref"] | false;
|
||||
uint16_t freqkHz = elm[F("freq")] | 0; // will be in kHz for DotStar and Hz for PWM (not yet implemented fully)
|
||||
uint8_t AWmode = elm[F("rgbwm")] | autoWhiteMode;
|
||||
uint8_t AWmode = elm[F("rgbwm")] | RGBW_MODE_MANUAL_ONLY;
|
||||
uint8_t maPerLed = elm[F("ledma")] | strip.milliampsPerLed; // replace with 55 when removing strip.milliampsPerLed
|
||||
uint16_t maMax = elm[F("maxpwr")] | (strip.ablMilliampsMax * length) / total; // rough (incorrect?) per strip ABL calculation when no config exists
|
||||
// To disable brightness limiter we either set output max current to 0 or single LED current to 0 (we choose output max current)
|
||||
@@ -657,9 +654,7 @@ void serializeConfig() {
|
||||
id[F("mdns")] = cmDNS;
|
||||
id[F("name")] = serverDescription;
|
||||
id[F("inv")] = alexaInvocationName;
|
||||
#ifdef WLED_ENABLE_SIMPLE_UI
|
||||
id[F("sui")] = simplifiedUI;
|
||||
#endif
|
||||
|
||||
JsonObject nw = doc.createNestedObject("nw");
|
||||
#ifndef WLED_DISABLE_ESPNOW
|
||||
|
||||
Reference in New Issue
Block a user