Explicit JSON flag for loading FX defaults
Disable watchdog by default
This commit is contained in:
parent
8744b40dc5
commit
844bef9fda
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@ -3,5 +3,8 @@
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ 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 -D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
|
||||
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 #-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}
|
||||
@ -336,7 +336,7 @@ 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 -D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
|
||||
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}
|
||||
@ -349,7 +349,7 @@ platform = ${esp32.platform}
|
||||
platform_packages = ${esp32.platform_packages}
|
||||
upload_speed = 921600
|
||||
build_unflags = ${common.build_unflags}
|
||||
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
|
||||
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
|
||||
lib_deps = ${esp32.lib_deps}
|
||||
board_build.partitions = ${esp32.default_partitions}
|
||||
|
||||
|
@ -822,7 +822,7 @@ function populateEffects()
|
||||
});
|
||||
|
||||
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 nm = ef.name+" ";
|
||||
let fd = "";
|
||||
@ -841,7 +841,7 @@ function populateEffects()
|
||||
if (r.substring(0,2)=="fr") nm += "♫"; // frequency effects
|
||||
}
|
||||
}
|
||||
html += generateListItemHtml('fx',id,nm,'setX','',fd);
|
||||
html += generateListItemHtml('fx',id,nm,'setFX','',fd);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1388,7 +1388,7 @@ function setEffectParameters(idx)
|
||||
let top = parseInt(getComputedStyle(gId("sliders")).height);
|
||||
top += 5;
|
||||
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);
|
||||
// set html color items on/off
|
||||
var cslLabel = '';
|
||||
@ -2069,24 +2069,15 @@ function tglFreeze(s=null)
|
||||
requestJson(obj);
|
||||
}
|
||||
|
||||
function setX(ind = null)
|
||||
function setFX(ind = null)
|
||||
{
|
||||
if (ind === null) {
|
||||
ind = parseInt(d.querySelector('#fxlist input[name="fx"]:checked').value);
|
||||
} else {
|
||||
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)}};
|
||||
var obj = {"seg": {"fx": parseInt(ind),"fxdef":1}}; // fxdef sets effect parameters to default values, TODO add client setting
|
||||
requestJson(obj);
|
||||
}
|
||||
|
||||
@ -2097,13 +2088,7 @@ function setPalette(paletteId = null)
|
||||
} else {
|
||||
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}};
|
||||
requestJson(obj);
|
||||
}
|
||||
|
@ -211,7 +211,7 @@
|
||||
<i class="icons search-icon"></i>
|
||||
</div>
|
||||
<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 id="palDropdown" class="dd-content">
|
||||
|
@ -1124,7 +1124,7 @@ function setSegBri(s)
|
||||
function setEffect(ind = 0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
2239
wled00/html_simple.h
2239
wled00/html_simple.h
File diff suppressed because it is too large
Load Diff
3724
wled00/html_ui.h
3724
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@ -178,14 +178,11 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
|
||||
seg.startTransition(strip.getTransition()); // set effect transitions
|
||||
//seg.markForReset();
|
||||
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()
|
||||
&& elem["pal"].isNull()
|
||||
&& elem[F("c1")].isNull()
|
||||
&& elem[F("c2")].isNull()
|
||||
&& elem[F("c3")].isNull() )
|
||||
}
|
||||
}
|
||||
|
||||
// load default values from effect string
|
||||
if (elem[F("fxdef")])
|
||||
{
|
||||
int16_t 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(elem[F("sx")], &seg.speed);
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2208180
|
||||
#define VERSION 2208220
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
@ -51,8 +51,8 @@
|
||||
|
||||
#ifndef WLED_WATCHDOG_TIMEOUT
|
||||
// 3 seconds should be enough to detect a lockup
|
||||
// define WLED_WATCHDOG_TIMEOUT=0 to disable watchdog
|
||||
#define WLED_WATCHDOG_TIMEOUT 3
|
||||
// define WLED_WATCHDOG_TIMEOUT=0 to disable watchdog, default
|
||||
#define WLED_WATCHDOG_TIMEOUT 0
|
||||
#endif
|
||||
|
||||
//optionally disable brownout detector on ESP32.
|
||||
|
Loading…
Reference in New Issue
Block a user