Reduce fxdata size by about 200 bytes

Removed redundant commas before semicolon delimiter (`,;` -> `;`)
No need to transmit `@` in /json/fxdata
This commit is contained in:
cschwinne 2022-11-11 03:10:41 +01:00
parent d370f67f60
commit c0a783198e
6 changed files with 1972 additions and 1981 deletions

View File

@ -120,7 +120,7 @@ uint16_t blink(uint32_t color1, uint32_t color2, bool strobe, bool do_palette) {
uint16_t mode_blink(void) {
return blink(SEGCOLOR(0), SEGCOLOR(1), false, true);
}
static const char _data_FX_MODE_BLINK[] PROGMEM = "Blink@!,Duty cycle;!,!,;!;1d";
static const char _data_FX_MODE_BLINK[] PROGMEM = "Blink@!,Duty cycle;!,!;!;1d";
/*
@ -129,7 +129,7 @@ static const char _data_FX_MODE_BLINK[] PROGMEM = "Blink@!,Duty cycle;!,!,;!;1d"
uint16_t mode_blink_rainbow(void) {
return blink(SEGMENT.color_wheel(SEGENV.call & 0xFF), SEGCOLOR(1), false, false);
}
static const char _data_FX_MODE_BLINK_RAINBOW[] PROGMEM = "Blink Rainbow@Frequency,Blink duration;!,!,;!;1d";
static const char _data_FX_MODE_BLINK_RAINBOW[] PROGMEM = "Blink Rainbow@Frequency,Blink duration;!,!;!;1d";
/*
@ -138,7 +138,7 @@ static const char _data_FX_MODE_BLINK_RAINBOW[] PROGMEM = "Blink Rainbow@Frequen
uint16_t mode_strobe(void) {
return blink(SEGCOLOR(0), SEGCOLOR(1), true, true);
}
static const char _data_FX_MODE_STROBE[] PROGMEM = "Strobe@!,;!,!,;!;1d";
static const char _data_FX_MODE_STROBE[] PROGMEM = "Strobe@!;!,!;!;1d";
/*
@ -147,7 +147,7 @@ static const char _data_FX_MODE_STROBE[] PROGMEM = "Strobe@!,;!,!,;!;1d";
uint16_t mode_strobe_rainbow(void) {
return blink(SEGMENT.color_wheel(SEGENV.call & 0xFF), SEGCOLOR(1), true, false);
}
static const char _data_FX_MODE_STROBE_RAINBOW[] PROGMEM = "Strobe Rainbow@!,;,!,;!;1d";
static const char _data_FX_MODE_STROBE_RAINBOW[] PROGMEM = "Strobe Rainbow@!;,!;!;1d";
/*
@ -213,7 +213,7 @@ uint16_t color_wipe(bool rev, bool useRandomColors) {
uint16_t mode_color_wipe(void) {
return color_wipe(false, false);
}
static const char _data_FX_MODE_COLOR_WIPE[] PROGMEM = "Wipe@!,!;!,!,;!;1d";
static const char _data_FX_MODE_COLOR_WIPE[] PROGMEM = "Wipe@!,!;!,!;!;1d";
/*
@ -222,7 +222,7 @@ static const char _data_FX_MODE_COLOR_WIPE[] PROGMEM = "Wipe@!,!;!,!,;!;1d";
uint16_t mode_color_sweep(void) {
return color_wipe(true, false);
}
static const char _data_FX_MODE_COLOR_SWEEP[] PROGMEM = "Sweep@!,!;!,!,;!;1d";
static const char _data_FX_MODE_COLOR_SWEEP[] PROGMEM = "Sweep@!,!;!,!;!;1d";
/*
@ -232,7 +232,7 @@ static const char _data_FX_MODE_COLOR_SWEEP[] PROGMEM = "Sweep@!,!;!,!,;!;1d";
uint16_t mode_color_wipe_random(void) {
return color_wipe(false, true);
}
static const char _data_FX_MODE_COLOR_WIPE_RANDOM[] PROGMEM = "Wipe Random@!,;1,2,3;!;1d";
static const char _data_FX_MODE_COLOR_WIPE_RANDOM[] PROGMEM = "Wipe Random@!;1,2,3;!;1d";
/*
@ -348,7 +348,7 @@ uint16_t mode_breath(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_BREATH[] PROGMEM = "Breathe@!,;!,!;!;1d";
static const char _data_FX_MODE_BREATH[] PROGMEM = "Breathe@!;!,!;!;1d";
/*
@ -364,7 +364,7 @@ uint16_t mode_fade(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_FADE[] PROGMEM = "Fade@!,;!,!,;!;1d";
static const char _data_FX_MODE_FADE[] PROGMEM = "Fade@!;!,!;!;1d";
/*
@ -488,7 +488,7 @@ uint16_t running(uint32_t color1, uint32_t color2, bool theatre = false) {
uint16_t mode_theater_chase(void) {
return running(SEGCOLOR(0), SEGCOLOR(1), true);
}
static const char _data_FX_MODE_THEATER_CHASE[] PROGMEM = "Theater@!,Gap size;!,!,;!;1d";
static const char _data_FX_MODE_THEATER_CHASE[] PROGMEM = "Theater@!,Gap size;!,!;!;1d";
/*
@ -550,7 +550,7 @@ static const char _data_FX_MODE_RUNNING_DUAL[] PROGMEM = "Running Dual";
uint16_t mode_running_lights(void) {
return running_base(false);
}
static const char _data_FX_MODE_RUNNING_LIGHTS[] PROGMEM = "Running@!,Wave width;!,!,;!;1d";
static const char _data_FX_MODE_RUNNING_LIGHTS[] PROGMEM = "Running@!,Wave width;!,!;!;1d";
/*
@ -559,7 +559,7 @@ static const char _data_FX_MODE_RUNNING_LIGHTS[] PROGMEM = "Running@!,Wave width
uint16_t mode_saw(void) {
return running_base(true);
}
static const char _data_FX_MODE_SAW[] PROGMEM = "Saw@!,Width;!,!,;!;1d";
static const char _data_FX_MODE_SAW[] PROGMEM = "Saw@!,Width;!,!;!;1d";
/*
@ -596,7 +596,7 @@ uint16_t mode_twinkle(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_TWINKLE[] PROGMEM = "Twinkle@!,;!,!,;!;mp12=0,1d"; //pixels
static const char _data_FX_MODE_TWINKLE[] PROGMEM = "Twinkle@!;!,!;!;mp12=0,1d"; //pixels
/*
@ -642,7 +642,7 @@ uint16_t dissolve(uint32_t color) {
uint16_t mode_dissolve(void) {
return dissolve(SEGCOLOR(0));
}
static const char _data_FX_MODE_DISSOLVE[] PROGMEM = "Dissolve@Repeat speed,Dissolve speed;!,!,;!;1d";
static const char _data_FX_MODE_DISSOLVE[] PROGMEM = "Dissolve@Repeat speed,Dissolve speed;!,!;!;1d";
/*
@ -651,7 +651,7 @@ static const char _data_FX_MODE_DISSOLVE[] PROGMEM = "Dissolve@Repeat speed,Diss
uint16_t mode_dissolve_random(void) {
return dissolve(SEGMENT.color_wheel(random8()));
}
static const char _data_FX_MODE_DISSOLVE_RANDOM[] PROGMEM = "Dissolve Rnd@Repeat speed,Dissolve speed;,!,;!;1d";
static const char _data_FX_MODE_DISSOLVE_RANDOM[] PROGMEM = "Dissolve Rnd@Repeat speed,Dissolve speed;,!;!;1d";
/*
@ -673,7 +673,7 @@ uint16_t mode_sparkle(void) {
SEGMENT.setPixelColor(SEGENV.aux0, SEGCOLOR(0));
return FRAMETIME;
}
static const char _data_FX_MODE_SPARKLE[] PROGMEM = "Sparkle@!,;!,!,;!;mp12=0,1d";
static const char _data_FX_MODE_SPARKLE[] PROGMEM = "Sparkle@!;!,!;!;mp12=0,1d";
/*
@ -694,7 +694,7 @@ uint16_t mode_flash_sparkle(void) {
}
return FRAMETIME;
}
static const char _data_FX_MODE_FLASH_SPARKLE[] PROGMEM = "Sparkle Dark@!,!;Bg,Fx,;!;mp12=0,1d";
static const char _data_FX_MODE_FLASH_SPARKLE[] PROGMEM = "Sparkle Dark@!,!;Bg,Fx;!;mp12=0,1d";
/*
@ -717,7 +717,7 @@ uint16_t mode_hyper_sparkle(void) {
}
return FRAMETIME;
}
static const char _data_FX_MODE_HYPER_SPARKLE[] PROGMEM = "Sparkle+@!,!;Bg,Fx,;!;mp12=0,1d";
static const char _data_FX_MODE_HYPER_SPARKLE[] PROGMEM = "Sparkle+@!,!;Bg,Fx;!;mp12=0,1d";
/*
@ -747,7 +747,7 @@ uint16_t mode_multi_strobe(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_MULTI_STROBE[] PROGMEM = "Strobe Mega@!,!;!,!,;!;1d";
static const char _data_FX_MODE_MULTI_STROBE[] PROGMEM = "Strobe Mega@!,!;!,!;!;1d";
/*
@ -799,7 +799,7 @@ uint16_t mode_android(void) {
return 3 + ((8 * (uint32_t)(255 - SEGMENT.speed)) / SEGLEN);
}
static const char _data_FX_MODE_ANDROID[] PROGMEM = "Android@!,Width;!,!,;!;mp12=1,1d"; //vertical
static const char _data_FX_MODE_ANDROID[] PROGMEM = "Android@!,Width;!,!;!;mp12=1,1d"; //vertical
/*
@ -903,7 +903,7 @@ uint16_t mode_chase_rainbow(void) {
return chase(color, SEGCOLOR(0), SEGCOLOR(1), false);
}
static const char _data_FX_MODE_CHASE_RAINBOW[] PROGMEM = "Chase Rainbow@!,Width;!,!,;;1d";
static const char _data_FX_MODE_CHASE_RAINBOW[] PROGMEM = "Chase Rainbow@!,Width;!,!;;1d";
/*
@ -917,7 +917,7 @@ uint16_t mode_chase_rainbow_white(void) {
return chase(SEGCOLOR(0), color2, color3, false);
}
static const char _data_FX_MODE_CHASE_RAINBOW_WHITE[] PROGMEM = "Rainbow Runner@!,Size;Bg,,;;1d";
static const char _data_FX_MODE_CHASE_RAINBOW_WHITE[] PROGMEM = "Rainbow Runner@!,Size;Bg;;1d";
/*
@ -993,7 +993,7 @@ uint16_t mode_traffic_light(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_TRAFFIC_LIGHT[] PROGMEM = "Traffic Light@!,;,!,;!;1d";
static const char _data_FX_MODE_TRAFFIC_LIGHT[] PROGMEM = "Traffic Light@!;,!;!;1d";
/*
@ -1023,7 +1023,7 @@ uint16_t mode_chase_flash(void) {
}
return delay;
}
static const char _data_FX_MODE_CHASE_FLASH[] PROGMEM = "Chase Flash@!,;Bg,Fx,!;!;1d";
static const char _data_FX_MODE_CHASE_FLASH[] PROGMEM = "Chase Flash@!;Bg,Fx,!;!;1d";
/*
@ -1058,7 +1058,7 @@ uint16_t mode_chase_flash_random(void) {
}
return delay;
}
static const char _data_FX_MODE_CHASE_FLASH_RANDOM[] PROGMEM = "Chase Flash Rnd@!,;,Fx,;0;1d";
static const char _data_FX_MODE_CHASE_FLASH_RANDOM[] PROGMEM = "Chase Flash Rnd@!;,Fx;0;1d";
/*
@ -1067,7 +1067,7 @@ static const char _data_FX_MODE_CHASE_FLASH_RANDOM[] PROGMEM = "Chase Flash Rnd@
uint16_t mode_running_color(void) {
return running(SEGCOLOR(0), SEGCOLOR(1));
}
static const char _data_FX_MODE_RUNNING_COLOR[] PROGMEM = "Chase 2@!,Width;!,!,;!;1d";
static const char _data_FX_MODE_RUNNING_COLOR[] PROGMEM = "Chase 2@!,Width;!,!;!;1d";
/*
@ -1146,7 +1146,7 @@ uint16_t larson_scanner(bool dual) {
uint16_t mode_larson_scanner(void){
return larson_scanner(false);
}
static const char _data_FX_MODE_LARSON_SCANNER[] PROGMEM = "Scanner@!,Fade rate;!,!,;!;mp12=0,1d";
static const char _data_FX_MODE_LARSON_SCANNER[] PROGMEM = "Scanner@!,Fade rate;!,!;!;mp12=0,1d";
/*
@ -1156,7 +1156,7 @@ static const char _data_FX_MODE_LARSON_SCANNER[] PROGMEM = "Scanner@!,Fade rate;
uint16_t mode_dual_larson_scanner(void){
return larson_scanner(true);
}
static const char _data_FX_MODE_DUAL_LARSON_SCANNER[] PROGMEM = "Scanner Dual@!,Fade rate;!,!,;!;mp12=0,1d";
static const char _data_FX_MODE_DUAL_LARSON_SCANNER[] PROGMEM = "Scanner Dual@!,Fade rate;!,!;!;mp12=0,1d";
/*
@ -1221,7 +1221,7 @@ uint16_t mode_fireworks() {
}
return FRAMETIME;
}
static const char _data_FX_MODE_FIREWORKS[] PROGMEM = "Fireworks@,Frequency;!,!,;!;ix=192,pal=11,1d,2d";
static const char _data_FX_MODE_FIREWORKS[] PROGMEM = "Fireworks@,Frequency;!,!;!;ix=192,pal=11,1d,2d";
//Twinkling LEDs running. Inspired by https://github.com/kitesurfer1404/WS2812FX/blob/master/src/custom/Rain.h
@ -1256,7 +1256,7 @@ uint16_t mode_rain()
}
return mode_fireworks();
}
static const char _data_FX_MODE_RAIN[] PROGMEM = "Rain@!,Spawning rate;!,!,;;ix=128,pal=0,1d,2d";
static const char _data_FX_MODE_RAIN[] PROGMEM = "Rain@!,Spawning rate;!,!;;ix=128,pal=0,1d,2d";
/*
@ -1285,7 +1285,7 @@ uint16_t mode_fire_flicker(void) {
SEGENV.step = it;
return FRAMETIME;
}
static const char _data_FX_MODE_FIRE_FLICKER[] PROGMEM = "Fire Flicker@!,!;!,,;!;1d";
static const char _data_FX_MODE_FIRE_FLICKER[] PROGMEM = "Fire Flicker@!,!;!;!;1d";
/*
@ -1323,7 +1323,7 @@ uint16_t gradient_base(bool loading) {
uint16_t mode_gradient(void) {
return gradient_base(false);
}
static const char _data_FX_MODE_GRADIENT[] PROGMEM = "Gradient@!,Spread;!,!,;!;ix=16,1d";
static const char _data_FX_MODE_GRADIENT[] PROGMEM = "Gradient@!,Spread;!,!;!;ix=16,1d";
/*
@ -1332,7 +1332,7 @@ static const char _data_FX_MODE_GRADIENT[] PROGMEM = "Gradient@!,Spread;!,!,;!;i
uint16_t mode_loading(void) {
return gradient_base(true);
}
static const char _data_FX_MODE_LOADING[] PROGMEM = "Loading@!,Fade;!,!,;!;ix=16,1d";
static const char _data_FX_MODE_LOADING[] PROGMEM = "Loading@!,Fade;!,!;!;ix=16,1d";
//American Police Light with all LEDs Red and Blue
@ -1360,7 +1360,7 @@ uint16_t police_base(uint32_t color1, uint32_t color2)
// SEGMENT.fill(SEGCOLOR(1));
// return police_base(RED, BLUE);
//}
//static const char _data_FX_MODE_POLICE[] PROGMEM = "Police@!,Width;,Bg,;0";
//static const char _data_FX_MODE_POLICE[] PROGMEM = "Police@!,Width;,Bg;0";
//Police Lights with custom colors
@ -1621,7 +1621,7 @@ uint16_t mode_tricolor_wipe(void)
return FRAMETIME;
}
static const char _data_FX_MODE_TRICOLOR_WIPE[] PROGMEM = "Tri Wipe@!,;1,2,3;0;1d";
static const char _data_FX_MODE_TRICOLOR_WIPE[] PROGMEM = "Tri Wipe@!;1,2,3;0;1d";
/*
@ -1894,7 +1894,7 @@ uint16_t mode_pride_2015(void)
SEGENV.aux0 = sHue16;
return FRAMETIME;
}
static const char _data_FX_MODE_PRIDE_2015[] PROGMEM = "Pride 2015@!,;;;1d";
static const char _data_FX_MODE_PRIDE_2015[] PROGMEM = "Pride 2015@!;;;1d";
//eight colored dots, weaving in and out of sync with each other
@ -1911,7 +1911,7 @@ uint16_t mode_juggle(void){
}
return FRAMETIME;
}
static const char _data_FX_MODE_JUGGLE[] PROGMEM = "Juggle@!,Trail;!,!,;!;sx=16,ix=240,1d";
static const char _data_FX_MODE_JUGGLE[] PROGMEM = "Juggle@!,Trail;!,!;!;sx=16,ix=240,1d";
uint16_t mode_palette()
@ -1931,7 +1931,7 @@ uint16_t mode_palette()
}
return FRAMETIME;
}
static const char _data_FX_MODE_PALETTE[] PROGMEM = "Palette@Cycle speed,;1,2,3;!;1d";
static const char _data_FX_MODE_PALETTE[] PROGMEM = "Palette@Cycle speed;1,2,3;!;1d";
// WLED limitation: Analog Clock overlay will NOT work when Fire2012 is active
@ -2087,7 +2087,7 @@ uint16_t mode_bpm()
}
return FRAMETIME;
}
static const char _data_FX_MODE_BPM[] PROGMEM = "Bpm@!,;1,2,3;!;sx=64,1d";
static const char _data_FX_MODE_BPM[] PROGMEM = "Bpm@!;1,2,3;!;sx=64,1d";
uint16_t mode_fillnoise8()
@ -2269,7 +2269,7 @@ uint16_t mode_lake() {
}
return FRAMETIME;
}
static const char _data_FX_MODE_LAKE[] PROGMEM = "Lake@!,;1,2,3;!;1d";
static const char _data_FX_MODE_LAKE[] PROGMEM = "Lake@!;1,2,3;!;1d";
// meteor effect
@ -2306,7 +2306,7 @@ uint16_t mode_meteor() {
return FRAMETIME;
}
static const char _data_FX_MODE_METEOR[] PROGMEM = "Meteor@!,Trail length;!,,;!;1d";
static const char _data_FX_MODE_METEOR[] PROGMEM = "Meteor@!,Trail length;!;!;1d";
// smooth meteor effect
@ -2345,7 +2345,7 @@ uint16_t mode_meteor_smooth() {
SEGENV.step += SEGMENT.speed +1;
return FRAMETIME;
}
static const char _data_FX_MODE_METEOR_SMOOTH[] PROGMEM = "Meteor Smooth@!,Trail length;!,,;!;1d";
static const char _data_FX_MODE_METEOR_SMOOTH[] PROGMEM = "Meteor Smooth@!,Trail length;!;!;1d";
//Railway Crossing / Christmas Fairy lights
@ -2684,7 +2684,7 @@ uint16_t mode_halloween_eyes()
return FRAMETIME;
}
static const char _data_FX_MODE_HALLOWEEN_EYES[] PROGMEM = "Halloween Eyes@Duration,Eye fade time;!,!,;!;1d,2d";
static const char _data_FX_MODE_HALLOWEEN_EYES[] PROGMEM = "Halloween Eyes@Duration,Eye fade time;!,!;!;1d,2d";
//Speed slider sets amount of LEDs lit, intensity sets unlit
@ -2706,7 +2706,7 @@ uint16_t mode_static_pattern()
return FRAMETIME;
}
static const char _data_FX_MODE_STATIC_PATTERN[] PROGMEM = "Solid Pattern@Fg size,Bg size;Fg,Bg,;!;pal=0,1d";
static const char _data_FX_MODE_STATIC_PATTERN[] PROGMEM = "Solid Pattern@Fg size,Bg size;Fg,Bg;!;pal=0,1d";
uint16_t mode_tri_static_pattern()
@ -2767,7 +2767,7 @@ uint16_t mode_spots()
{
return spots_base((255 - SEGMENT.speed) << 8);
}
static const char _data_FX_MODE_SPOTS[] PROGMEM = "Spots@Spread,Width;!,!,;!;1d";
static const char _data_FX_MODE_SPOTS[] PROGMEM = "Spots@Spread,Width;!,!;!;1d";
//Intensity slider sets number of "lights", LEDs per light fade in and out
@ -2778,7 +2778,7 @@ uint16_t mode_spots_fade()
uint16_t tr = (t >> 1) + (t >> 2);
return spots_base(tr);
}
static const char _data_FX_MODE_SPOTS_FADE[] PROGMEM = "Spots Fade@Spread,Width;!,!,;!;1d";
static const char _data_FX_MODE_SPOTS_FADE[] PROGMEM = "Spots Fade@Spread,Width;!,!;!;1d";
//each needs 12 bytes
@ -3087,14 +3087,14 @@ uint16_t mode_candle()
{
return candle(false);
}
static const char _data_FX_MODE_CANDLE[] PROGMEM = "Candle@Flicker rate,Flicker intensity;!,!,;!;sx=96,ix=224,pal=0,1d";
static const char _data_FX_MODE_CANDLE[] PROGMEM = "Candle@Flicker rate,Flicker intensity;!,!;!;sx=96,ix=224,pal=0,1d";
uint16_t mode_candle_multi()
{
return candle(true);
}
static const char _data_FX_MODE_CANDLE_MULTI[] PROGMEM = "Candle Multi@Flicker rate,Flicker intensity;!,!,;!;sx=96,ix=224,pal=0,1d";
static const char _data_FX_MODE_CANDLE_MULTI[] PROGMEM = "Candle Multi@Flicker rate,Flicker intensity;!,!;!;sx=96,ix=224,pal=0,1d";
/*
@ -3227,7 +3227,7 @@ uint16_t mode_starburst(void) {
return FRAMETIME;
}
#undef STARBURST_MAX_FRAG
static const char _data_FX_MODE_STARBURST[] PROGMEM = "Fireworks Starburst@Chance,Fragments;,!,;!;pal=11,mp12=0,1d";
static const char _data_FX_MODE_STARBURST[] PROGMEM = "Fireworks Starburst@Chance,Fragments;,!;!;pal=11,mp12=0,1d";
/*
@ -3363,7 +3363,7 @@ uint16_t mode_exploding_fireworks(void)
return FRAMETIME;
}
#undef MAX_SPARKS
static const char _data_FX_MODE_EXPLODING_FIREWORKS[] PROGMEM = "Fireworks 1D@Gravity,Firing side;!,!,;!=11;ix=128,1d,2d";
static const char _data_FX_MODE_EXPLODING_FIREWORKS[] PROGMEM = "Fireworks 1D@Gravity,Firing side;!,!;!=11;ix=128,1d,2d";
/*
@ -3538,7 +3538,7 @@ uint16_t mode_tetrix(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_TETRIX[] PROGMEM = "Tetrix@!,Width;!,!,;!;sx=0,ix=0,pal=11,mp12=1,1d";
static const char _data_FX_MODE_TETRIX[] PROGMEM = "Tetrix@!,Width;!,!;!;sx=0,ix=0,pal=11,mp12=1,1d";
/*
@ -3564,7 +3564,7 @@ uint16_t mode_plasma(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_PLASMA[] PROGMEM = "Plasma@Phase,;1,2,3;!;1d";
static const char _data_FX_MODE_PLASMA[] PROGMEM = "Plasma@Phase;1,2,3;!;1d";
/*
@ -3617,7 +3617,7 @@ uint16_t mode_percent(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill,,,,One color;!,!,;!;1d";
static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill,,,,One color;!,!;!;1d";
/*
@ -3650,7 +3650,7 @@ uint16_t mode_heartbeat(void) {
return FRAMETIME;
}
static const char _data_FX_MODE_HEARTBEAT[] PROGMEM = "Heartbeat@!,!;!,!,;!;mp12=1,1d";
static const char _data_FX_MODE_HEARTBEAT[] PROGMEM = "Heartbeat@!,!;!,!;!;mp12=1,1d";
// "Pacifica"
@ -3782,7 +3782,7 @@ uint16_t mode_solid_glitter()
return FRAMETIME;
}
static const char _data_FX_MODE_SOLID_GLITTER[] PROGMEM = "Solid Glitter@,!;!,,;0;mp12=0,1d";
static const char _data_FX_MODE_SOLID_GLITTER[] PROGMEM = "Solid Glitter@,!;!;0;mp12=0,1d";
/*
@ -3835,7 +3835,7 @@ uint16_t mode_sunrise() {
return FRAMETIME;
}
static const char _data_FX_MODE_SUNRISE[] PROGMEM = "Sunrise@Time [min],;;!;sx=60,1d";
static const char _data_FX_MODE_SUNRISE[] PROGMEM = "Sunrise@Time [min];;!;sx=60,1d";
/*
@ -3891,7 +3891,7 @@ uint16_t mode_twinkleup(void) { // A very short twinkle routine
return FRAMETIME;
}
static const char _data_FX_MODE_TWINKLEUP[] PROGMEM = "Twinkleup@!,Intensity;!,!,;!;mp12=0,1d";
static const char _data_FX_MODE_TWINKLEUP[] PROGMEM = "Twinkleup@!,Intensity;!,!;!;mp12=0,1d";
// Peaceful noise that's slow and with gradually changing palettes. Does not support WLED palettes or default colours or controls.
@ -4016,7 +4016,7 @@ uint16_t mode_chunchun(void)
}
return FRAMETIME;
}
static const char _data_FX_MODE_CHUNCHUN[] PROGMEM = "Chunchun@!,Gap size;!,!,;!;1d";
static const char _data_FX_MODE_CHUNCHUN[] PROGMEM = "Chunchun@!,Gap size;!,!;!;1d";
//13 bytes
@ -4928,7 +4928,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
return FRAMETIME_FIXED * (128-(SEGMENT.speed>>1)); // update only when appropriate time passes (in 42 FPS slots)
} // mode_2Dgameoflife()
static const char _data_FX_MODE_2DGAMEOFLIFE[] PROGMEM = "Game Of Life@!,;!,!;!;2d";
static const char _data_FX_MODE_2DGAMEOFLIFE[] PROGMEM = "Game Of Life@!;!,!;!;2d";
/////////////////////////
@ -5156,7 +5156,7 @@ uint16_t mode_2Dmatrix(void) { // Matrix2D. By Jeremy Williams.
return FRAMETIME;
} // mode_2Dmatrix()
static const char _data_FX_MODE_2DMATRIX[] PROGMEM = "Matrix@Falling speed,Spawning rate,Trail,,,Custom color,,;Spawn,Trail;;pal=0,2d";
static const char _data_FX_MODE_2DMATRIX[] PROGMEM = "Matrix@Falling speed,Spawning rate,Trail,,,Custom color;Spawn,Trail;;pal=0,2d";
/////////////////////////
@ -5436,7 +5436,7 @@ uint16_t mode_2Dsquaredswirl(void) { // By: Mark Kriegsman. https://g
return FRAMETIME;
} // mode_2Dsquaredswirl()
static const char _data_FX_MODE_2DSQUAREDSWIRL[] PROGMEM = "Squared Swirl@,,,,Blur;,,;!;2d";
static const char _data_FX_MODE_2DSQUAREDSWIRL[] PROGMEM = "Squared Swirl@,,,,Blur;;!;2d";
//////////////////////////////
@ -5830,7 +5830,7 @@ uint16_t mode_2Dfloatingblobs(void) {
return FRAMETIME;
}
#undef MAX_BLOBS
static const char _data_FX_MODE_2DBLOBS[] PROGMEM = "Blobs@!,# blobs,Blur;!,!,;!;c1=8,2d";
static const char _data_FX_MODE_2DBLOBS[] PROGMEM = "Blobs@!,# blobs,Blur;!,!;!;c1=8,2d";
////////////////////////////
@ -6048,7 +6048,7 @@ uint16_t mode_ripplepeak(void) { // * Ripple peak. By Andrew Tuli
return FRAMETIME;
} // mode_ripplepeak()
static const char _data_FX_MODE_RIPPLEPEAK[] PROGMEM = "Ripple Peak@Fade rate,Max # of ripples,Select bin,Volume (minimum);!,!;!;c2=0,mp12=0,ssim=0,1d,vo"; // Pixel, Beatsin
static const char _data_FX_MODE_RIPPLEPEAK[] PROGMEM = "Ripple Peak@Fade rate,Max # of ripples,Select bin,Volume (min);!,!;!;c2=0,mp12=0,ssim=0,1d,vo"; // Pixel, Beatsin
#ifndef WLED_DISABLE_2D
@ -6576,7 +6576,7 @@ uint16_t mode_puddlepeak(void) { // Puddlepeak. By Andrew Tuline.
return FRAMETIME;
} // mode_puddlepeak()
static const char _data_FX_MODE_PUDDLEPEAK[] PROGMEM = "Puddlepeak@Fade rate,Puddle size,Select bin,Volume (minimum);!,!;!;c2=0,mp12=0,ssim=0,1d,vo"; // Pixels, Beatsin
static const char _data_FX_MODE_PUDDLEPEAK[] PROGMEM = "Puddlepeak@Fade rate,Puddle size,Select bin,Volume (min);!,!;!;c2=0,mp12=0,ssim=0,1d,vo"; // Pixels, Beatsin
//////////////////////
@ -7078,7 +7078,7 @@ uint16_t mode_waterfall(void) { // Waterfall. By: Andrew Tulin
return FRAMETIME;
} // mode_waterfall()
static const char _data_FX_MODE_WATERFALL[] PROGMEM = "Waterfall@!,Adjust color,Select bin,Volume (minimum);!,!;!;c2=0,mp12=2,ssim=0,1d,fr"; // Circles, Beatsin
static const char _data_FX_MODE_WATERFALL[] PROGMEM = "Waterfall@!,Adjust color,Select bin,Volume (min);!,!;!;c2=0,mp12=2,ssim=0,1d,fr"; // Circles, Beatsin
#ifndef WLED_DISABLE_2D
@ -7138,7 +7138,7 @@ uint16_t mode_2DGEQ(void) { // By Will Tatam. Code reduction by Ewoud Wijma.
return FRAMETIME;
} // mode_2DGEQ()
static const char _data_FX_MODE_2DGEQ[] PROGMEM = "GEQ@Fade speed,Ripple decay,# of bands,,,Color bars,,;!,,Peak Color;!;c1=255,c2=64,pal=11,ssim=0,2d,fr"; // Beatsin
static const char _data_FX_MODE_2DGEQ[] PROGMEM = "GEQ@Fade speed,Ripple decay,# of bands,,,Color bars;!,,Peak Color;!;c1=255,c2=64,pal=11,ssim=0,2d,fr"; // Beatsin
/////////////////////////

View File

@ -1586,7 +1586,7 @@ int16_t Bus::_cct = -1;
uint8_t Bus::_cctBlend = 0;
uint8_t Bus::_gAWM = 255;
const char JSON_mode_names[] PROGMEM = R"=====(["Mode names have moved"])=====";
const char JSON_mode_names[] PROGMEM = R"=====(["FX names moved"])=====";
const char JSON_palette_names[] PROGMEM = R"=====([
"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",

View File

@ -522,7 +522,7 @@ function loadFXData(callback = null)
fxdata = json||[];
// add default value for Solid
fxdata.shift()
fxdata.unshift("@;!;0");
fxdata.unshift(";!;0");
})
.catch((e)=>{
fxdata = [];
@ -838,7 +838,7 @@ function populateEffects()
if (ef.name.indexOf("RSVD") < 0) {
if (Array.isArray(fxdata) && fxdata.length>id) {
if (fxdata[id].length==0) fd = ";;!;1d"
else fd = fxdata[id].substr(1);
else fd = fxdata[id];
let eP = (fd == '')?[]:fd.split(";"); // effect parameters
let p = (eP.length<3 || eP[2]==='')?[]:eP[2].split(","); // palette data
if (p.length>0 && (p[0] !== "" && !isNumeric(p[0]))) nm += "&#x1F3A8;"; // effects using palette
@ -1366,38 +1366,30 @@ function readState(s,command=false)
function setEffectParameters(idx)
{
if (!(Array.isArray(fxdata) && fxdata.length>idx)) return;
var controlDefined = (fxdata[idx].substr(0,1) == "@");
var effectPar = fxdata[idx].substr(1);
var controlDefined = fxdata[idx].length;
var effectPar = fxdata[idx];
var effectPars = (effectPar == '')?[]:effectPar.split(";");
var slOnOff = (effectPars.length==0 || effectPars[0]=='')?[]:effectPars[0].split(",");
var coOnOff = (effectPars.length<2 || effectPars[1]=='')?[]:effectPars[1].split(",");
var paOnOff = (effectPars.length<3 || effectPars[2]=='')?[]:effectPars[2].split(",");
// set html slider items on/off
//var nSliders = Math.min(7,Math.floor(gId("sliders").children.length)); // div for each slider + filter + options
let nSliders = 5;
var sldCnt = 0;
for (let i=0; i<nSliders; i++) {
var slider = gId("slider" + i);
var label = gId("sliderLabel" + i);
// if (not controlDefined and for AC speed or intensity and for SR alle sliders) or slider has a value
// if (not controlDefined and for AC speed or intensity and for SR all sliders) or slider has a value
if ((!controlDefined && i < ((idx<128)?2:nSliders)) || (slOnOff.length>i && slOnOff[i] != "")) {
//if (slOnOff.length>i && slOnOff[i].indexOf("=")>0) {
// // embeded default values
// var dPos = slOnOff[i].indexOf("=");
// slOnOff[i] = slOnOff[i].substring(0,dPos);
//}
if (slOnOff.length>i && slOnOff[i]!="!") label.innerHTML = slOnOff[i];
else if (i==0) label.innerHTML = "Effect speed";
else if (i==1) label.innerHTML = "Effect intensity";
else label.innerHTML = "Custom" + (i-1);
sldCnt++;
slider.classList.remove("hide");
} else {
slider.classList.add("hide");
}
}
if (slOnOff.length>5) {
if (slOnOff.length>5) { // up to 3 checkboxes
gId('fxopt').classList.remove('fade');
for (let i = 0; i<3; i++) {
if (5+i<slOnOff.length && slOnOff[5+i]!=='') {
@ -1441,7 +1433,7 @@ function setEffectParameters(idx)
hide = false;
if (!cslCnt || oCsel==i) selectSlot(i); // select 1st displayed slot or old one
cslCnt++;
} else if (!controlDefined /*|| paOnOff.length>0*/) { // if no controls then all buttons should be shown for color 1..3
} else if (!controlDefined) { // if no controls then all buttons should be shown for color 1..3
btn.style.display = "inline";
btn.innerHTML = `${i+1}`;
hide = false;
@ -1468,7 +1460,7 @@ function setEffectParameters(idx)
if (paOnOff.length>0 && paOnOff[0] != "!") pall.innerHTML = paOnOff[0];
else pall.innerHTML = '<i class="icons sel-icon" onclick="tglHex()">&#xe2b3;</i> Color palette';
} else {
// disable palett list
// disable palette list
pall.innerHTML = '<i class="icons sel-icon" onclick="tglHex()">&#xe2b3;</i> Color palette not used';
palw.style.display = "none";
}

File diff suppressed because it is too large Load Diff

View File

@ -890,6 +890,7 @@ void serializeNodes(JsonObject root)
}
}
// deserializes mode data string into JsonArray
void serializeModeData(JsonArray fxdata)
{
char lineBuffer[128];
@ -897,14 +898,14 @@ void serializeModeData(JsonArray fxdata)
strncpy_P(lineBuffer, strip.getModeData(i), 127);
if (lineBuffer[0] != 0) {
char* dataPtr = strchr(lineBuffer,'@');
if (dataPtr) fxdata.add(dataPtr);
if (dataPtr) fxdata.add(dataPtr+1);
else fxdata.add("");
}
}
}
// deserializes mode names string into JsonArray
// also removes WLED-SR extensions (@...) from deserialised names
// also removes effect data extensions (@...) from deserialised names
void serializeModeNames(JsonArray arr) {
char lineBuffer[128];
for (size_t i = 0; i < strip.getModeCount(); i++) {

View File

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