Rename Custom Effects to ARTI-FX

This commit is contained in:
Ewoud
2023-03-30 10:02:08 +02:00
parent d9c886abdc
commit 82dc456fd7
14 changed files with 1051 additions and 1050 deletions

View File

@@ -475,7 +475,7 @@ build_flags = ${common.build_flags} ${esp32c3.build_flags} -D WLED_RELEASE_NAME=
-D CONFIG_LITTLEFS_FOR_IDF_3_2 ; WLEDMM -D CONFIG_LITTLEFS_FOR_IDF_3_2 ; WLEDMM
-D WLED_USE_MY_CONFIG ; WLEDMM -D WLED_USE_MY_CONFIG ; WLEDMM
; -D USERMOD_AUDIOREACTIVE ; WLEDMM ; -D USERMOD_AUDIOREACTIVE ; WLEDMM
-D USERMOD_CUSTOMEFFECTS ; WLEDMM -D USERMOD_ARTIFX ; WLEDMM
upload_speed = 460800 upload_speed = 460800
build_unflags = ${common.build_unflags} build_unflags = ${common.build_unflags}
lib_deps = ${esp32c3.lib_deps} lib_deps = ${esp32c3.lib_deps}
@@ -494,7 +494,7 @@ build_flags = ${common.build_flags} ${esp32s3.build_flags} -D CONFIG_LITTLEFS_F
-D WLED_RELEASE_NAME=ESP32-S3 -D WLED_RELEASE_NAME=ESP32-S3
-D WLED_USE_MY_CONFIG -D WLED_USE_MY_CONFIG
-D USERMOD_AUDIOREACTIVE -D USERMOD_AUDIOREACTIVE
-D USERMOD_CUSTOMEFFECTS -D USERMOD_ARTIFX
lib_deps = ${esp32s3.lib_deps} lib_deps = ${esp32s3.lib_deps}
https://github.com/blazoncek/arduinoFFT.git https://github.com/blazoncek/arduinoFFT.git
board_build.partitions = tools/WLED_ESP32_8MB.csv board_build.partitions = tools/WLED_ESP32_8MB.csv
@@ -611,7 +611,7 @@ build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME
; -D STATUSLED=15 ; -D STATUSLED=15
-D WLED_USE_MY_CONFIG -D WLED_USE_MY_CONFIG
-D USERMOD_AUDIOREACTIVE -D USERMOD_AUDIOREACTIVE
-D USERMOD_CUSTOMEFFECTS -D USERMOD_ARTIFX
lib_deps = ${esp32s2.lib_deps} lib_deps = ${esp32s2.lib_deps}
https://github.com/blazoncek/arduinoFFT.git https://github.com/blazoncek/arduinoFFT.git
@@ -802,7 +802,7 @@ build_flags_S =
; -D WLED_USE_CIE_BRIGHTNESS_TABLE ;; experimental: use different color / brightness lookup table ; -D WLED_USE_CIE_BRIGHTNESS_TABLE ;; experimental: use different color / brightness lookup table
-D USERMOD_AUDIOREACTIVE -D USERMOD_AUDIOREACTIVE
-D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library modified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra -D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library modified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra
-D USERMOD_CUSTOMEFFECTS ; WLEDMM usermod -D USERMOD_ARTIFX ; WLEDMM usermod
; -D WLED_DISABLE_LOXONE ; -D WLED_DISABLE_LOXONE
; -D WLED_DISABLE_ALEXA ; -D WLED_DISABLE_ALEXA
; -D WLED_DISABLE_HUESYNC ; -D WLED_DISABLE_HUESYNC
@@ -1063,7 +1063,7 @@ build_flags = ${common.build_flags_esp8266}
-D WLED_DISABLE_HUESYNC -D WLED_DISABLE_HUESYNC
-D WLED_DISABLE_LOXONE -D WLED_DISABLE_LOXONE
; -D USERMOD_AUDIOREACTIVE ; -D USERMOD_AUDIOREACTIVE
; -D USERMOD_CUSTOMEFFECTS ; to be done ; -D USERMOD_ARTIFX ; to be done
; -UWLED_USE_MY_CONFIG ; -UWLED_USE_MY_CONFIG
-D USERMOD_PIRSWITCH -D USERMOD_PIRSWITCH
-D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?) -D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?)
@@ -1128,7 +1128,7 @@ build_flags = ${common.build_flags_esp8266}
; -D WLED_DEBUG ; -D WLED_DEBUG
; -D WLED_DISABLE_2D ; -D WLED_DISABLE_2D
; -D USERMOD_AUDIOREACTIVE ; -D USERMOD_AUDIOREACTIVE
; -D USERMOD_CUSTOMEFFECTS ; to be done ; -D USERMOD_ARTIFX ; to be done
; -UWLED_USE_MY_CONFIG ; -UWLED_USE_MY_CONFIG
monitor_filters = esp8266_exception_decoder monitor_filters = esp8266_exception_decoder
; RAM: [====== ] 59.3% (used 48616 bytes from 81920 bytes) ; RAM: [====== ] 59.3% (used 48616 bytes from 81920 bytes)
@@ -1151,7 +1151,7 @@ build_flags = ${common.build_flags_esp8266}
-D WLED_DISABLE_HUESYNC -D WLED_DISABLE_HUESYNC
-D WLED_DISABLE_LOXONE -D WLED_DISABLE_LOXONE
; -D USERMOD_AUDIOREACTIVE ; -D USERMOD_AUDIOREACTIVE
; -D USERMOD_CUSTOMEFFECTS ; to be done ; -D USERMOD_ARTIFX ; to be done
-D USERMOD_PIRSWITCH -D USERMOD_PIRSWITCH
-D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?) -D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?)
-D USERMOD_MULTI_RELAY -D USERMOD_MULTI_RELAY

