Skip to content

Commit 844bef9

Browse files
committed
Explicit JSON flag for loading FX defaults
Disable watchdog by default
1 parent 8744b40 commit 844bef9

File tree

9 files changed

+3030
-3044
lines changed

9 files changed

+3030
-3044
lines changed

.vscode/extensions.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"platformio.platformio-ide"
6-
]
7-
}
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"platformio.platformio-ide"
6+
],
7+
"unwantedRecommendations": [
8+
"ms-vscode.cpptools-extension-pack"
9+
]
10+
}

platformio.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ board = esp32dev
326326
platform = ${esp32.platform}
327327
platform_packages = ${esp32.platform_packages}
328328
build_unflags = ${common.build_unflags}
329-
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
329+
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
330330
lib_deps = ${esp32.lib_deps}
331331
monitor_filters = esp32_exception_decoder
332332
board_build.partitions = ${esp32.default_partitions}
@@ -336,7 +336,7 @@ board = esp32dev
336336
platform = ${esp32.platform}
337337
platform_packages = ${esp32.platform_packages}
338338
build_unflags = ${common.build_unflags}
339-
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 -D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
339+
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_qio80 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
340340
lib_deps = ${esp32.lib_deps}
341341
monitor_filters = esp32_exception_decoder
342342
board_build.partitions = ${esp32.default_partitions}
@@ -349,7 +349,7 @@ platform = ${esp32.platform}
349349
platform_packages = ${esp32.platform_packages}
350350
upload_speed = 921600
351351
build_unflags = ${common.build_unflags}
352-
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_BLYNK -D WLED_WATCHDOG_TIMEOUT=0
352+
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_BLYNK
353353
lib_deps = ${esp32.lib_deps}
354354
board_build.partitions = ${esp32.default_partitions}
355355

wled00/data/index.js

+6-21
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ function populateEffects()
822822
});
823823

824824
for (let ef of effects) {
825-
// WLEDSR: add slider and color control to setX (used by requestjson)
825+
// WLEDSR: add slider and color control to setFX (used by requestjson)
826826
let id = ef.id;
827827
let nm = ef.name+" ";
828828
let fd = "";
@@ -841,7 +841,7 @@ function populateEffects()
841841
if (r.substring(0,2)=="fr") nm += "♫"; // frequency effects
842842
}
843843
}
844-
html += generateListItemHtml('fx',id,nm,'setX','',fd);
844+
html += generateListItemHtml('fx',id,nm,'setFX','',fd);
845845
}
846846
}
847847

@@ -1388,7 +1388,7 @@ function setEffectParameters(idx)
13881388
let top = parseInt(getComputedStyle(gId("sliders")).height);
13891389
top += 5;
13901390
let sel = d.querySelector('#fxlist .selected');
1391-
if (sel) sel.style.bottom = top + "px"; // we will need to remove this when unselected (in setX())
1391+
if (sel) sel.style.bottom = top + "px"; // we will need to remove this when unselected (in setFX())
13921392
},750);
13931393
// set html color items on/off
13941394
var cslLabel = '';
@@ -2069,24 +2069,15 @@ function tglFreeze(s=null)
20692069
requestJson(obj);
20702070
}
20712071

2072-
function setX(ind = null)
2072+
function setFX(ind = null)
20732073
{
20742074
if (ind === null) {
20752075
ind = parseInt(d.querySelector('#fxlist input[name="fx"]:checked').value);
20762076
} else {
20772077
d.querySelector(`#fxlist input[name="fx"][value="${ind}"]`).checked = true;
20782078
}
2079-
/*
2080-
// this code also in updateSelectedFx
2081-
var selElement = d.querySelector('#fxlist .selected');
2082-
if (selElement) {
2083-
selElement.classList.remove('selected');
2084-
selElement.style.bottom = null; // remove element style added in slider handling
2085-
}
20862079

2087-
d.querySelector(`#fxlist .lstI[data-id="${ind}"]`).classList.add('selected');
2088-
*/
2089-
var obj = {"seg": {"fx": parseInt(ind)}};
2080+
var obj = {"seg": {"fx": parseInt(ind),"fxdef":1}}; // fxdef sets effect parameters to default values, TODO add client setting
20902081
requestJson(obj);
20912082
}
20922083

@@ -2097,13 +2088,7 @@ function setPalette(paletteId = null)
20972088
} else {
20982089
d.querySelector(`#pallist input[name="palette"][value="${paletteId}"]`).checked = true;
20992090
}
2100-
/*
2101-
var selElement = d.querySelector('#pallist .selected');
2102-
if (selElement) {
2103-
selElement.classList.remove('selected')
2104-
}
2105-
d.querySelector(`#pallist .lstI[data-id="${paletteId}"]`).classList.add('selected');
2106-
*/
2091+
21072092
var obj = {"seg": {"pal": paletteId}};
21082093
requestJson(obj);
21092094
}

wled00/data/simple.htm

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
<i class="icons search-icon">&#xe0a1;</i>
212212
</div>
213213
<div id="fxlist" class="list">
214-
<div class="lstI" data-id="0" onClick="setX(0)"><a href="#0" onClick="setX(0)">Solid</a></div>
214+
<div class="lstI" data-id="0" onClick="setEffect(0)"><a href="#0" onClick="setEffect(0)">Solid</a></div>
215215
</div>
216216
</div>
217217
<div id="palDropdown" class="dd-content">

wled00/data/simple.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ function setSegBri(s)
11241124
function setEffect(ind = 0)
11251125
{
11261126
tglFxDropdown();
1127-
var obj = {"seg": {"fx": parseInt(ind)}};
1127+
var obj = {"seg": {"fx": parseInt(ind), "fxdef":true}}; // fxdef sets effect parameters to default values, TODO add client setting
11281128
requestJson(obj);
11291129
}
11301130

0 commit comments

Comments
 (0)