Merge remote-tracking branch 'upstream/0_14' into dev

This commit is contained in:
Blaz Kristan 2022-08-22 19:37:17 +02:00
commit b8b3d17570
12 changed files with 2931 additions and 2918 deletions

View File

@ -3,5 +3,8 @@
// for the documentation about the extensions.json format // for the documentation about the extensions.json format
"recommendations": [ "recommendations": [
"platformio.platformio-ide" "platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
] ]
} }

View File

@ -35,6 +35,7 @@ default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s
; default_envs = wemos_shield_esp32 ; default_envs = wemos_shield_esp32
; default_envs = m5atom ; default_envs = m5atom
; default_envs = esp32_eth ; default_envs = esp32_eth
; default_envs = esp32dev_qio80
; default_envs = esp32_eth_ota1mapp ; default_envs = esp32_eth_ota1mapp
; default_envs = esp32s2_saola ; default_envs = esp32s2_saola
@ -330,6 +331,18 @@ lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions} board_build.partitions = ${esp32.default_partitions}
[env:esp32dev_qio80]
board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_qio80 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio
[env:esp32_eth] [env:esp32_eth]
board = esp32-poe board = esp32-poe
platform = ${esp32.platform} platform = ${esp32.platform}

View File

@ -1,54 +1,70 @@
# #
# This file is autogenerated by pip-compile # This file is autogenerated by pip-compile with python 3.8
# To update, run: # To update, run:
# #
# pip-compile # pip-compile
# #
aiofiles==0.6.0 aiofiles==0.8.0
# via platformio # via platformio
ajsonrpc==1.1.0 ajsonrpc==1.2.0
# via platformio # via platformio
bottle==0.12.20 anyio==3.6.1
# via starlette
async-timeout==4.0.2
# via zeroconf
bottle==0.12.23
# via platformio # via platformio
certifi==2020.12.5 certifi==2022.6.15
# via requests # via requests
chardet==4.0.0 charset-normalizer==2.1.1
# via requests # via requests
click==7.1.2 click==8.1.3
# via # via
# platformio # platformio
# uvicorn # uvicorn
colorama==0.4.4 colorama==0.4.5
# via platformio # via
h11==0.12.0 # click
# platformio
h11==0.13.0
# via # via
# uvicorn # uvicorn
# wsproto # wsproto
idna==2.10 idna==3.3
# via requests # via
ifaddr==0.1.7 # anyio
# requests
ifaddr==0.2.0
# via zeroconf # via zeroconf
marshmallow==3.11.1 marshmallow==3.17.0
# via platformio # via platformio
platformio==5.1.1 packaging==21.3
# via marshmallow
platformio==6.1.4
# via -r requirements.in # via -r requirements.in
pyelftools==0.27 pyelftools==0.29
# via platformio # via platformio
pyparsing==3.0.9
# via packaging
pyserial==3.5 pyserial==3.5
# via platformio # via platformio
requests==2.25.1 requests==2.28.1
# via platformio # via platformio
semantic-version==2.8.5 semantic-version==2.10.0
# via platformio # via platformio
starlette==0.14.2 sniffio==1.2.0
# via anyio
starlette==0.20.4
# via platformio # via platformio
tabulate==0.8.9 tabulate==0.8.10
# via platformio # via platformio
urllib3==1.26.5 typing-extensions==4.3.0
# via starlette
urllib3==1.26.11
# via requests # via requests
uvicorn==0.13.4 uvicorn==0.18.2
# via platformio # via platformio
wsproto==1.0.0 wsproto==1.1.0
# via platformio # via platformio
zeroconf==0.28.8 zeroconf==0.39.0
# via platformio # via platformio

View File

@ -135,7 +135,7 @@ class PWMFanUsermod : public Usermod {
} }
void updateFanSpeed(uint8_t pwmValue){ void updateFanSpeed(uint8_t pwmValue){
if (pwmPin < 0) return; if (!enabled || pwmPin < 0) return;
#ifdef ESP8266 #ifdef ESP8266
analogWrite(pwmPin, pwmValue); analogWrite(pwmPin, pwmValue);

View File

@ -826,7 +826,7 @@ function populateEffects()
}); });
for (let ef of effects) { for (let ef of effects) {
// WLEDSR: add slider and color control to setX (used by requestjson) // WLEDSR: add slider and color control to setFX (used by requestjson)
let id = ef.id; let id = ef.id;
let nm = ef.name+" "; let nm = ef.name+" ";
let fd = ""; let fd = "";
@ -845,7 +845,7 @@ function populateEffects()
if (r.substring(0,2)=="fr") nm += "&#9835;"; // frequency effects if (r.substring(0,2)=="fr") nm += "&#9835;"; // frequency effects
} }
} }
html += generateListItemHtml('fx',id,nm,'setX','',fd); html += generateListItemHtml('fx',id,nm,'setFX','',fd);
} }
} }
@ -1394,7 +1394,7 @@ function setEffectParameters(idx)
let top = parseInt(getComputedStyle(gId("sliders")).height); let top = parseInt(getComputedStyle(gId("sliders")).height);
top += 5; top += 5;
let sel = d.querySelector('#fxlist .selected'); let sel = d.querySelector('#fxlist .selected');
if (sel) sel.style.bottom = top + "px"; // we will need to remove this when unselected (in setX()) if (sel) sel.style.bottom = top + "px"; // we will need to remove this when unselected (in setFX())
},750); },750);
// set html color items on/off // set html color items on/off
var cslLabel = ''; var cslLabel = '';
@ -2075,24 +2075,15 @@ function tglFreeze(s=null)
requestJson(obj); requestJson(obj);
} }
function setX(ind = null) function setFX(ind = null)
{ {
if (ind === null) { if (ind === null) {
ind = parseInt(d.querySelector('#fxlist input[name="fx"]:checked').value); ind = parseInt(d.querySelector('#fxlist input[name="fx"]:checked').value);
} else { } else {
d.querySelector(`#fxlist input[name="fx"][value="${ind}"]`).checked = true; d.querySelector(`#fxlist input[name="fx"][value="${ind}"]`).checked = true;
} }
/*
// this code also in updateSelectedFx
var selElement = d.querySelector('#fxlist .selected');
if (selElement) {
selElement.classList.remove('selected');
selElement.style.bottom = null; // remove element style added in slider handling
}
d.querySelector(`#fxlist .lstI[data-id="${ind}"]`).classList.add('selected'); var obj = {"seg": {"fx": parseInt(ind),"fxdef":1}}; // fxdef sets effect parameters to default values, TODO add client setting
*/
var obj = {"seg": {"fx": parseInt(ind)}};
requestJson(obj); requestJson(obj);
} }
@ -2103,13 +2094,7 @@ function setPalette(paletteId = null)
} else { } else {
d.querySelector(`#pallist input[name="palette"][value="${paletteId}"]`).checked = true; d.querySelector(`#pallist input[name="palette"][value="${paletteId}"]`).checked = true;
} }
/*
var selElement = d.querySelector('#pallist .selected');
if (selElement) {
selElement.classList.remove('selected')
}
d.querySelector(`#pallist .lstI[data-id="${paletteId}"]`).classList.add('selected');
*/
var obj = {"seg": {"pal": paletteId}}; var obj = {"seg": {"pal": paletteId}};
requestJson(obj); requestJson(obj);
} }

View File

@ -211,7 +211,7 @@
<i class="icons search-icon">&#xe0a1;</i> <i class="icons search-icon">&#xe0a1;</i>
</div> </div>
<div id="fxlist" class="list"> <div id="fxlist" class="list">
<div class="lstI" data-id="0" onClick="setX(0)"><a href="#0" onClick="setX(0)">Solid</a></div> <div class="lstI" data-id="0" onClick="setEffect(0)"><a href="#0" onClick="setEffect(0)">Solid</a></div>
</div> </div>
</div> </div>
<div id="palDropdown" class="dd-content"> <div id="palDropdown" class="dd-content">

View File

@ -1124,7 +1124,7 @@ function setSegBri(s)
function setEffect(ind = 0) function setEffect(ind = 0)
{ {
tglFxDropdown(); tglFxDropdown();
var obj = {"seg": {"fx": parseInt(ind)}}; var obj = {"seg": {"fx": parseInt(ind), "fxdef":true}}; // fxdef sets effect parameters to default values, TODO add client setting
requestJson(obj); requestJson(obj);
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -189,7 +189,7 @@ void sendImprovInfoResponse() {
out[11] = 4; //Firmware len ("WLED") out[11] = 4; //Firmware len ("WLED")
out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D'; out[12] = 'W'; out[13] = 'L'; out[14] = 'E'; out[15] = 'D';
uint8_t lengthSum = 17; uint8_t lengthSum = 17;
uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.13.2-bl0/%i"),VERSION); uint8_t vlen = sprintf_P(out+lengthSum,PSTR("0.14.0-b0/%i"),VERSION);
out[16] = vlen; lengthSum += vlen; out[16] = vlen; lengthSum += vlen;
uint8_t hlen = 7; uint8_t hlen = 7;
#ifdef ESP8266 #ifdef ESP8266

View File

@ -178,14 +178,11 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
seg.startTransition(strip.getTransition()); // set effect transitions seg.startTransition(strip.getTransition()); // set effect transitions
//seg.markForReset(); //seg.markForReset();
seg.mode = fx; seg.mode = fx;
// load default values from effect string if effect is selected without }
// any other effect parameter (i.e. effect clicked in UI) }
if ( elem[F("sx")].isNull()
&& elem[F("ix")].isNull() // load default values from effect string
&& elem["pal"].isNull() if (elem[F("fxdef")])
&& elem[F("c1")].isNull()
&& elem[F("c2")].isNull()
&& elem[F("c3")].isNull() )
{ {
int16_t sOpt; int16_t sOpt;
sOpt = extractModeDefaults(fx, SET_F("sx")); if (sOpt >= 0) seg.speed = sOpt; sOpt = extractModeDefaults(fx, SET_F("sx")); if (sOpt >= 0) seg.speed = sOpt;
@ -207,8 +204,6 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
} }
} }
} }
}
}
//getVal also supports inc/decrementing and random //getVal also supports inc/decrementing and random
getVal(elem[F("sx")], &seg.speed); getVal(elem[F("sx")], &seg.speed);

View File

@ -51,8 +51,8 @@
#ifndef WLED_WATCHDOG_TIMEOUT #ifndef WLED_WATCHDOG_TIMEOUT
// 3 seconds should be enough to detect a lockup // 3 seconds should be enough to detect a lockup
// define WLED_WATCHDOG_TIMEOUT=0 to disable watchdog // define WLED_WATCHDOG_TIMEOUT=0 to disable watchdog, default
#define WLED_WATCHDOG_TIMEOUT 3 #define WLED_WATCHDOG_TIMEOUT 0
#endif #endif
//optionally disable brownout detector on ESP32. //optionally disable brownout detector on ESP32.