Random Cycle ☾, ☾ symbol on MM specific features

Adding ☾ symbol on MM specific features
- Custom Effect
- Games
- Generate presets
- Adjusted effects (Stream, Stream 2, GoL, Lissajous, Waverly, GEQ
- Palettes: Random Cycle, Audio Responsive

Bugfix ledmap 2D: delete table
Adding Random Cycle ☾: continues tranisition
This commit is contained in:
Ewoud
2023-01-31 10:40:41 +01:00
parent 6235dc86cc
commit b01893e8fe
11 changed files with 2095 additions and 2067 deletions

View File

@@ -99,7 +99,7 @@ uint16_t mode_customEffect(void) {
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_CUSTOMEFFECT[] PROGMEM = "⚙️ Custom Effect@Speed,Intensity,Custom 1, Custom 2, Custom 3;!;!;1;mp12=0";
class CustomEffectsUserMod : public Usermod {
private:

View File

@@ -207,7 +207,7 @@ uint16_t mode_IMUTest(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_IMUTest[] PROGMEM = "🎮 IMUTest@;;;2d";
static const char _data_FX_MODE_IMUTest[] PROGMEM = "🎮 IMUTest@;;;2d";
#endif
@@ -319,7 +319,7 @@ uint16_t mode_3DIMUCube(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_3DIMUCube[] PROGMEM = "🎮 3DIMUCube@,Perspective;!;!;2;pal=1"; //random cycle
static const char _data_FX_MODE_3DIMUCube[] PROGMEM = "🎮 3DIMUCube@,Perspective;!;!;2;pal=1"; //random cycle
class GamesUsermod : public Usermod {
private:

View File

@@ -1107,7 +1107,7 @@ uint16_t mode_running_random(void) {
SEGENV.aux1 = it;
return FRAMETIME;
}
static const char _data_FX_MODE_RUNNING_RANDOM[] PROGMEM = "Stream@!,Zone size;;!";
static const char _data_FX_MODE_RUNNING_RANDOM[] PROGMEM = "Stream@!,Zone size;;!";
uint16_t larson_scanner(bool dual) {
@@ -1741,7 +1741,7 @@ uint16_t mode_random_chase(void) {
random16_set_seed(prevSeed); // restore original seed so other effects can use "random" PRNG
return FRAMETIME;
}
static const char _data_FX_MODE_RANDOM_CHASE[] PROGMEM = "Stream 2@!;;";
static const char _data_FX_MODE_RANDOM_CHASE[] PROGMEM = "Stream 2@!;;";
//7 bytes
@@ -4925,7 +4925,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
return FRAMETIME;
} // mode_2Dgameoflife()
static const char _data_FX_MODE_2DGAMEOFLIFE[] PROGMEM = "Game Of Life@!,,,,,All colors=0;!,!;!;2"; //WLEDMM support all colors
static const char _data_FX_MODE_2DGAMEOFLIFE[] PROGMEM = "Game Of Life@!,,,,,All colors;!,!;!;2;c1=0"; //WLEDMM support all colors
/////////////////////////
@@ -5092,7 +5092,7 @@ uint16_t mode_2DLissajous(void) { // By: Andrew Tuline
return FRAMETIME;
} // mode_2DLissajous()
static const char _data_FX_MODE_2DLISSAJOUS[] PROGMEM = "Lissajous@X frequency,Fade rate;!;!;2";
static const char _data_FX_MODE_2DLISSAJOUS[] PROGMEM = "Lissajous@X frequency,Fade rate;!;!;2";
///////////////////////
@@ -6144,7 +6144,7 @@ uint16_t mode_2DWaverly(void) {
return FRAMETIME;
} // mode_2DWaverly()
static const char _data_FX_MODE_2DWAVERLY[] PROGMEM = "Waverly@Amplification,Sensitivity;;!;2v;ix=64,si=0"; // Beatsin
static const char _data_FX_MODE_2DWAVERLY[] PROGMEM = "Waverly@Amplification,Sensitivity;;!;2v;ix=64,si=0"; // Beatsin
#endif // WLED_DISABLE_2D
@@ -7159,7 +7159,7 @@ uint16_t mode_2DGEQ(void) { // By Will Tatam. Code reduction by Ewoud Wijma.
#endif
return FRAMETIME;
} // mode_2DGEQ()
static const char _data_FX_MODE_2DGEQ[] PROGMEM = "GEQ@Fade speed,Ripple decay,# of bands,,,Color bars;!,,Peaks;!;2f;c1=255,c2=64,pal=11,si=0"; // Beatsin
static const char _data_FX_MODE_2DGEQ[] PROGMEM = "GEQ@Fade speed,Ripple decay,# of bands,,,Color bars;!,,Peaks;!;2f;c1=255,c2=64,pal=11,si=0"; // Beatsin
/////////////////////////

View File

@@ -106,10 +106,12 @@ void WS2812FX::setUpMatrix(bool reset) {
}
}
if (loadedLedmap > 0)
if (loadedLedmap > 0) {
for (size_t i = 0; i < customMappingSize; i++) {
customMappingTable[i] = customMappingTableLedMap[i];
}
delete[] customMappingTableLedMap;
}
#ifdef WLED_DEBUG
DEBUG_PRINT(F("Matrix ledmap:"));

View File

@@ -247,6 +247,26 @@ CRGBPalette16 &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) {
_lastPaletteChange = millis();
timeSinceLastChange = 0;
}
//WLEDMM: smooth transitions of palettes instead of every 5 sec with short transition
for (int i=0; i< 16; i++) {
targetPalette[i].r = prevRandomPalette[i].r*(5000-timeSinceLastChange)/5000 + randomPalette[i].r*timeSinceLastChange/5000;
targetPalette[i].g = prevRandomPalette[i].g*(5000-timeSinceLastChange)/5000 + randomPalette[i].g*timeSinceLastChange/5000;
targetPalette[i].b = prevRandomPalette[i].b*(5000-timeSinceLastChange)/5000 + randomPalette[i].b*timeSinceLastChange/5000;
}
break;}
case 73: {//periodically replace palette with a random one. Transition palette change in 500ms
uint32_t timeSinceLastChange = millis() - _lastPaletteChange;
if (timeSinceLastChange > 5000 /*+ ((uint32_t)(255-intensity))*100*/) {
prevRandomPalette = randomPalette;
randomPalette = CRGBPalette16(
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)),
CHSV(random8(), random8(160, 255), random8(128, 255)));
_lastPaletteChange = millis();
timeSinceLastChange = 0;
}
if (timeSinceLastChange <= 250) {
targetPalette = prevRandomPalette;
// there needs to be 255 palette blends (48) for full blend but that is too resource intensive
@@ -1955,12 +1975,12 @@ uint8_t Bus::_gAWM = 255;
const char JSON_mode_names[] PROGMEM = R"=====(["FX names moved"])=====";
//WLEDMM netmindz ar palette add Audio responsive
const char JSON_palette_names[] PROGMEM = R"=====([
"Default","* Random Cycle","* Color 1","* Colors 1&2","* Color Gradient","* Colors Only","Party","Cloud","Lava","Ocean",
"Default","* Random Cycle","* Color 1","* Colors 1&2","* Color Gradient","* Colors Only","Party","Cloud","Lava","Ocean",
"Forest","Rainbow","Rainbow Bands","Sunset","Rivendell","Breeze","Red & Blue","Yellowout","Analogous","Splash",
"Pastel","Sunset 2","Beach","Vintage","Departure","Landscape","Beech","Sherbet","Hult","Hult 64",
"Drywet","Jul","Grintage","Rewhi","Tertiary","Fire","Icefire","Cyane","Light Pink","Autumn",
"Magenta","Magred","Yelmag","Yelblu","Orange & Teal","Tiamat","April Night","Orangery","C9","Sakura",
"Aurora","Atlantica","C9 2","C9 New","Temperature","Aurora 2","Retro Clown","Candy","Toxy Reaf","Fairy Reaf",
"Semi Blue","Pink Candy","Red Reaf","Aqua Flash","Yelblu Hot","Lite Light","Red Flash","Blink Red","Red Shift","Red Tide",
"Candy2","Audio Responsive Ratio","Audio Responsive Hue"
"Candy2","Audio Responsive Ratio","Audio Responsive Hue","* Random Cycle 💡"
])=====";

View File

@@ -5,7 +5,7 @@
* Readability defines and their associated numerical values + compile-time constants
*/
#define GRADIENT_PALETTE_COUNT 60 //WLEDMM netmindz ar palette +2
#define GRADIENT_PALETTE_COUNT 61 //WLEDMM netmindz ar palette +2
//Defaults
#define DEFAULT_CLIENT_SSID "Your_Network"

View File

@@ -353,7 +353,7 @@
<button class="btn infobtn" onclick="toggleNodes()">Instance List</button>
<button class="btn infobtn" onclick="window.open('/update','_self');">Update WLED</button>
<button class="btn infobtn" id="resetbtn" onclick="cnfReset()">Reboot WLED</button>
<button class="btn infobtn" id="genPresets" onclick="genPresets()">Generate presets</button>
<button class="btn infobtn" id="genPresets" onclick="genPresets()">Generate presets</button>
<button class="btn infobtn" id="savePresetsGen" onclick="savePresetsGen()" hidden="true">Save generated presets</button>
<textarea id="presetsGen" hidden="true"></textarea><br>
</div>

View File

@@ -755,7 +755,7 @@ function populateSegments(s)
</div>`;
//WLEDMM Custom Effects
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})">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":""}>

View File

@@ -167,6 +167,11 @@ Y:<input id="P${i}Y" name="P${i}Y" type="number" min="0" max="256" value="0"><br
<option value="1">Vertical</option>
</select><br>
Serpentine: <input type="checkbox" name="PS"><br>
<!-- <br>
Interface<br>
<input type="radio" value="0" name="Interface"><label>Classic</label>
<input type="radio" value="1" name="Interface"><label>Complex</label>
<br><br> -->
<i style="color:#fa0;">Can populate LED panel layout with pre-arranged matrix.<br>These values do not affect final layout.<br>WLEDMM: Populate will overwrite earlier saved panel layouts!</i><br>
<button type="button" onclick="gen()">Populate</button>
<hr class="sml">

File diff suppressed because it is too large Load Diff

View File

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