Merge branch 'custom-effects' into mdev
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
#define USERMOD_ID_SI7021_MQTT_HA 29 //Usermod "usermod_si7021_mqtt_ha.h"
|
||||
#define USERMOD_ID_BME280 30 //Usermod "usermod_bme280.h
|
||||
#define USERMOD_ID_AUDIOREACTIVE 31 //Usermod "audioreactive.h"
|
||||
#define USERMOD_ID_CUSTOMEFFECTS 32 //Usermod "usermod_v2_customeffects.h"
|
||||
|
||||
//Access point behavior
|
||||
#define AP_BEHAVIOR_BOOT_NO_CONN 0 //Open AP when no connection after boot
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
setTimeout(()=>{h.appendChild(l)},100);
|
||||
</script>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../../usermods/customeffects/customeffects.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -365,6 +366,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- WLEDSR Custom Effects -->
|
||||
<div id="ceEditor" class="modal">
|
||||
<div id="kceEditor">Loading...</div><br>
|
||||
</div>
|
||||
|
||||
<div id="mliveview2D" class="modal">
|
||||
<div id="kliveview2D" style="width:100%; height:100%">Loading...</div><br>
|
||||
</div>
|
||||
@@ -380,5 +386,6 @@
|
||||
</div>
|
||||
<i id="roverstar" class="icons huge" onclick="setLor(0)"></i><br>
|
||||
<script src="index.js"></script>
|
||||
<script src="../../usermods/customeffects/customeffects.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -728,6 +728,7 @@ function populateSegments(s)
|
||||
<option value="3" ${inst.ssim==3?' selected':''}>U14_3</option>
|
||||
</select></div>
|
||||
</div>`;
|
||||
let cusEff = `<button class="btn" onclick="toggleCEEditor('${inst.n?inst.n:"default"}', ${i})">Custom Effect Editor</button><br>`;
|
||||
cn += `<div class="seg lstI ${i==s.mainseg ? 'selected' : ''} ${exp ? "expanded":""}" id="seg${i}">
|
||||
<label class="check schkl">
|
||||
<input type="checkbox" id="seg${i}sel" onchange="selSeg(${i})" ${inst.sel ? "checked":""}>
|
||||
@@ -774,6 +775,7 @@ function populateSegments(s)
|
||||
${!isM?rvXck:''}
|
||||
${isM&&stoY-staY>1&&stoX-staX>1?map2D:''}
|
||||
${s.AudioReactive && s.AudioReactive.on ? "" : sndSim}
|
||||
${s.CustomEffects && s.CustomEffects.on ? cusEff : ""}
|
||||
<label class="check revchkl" id="seg${i}lbtm">
|
||||
${isM?'Transpose':'Mirror effect'}
|
||||
<input type="checkbox" id="seg${i}${isM?'tp':'mi'}" onchange="${(isM?'setTp(':'setMi(')+i})" ${isM?(inst.tp?"checked":""):(inst.mi?"checked":"")}>
|
||||
|
||||
2715
wled00/html_ui.h
2715
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@@ -108,6 +108,12 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
|
||||
bool on = elem["on"] | seg.on;
|
||||
if (elem["on"].is<const char*>() && elem["on"].as<const char*>()[0] == 't') on = !on;
|
||||
seg.setOption(SEG_OPTION_ON, on); // use transition
|
||||
|
||||
//WLEDSR Custom Effects (but general usable)
|
||||
bool reset = elem["reset"];
|
||||
if (reset)
|
||||
seg.markForReset();
|
||||
|
||||
bool frz = elem["frz"] | seg.freeze;
|
||||
if (elem["frz"].is<const char*>() && elem["frz"].as<const char*>()[0] == 't') frz = !seg.freeze;
|
||||
seg.freeze = frz;
|
||||
|
||||
@@ -139,6 +139,10 @@
|
||||
#include "../usermods/audioreactive/audio_reactive.h"
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_CUSTOMEFFECTS
|
||||
#include "../usermods/customeffects/usermod_v2_customeffects.h"
|
||||
#endif
|
||||
|
||||
void registerUsermods()
|
||||
{
|
||||
/*
|
||||
@@ -265,4 +269,9 @@ void registerUsermods()
|
||||
#endif
|
||||
usermods.add(new AudioReactive());
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_CUSTOMEFFECTS
|
||||
usermods.add(new CustomEffectsUserMod());
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user