View File

@@ -93,7 +93,7 @@ function populateCEEditor(name, segID)
{ {
fetchAndExecute((loc?`http://${locip}`:'.') + "/", name + ".wled", function(text) fetchAndExecute((loc?`http://${locip}`:'.') + "/", name + ".wled", function(text)
{ {
var cn=`Custom Effects Editor<br> var cn=`ARTI-FX Editor<br>
<i>${name}.wled</i><br> <i>${name}.wled</i><br>
<textarea class="ceTextarea" id="ceProgramArea">${text}</textarea><br> <textarea class="ceTextarea" id="ceProgramArea">${text}</textarea><br>
<button class="btn infobtn" onclick="toggleCEEditor()">Close</button> <button class="btn infobtn" onclick="toggleCEEditor()">Close</button>
@@ -102,8 +102,8 @@ function populateCEEditor(name, segID)
<button class="btn infobtn" onclick="loadCETemplate('${name}')">Load template</button><br> <button class="btn infobtn" onclick="loadCETemplate('${name}')">Load template</button><br>
<button class="btn infobtn" onclick="downloadGHFile('CE','wledv033.json',true,true)">Download wled json</button> <button class="btn infobtn" onclick="downloadGHFile('CE','wledv033.json',true,true)">Download wled json</button>
<button class="btn infobtn" onclick="downloadGHFile('CE','presets.json',true,true)">Download presets.json</button><br> <button class="btn infobtn" onclick="downloadGHFile('CE','presets.json',true,true)">Download presets.json</button><br>
<button class="btn infobtn" onclick="location.href='https://github.com/MoonModules/WLED-Effects/tree/master/CustomEffects/wled'" type="button">Custom Effects Library</button> <button class="btn infobtn" onclick="location.href='https://github.com/MoonModules/WLED-Effects/tree/master/ARTIFX/wled'" type="button">ARTI-FX Library</button>
<button class="btn infobtn btn-xs" onclick="location.href='https://mm.kno.wled.ge/moonmodules/custom-effects'" type="button">?</button><br> <button class="btn infobtn btn-xs" onclick="location.href='https://mm.kno.wled.ge/moonmodules/arti-fx'" type="button">?</button><br>
<br><i>Compile and Run Log</i><br> <br><i>Compile and Run Log</i><br>
<textarea class="ceTextarea" id="ceLogArea"></textarea><br> <textarea class="ceTextarea" id="ceLogArea"></textarea><br>
<i>Run log > 3 seconds is send to Serial Ouput.</i><br> <i>Run log > 3 seconds is send to Serial Ouput.</i><br>
@@ -124,7 +124,7 @@ function populateCEEditor(name, segID)
} }
function downloadGHFile(url, name, save=false, warn=false) { //Githubfile function downloadGHFile(url, name, save=false, warn=false) { //Githubfile
if (url == "CE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/CustomEffects/wled/"; if (url == "CE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/ARTIFX/wled/";
if (url == "HBB") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Base%20pack/"; if (url == "HBB") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Base%20pack/";
if (url == "HBE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Effects%20pack/"; if (url == "HBE") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Presets/HB_PresetPack210808_32x32_16seg/Effects%20pack/";
if (url == "LM") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Ledmaps/"; if (url == "LM") url = "https://raw.githubusercontent.com/MoonModules/WLED-Effects/master/Ledmaps/";
@@ -167,7 +167,7 @@ function downloadGHFile(url, name, save=false, warn=false) { //Githubfile
function loadCETemplate(name) { function loadCETemplate(name) {
var ceProgramArea = d.getElementById("ceProgramArea"); var ceProgramArea = d.getElementById("ceProgramArea");
ceProgramArea.value = `/* ceProgramArea.value = `/*
Custom Effects Template ARTIFX Template
*/ */
program ${name} program ${name}
{ {

View File

@@ -1,6 +1,6 @@
/* /*
@title Usermod Custom Effects (CE) @title Usermod ARTIFX (AF)
@file usermod_v2_customeffects.h @file usermod_v2_artifx.h
@date 20220818 @date 20220818
@author Ewoud Wijma @author Ewoud Wijma
@Copyright (c) 2023 Ewoud Wijma @Copyright (c) 2023 Ewoud Wijma
@@ -17,7 +17,7 @@
ARTI * arti; ARTI * arti;
//effect function //effect function
uint16_t mode_customEffect(void) { uint16_t mode_ARTIFX(void) {
//tbd: move statics to SEGMENT.data //tbd: move statics to SEGMENT.data
static bool succesful; static bool succesful;
static bool notEnoughHeap; static bool notEnoughHeap;
@@ -99,9 +99,9 @@ uint16_t mode_customEffect(void) {
return FRAMETIME; return FRAMETIME;
} }
static const char _data_FX_MODE_CUSTOMEFFECT[] PROGMEM = "⚙️ Custom Effect ☾@Speed,Intensity,Custom 1, Custom 2, Custom 3;!;!;1;mp12=0"; static const char _data_FX_MODE_ARTIFX[] PROGMEM = "⚙️ ARTI-FX ☾@Speed,Intensity,Custom 1, Custom 2, Custom 3;!;!;1;mp12=0";
class CustomEffectsUserMod : public Usermod { class ARTIFXUserMod : public Usermod {
private: private:
// strings to reduce flash memory usage (used more than twice) // strings to reduce flash memory usage (used more than twice)
static const char _name[]; //usermod name static const char _name[]; //usermod name
@@ -115,7 +115,7 @@ class CustomEffectsUserMod : public Usermod {
void setup() { void setup() {
if (!initDone) if (!initDone)
strip.addEffect(FX_MODE_CUSTOMEFFECT, &mode_customEffect, _data_FX_MODE_CUSTOMEFFECT); strip.addEffect(FX_MODE_ARTIFX, &mode_ARTIFX, _data_FX_MODE_ARTIFX);
initDone = true; initDone = true;
enabled = true; enabled = true;
} }
@@ -200,9 +200,9 @@ class CustomEffectsUserMod : public Usermod {
*/ */
uint16_t getId() uint16_t getId()
{ {
return USERMOD_ID_CUSTOMEFFECTS; return USERMOD_ID_ARTIFX;
} }
}; };
// strings to reduce flash memory usage (used more than twice) // strings to reduce flash memory usage (used more than twice)
const char CustomEffectsUserMod::_name[] PROGMEM = "CustomEffects"; const char ARTIFXUserMod::_name[] PROGMEM = "ARTIFX";

View File

@@ -316,7 +316,7 @@
#define FX_MODE_WAVESINS 184 #define FX_MODE_WAVESINS 184
#define FX_MODE_ROCKTAVES 185 #define FX_MODE_ROCKTAVES 185
#define FX_MODE_2DAKEMI 186 #define FX_MODE_2DAKEMI 186
#define FX_MODE_CUSTOMEFFECT 187 //WLEDMM Custom Effects #define FX_MODE_ARTIFX 187 //WLEDMM ARTIFX
#define MODE_COUNT 188 #define MODE_COUNT 188

View File

@@ -133,7 +133,7 @@
#define USERMOD_ID_SHT 39 //Usermod "usermod_sht.h #define USERMOD_ID_SHT 39 //Usermod "usermod_sht.h
#define USERMOD_ID_KLIPPER 40 // Usermod Klipper percentage #define USERMOD_ID_KLIPPER 40 // Usermod Klipper percentage
//WLEDMM //WLEDMM
#define USERMOD_ID_CUSTOMEFFECTS 90 //Usermod "usermod_v2_customeffects.h" #define USERMOD_ID_ARTIFX 90 //Usermod "usermod_v2_artifx.h"
#define USERMOD_ID_WEATHER 91 //Usermod "usermod_v2_weather.h" #define USERMOD_ID_WEATHER 91 //Usermod "usermod_v2_weather.h"
#define USERMOD_ID_GAMES 92 //Usermod "usermod_v2_games.h" #define USERMOD_ID_GAMES 92 //Usermod "usermod_v2_games.h"

View File

@@ -52,7 +52,7 @@
setTimeout(()=>{h.appendChild(l)},100); setTimeout(()=>{h.appendChild(l)},100);
</script> </script>
<link rel="stylesheet" href="index.css"> <link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="../../usermods/customeffects/customeffects.css"> <!--WLEDMM Custom Effects --> <link rel="stylesheet" href="../../usermods/artifx/artifx.css"> <!--WLEDMM ARTIFX -->
</head> </head>
<body> <body>
@@ -393,7 +393,7 @@
</div> </div>
</div> </div>
<!-- WLEDMM Custom Effects --> <!-- WLEDMM ARTIFX -->
<div id="ceEditor" class="modal"> <div id="ceEditor" class="modal">
<div id="kceEditor">Loading...</div><br> <div id="kceEditor">Loading...</div><br>
</div> </div>
@@ -413,6 +413,6 @@
</div> </div>
<i id="roverstar" class="icons huge" onclick="setLor(0)">&#xe410;</i><br> <i id="roverstar" class="icons huge" onclick="setLor(0)">&#xe410;</i><br>
<script src="index.js"></script> <script src="index.js"></script>
<script src="../../usermods/customeffects/customeffects.js"></script> <!--WLEDMM Custom Effects--> <script src="../../usermods/artifx/artifx.js"></script> <!--WLEDMM ARTIFX-->
</body> </body>
</html> </html>

View File

@@ -771,9 +771,9 @@ function populateSegments(s)
<option value="3" ${inst.si==3?' selected':''}>U14_3</option> <option value="3" ${inst.si==3?' selected':''}>U14_3</option>
</select></div> </select></div>
</div>`; </div>`;
//WLEDMM Custom Effects //WLEDMM ARTIFX
let fxName = eJson.find((o)=>{return o.id==selectedFx}).name; let fxName = eJson.find((o)=>{return o.id==selectedFx}).name;
let cusEff = `<button class="btn" onclick="toggleCEEditor('${inst.n?inst.n:"default"}', ${i})">Custom Effect Editor ☾</button><br>`; let cusEff = `<button class="btn" onclick="toggleCEEditor('${inst.n?inst.n:"default"}', ${i})">ARTI-FX Editor ☾</button><br>`;
cn += `<div class="seg lstI ${i==s.mainseg ? 'selected' : ''} ${exp ? "expanded":""}" id="seg${i}"> cn += `<div class="seg lstI ${i==s.mainseg ? 'selected' : ''} ${exp ? "expanded":""}" id="seg${i}">
<label class="check schkl"> <label class="check schkl">
<input type="checkbox" id="seg${i}sel" onchange="selSeg(${i})" ${inst.sel ? "checked":""}> <input type="checkbox" id="seg${i}sel" onchange="selSeg(${i})" ${inst.sel ? "checked":""}>
@@ -821,7 +821,7 @@ function populateSegments(s)
${!(isM&&staX<mw*mh)?rvXck:''} ${!(isM&&staX<mw*mh)?rvXck:''}
${isM&&staX<mw*mh&&stoY-staY>1&&stoX-staX>1?map2D:''} ${isM&&staX<mw*mh&&stoY-staY>1&&stoX-staX>1?map2D:''}
${s.AudioReactive && s.AudioReactive.on ? "" : sndSim} ${s.AudioReactive && s.AudioReactive.on ? "" : sndSim}
${s.CustomEffects && s.CustomEffects.on && fxName.includes("Custom Effect") ? cusEff : ""} ${s.ARTIFX && s.ARTIFX.on && fxName.includes("ARTI-FX") ? cusEff : ""}
<label class="check revchkl" id="seg${i}lbtm"> <label class="check revchkl" id="seg${i}lbtm">
${isM&&staX<mw*mh?'Transpose':'Mirror effect'}${isM&&staX<mw*mh? ${isM&&staX<mw*mh?'Transpose':'Mirror effect'}${isM&&staX<mw*mh?
'<input type="checkbox" id="seg'+i+'tp" onchange="setTp('+i+')" '+(inst.tp?"checked":"")+'>': '<input type="checkbox" id="seg'+i+'tp" onchange="setTp('+i+')" '+(inst.tp?"checked":"")+'>':

File diff suppressed because it is too large Load Diff

View File

@@ -182,7 +182,7 @@ bool deserializeSegment(JsonObject elem, byte it, byte presetId)
if (elem["on"].is<const char*>() && elem["on"].as<const char*>()[0] == 't') on = !on; if (elem["on"].is<const char*>() && elem["on"].as<const char*>()[0] == 't') on = !on;
seg.setOption(SEG_OPTION_ON, on); // use transition seg.setOption(SEG_OPTION_ON, on); // use transition
//WLEDMM Custom Effects (but general usable) //WLEDMM ARTIFX (but general usable)
bool reset = elem["reset"]; bool reset = elem["reset"];
if (reset) if (reset)
seg.markForReset(); seg.markForReset();

View File

@@ -190,9 +190,9 @@
#endif #endif
//WLEDMM Custom Effects //WLEDMM ARTIFX
#ifdef USERMOD_CUSTOMEFFECTS #ifdef USERMOD_ARTIFX
#include "../usermods/customeffects/usermod_v2_customeffects.h" #include "../usermods/artifx/usermod_v2_artifx.h"
#endif #endif
#ifdef USERMOD_WEATHER #ifdef USERMOD_WEATHER
@@ -374,9 +374,9 @@ void registerUsermods()
usermods.add(new ShtUsermod()); usermods.add(new ShtUsermod());
#endif #endif
//WLEDMM Custom Effects //WLEDMM ARTIFX
#ifdef USERMOD_CUSTOMEFFECTS #ifdef USERMOD_ARTIFX
usermods.add(new CustomEffectsUserMod()); usermods.add(new ARTIFXUserMod());
#endif #endif
#ifdef USERMOD_WEATHER #ifdef USERMOD_WEATHER

View File

@@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2303290 #define VERSION 2303300
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG