Cleanup effects.

This commit is contained in:
Blaz Kristan 2022-07-06 20:41:12 +02:00
parent bdea2acf67
commit 698a32f364
2 changed files with 23 additions and 48 deletions

View File

@ -1039,24 +1039,6 @@ uint16_t mode_running_color(void) {
static const char *_data_FX_MODE_RUNNING_COLOR PROGMEM = "Chase 2@!,Width;!,!,;!";
/*
* Alternating red/white pixels running.
*/
uint16_t mode_candy_cane(void) {
return running(RED, WHITE);
}
static const char *_data_FX_MODE_CANDY_CANE PROGMEM = "Candy Cane@!,Width;;";
/*
* Alternating orange/purple pixels running.
*/
uint16_t mode_halloween(void) {
return running(PURPLE, ORANGE);
}
static const char *_data_FX_MODE_HALLOWEEN PROGMEM = "Halloween@!,Width;;";
/*
* Random colored pixels running. ("Stream")
*/
@ -1329,12 +1311,12 @@ uint16_t police_base(uint32_t color1, uint32_t color2)
//Police Lights Red and Blue
uint16_t mode_police()
{
strip.fill(SEGCOLOR(1));
return police_base(RED, BLUE);
}
static const char *_data_FX_MODE_POLICE PROGMEM = "Police@!,Width;,Bg,;0";
//uint16_t mode_police()
//{
// strip.fill(SEGCOLOR(1));
// return police_base(RED, BLUE);
//}
//static const char *_data_FX_MODE_POLICE PROGMEM = "Police@!,Width;,Bg,;0";
//Police Lights with custom colors
@ -7619,7 +7601,7 @@ static const char *_data_FX_MODE_2DAKEMI PROGMEM = "2D Akemi@Color speed,Dance;H
static const char *_data_RESERVED PROGMEM = "Reserved";
void WS2812FX::setupEffectData() {
// fill reserved word in case there will be any gaps in the array
for (byte i=0; i<getModeCount(); i++) _modeData[i] = _data_RESERVED;
for (int i=0; i<getModeCount(); i++) addEffect(i, &mode_static, _data_RESERVED);
//addEffect(FX_MODE_..., &mode_fcn, _data_FX_MODE_...);
addEffect(FX_MODE_STATIC, &mode_static, _data_FX_MODE_STATIC);
addEffect(FX_MODE_BLINK, &mode_blink, _data_FX_MODE_BLINK);
@ -7667,12 +7649,12 @@ void WS2812FX::setupEffectData() {
addEffect(FX_MODE_FIRE_FLICKER, &mode_fire_flicker, _data_FX_MODE_FIRE_FLICKER);
addEffect(FX_MODE_GRADIENT, &mode_gradient, _data_FX_MODE_GRADIENT);
addEffect(FX_MODE_LOADING, &mode_loading, _data_FX_MODE_LOADING);
addEffect(FX_MODE_POLICE, &mode_police, _data_FX_MODE_POLICE);
addEffect(FX_MODE_WAVESINS, &mode_wavesins, _data_FX_MODE_WAVESINS);
addEffect(FX_MODE_FAIRY, &mode_fairy, _data_FX_MODE_FAIRY);
addEffect(FX_MODE_TWO_DOTS, &mode_two_dots, _data_FX_MODE_TWO_DOTS);
addEffect(FX_MODE_FAIRYTWINKLE, &mode_fairytwinkle, _data_FX_MODE_FAIRYTWINKLE);
addEffect(FX_MODE_RUNNING_DUAL, &mode_running_dual, _data_FX_MODE_RUNNING_DUAL);
addEffect(FX_MODE_HALLOWEEN, &mode_halloween, _data_FX_MODE_HALLOWEEN);
addEffect(FX_MODE_PERLINMOVE, &mode_perlinmove, _data_FX_MODE_PERLINMOVE);
addEffect(FX_MODE_TRICOLOR_CHASE, &mode_tricolor_chase, _data_FX_MODE_TRICOLOR_CHASE);
addEffect(FX_MODE_TRICOLOR_WIPE, &mode_tricolor_wipe, _data_FX_MODE_TRICOLOR_WIPE);
addEffect(FX_MODE_TRICOLOR_FADE, &mode_tricolor_fade, _data_FX_MODE_TRICOLOR_FADE);
@ -7735,7 +7717,7 @@ void WS2812FX::setupEffectData() {
addEffect(FX_MODE_CHUNCHUN, &mode_chunchun, _data_FX_MODE_CHUNCHUN);
addEffect(FX_MODE_DANCING_SHADOWS, &mode_dancing_shadows, _data_FX_MODE_DANCING_SHADOWS);
addEffect(FX_MODE_WASHING_MACHINE, &mode_washing_machine, _data_FX_MODE_WASHING_MACHINE);
addEffect(FX_MODE_CANDY_CANE, &mode_candy_cane, _data_FX_MODE_CANDY_CANE);
addEffect(FX_MODE_FLOWSTRIPE, &mode_FlowStripe, _data_FX_MODE_FLOWSTRIPE);
addEffect(FX_MODE_BLENDS, &mode_blends, _data_FX_MODE_BLENDS);
addEffect(FX_MODE_TV_SIMULATOR, &mode_tv_simulator, _data_FX_MODE_TV_SIMULATOR);
addEffect(FX_MODE_DYNAMIC_SMOOTH, &mode_dynamic_smooth, _data_FX_MODE_DYNAMIC_SMOOTH);
@ -7746,9 +7728,6 @@ void WS2812FX::setupEffectData() {
addEffect(FX_MODE_SCROLL_TEXT, &mode_2Dscrollingtext, _data_FX_MODE_SCROLL_TEXT);
addEffect(FX_MODE_DRIFT_ROSE, &mode_2Ddriftrose, _data_FX_MODE_DRIFT_ROSE);
#ifndef USERMOD_AUDIOREACTIVE
addEffect(FX_MODE_PERLINMOVE, &mode_perlinmove, _data_FX_MODE_PERLINMOVE);
addEffect(FX_MODE_FLOWSTRIPE, &mode_FlowStripe, _data_FX_MODE_FLOWSTRIPE);
addEffect(FX_MODE_WAVESINS, &mode_wavesins, _data_FX_MODE_WAVESINS);
addEffect(FX_MODE_2DJULIA, &mode_2DJulia, _data_FX_MODE_2DJULIA);
addEffect(FX_MODE_2DGAMEOFLIFE, &mode_2Dgameoflife, _data_FX_MODE_2DGAMEOFLIFE);
addEffect(FX_MODE_2DNOISE, &mode_2Dnoise, _data_FX_MODE_2DNOISE);
@ -7809,7 +7788,7 @@ void WS2812FX::setupEffectData() {
addEffect(FX_MODE_PUDDLEPEAK, &mode_puddlepeak, _data_FX_MODE_PUDDLEPEAK);
addEffect(FX_MODE_NOISEMOVE, &mode_noisemove, _data_FX_MODE_NOISEMOVE);
addEffect(FX_MODE_2DNOISE, &mode_2Dnoise, _data_FX_MODE_2DNOISE);
addEffect(FX_MODE_PERLINMOVE, &mode_perlinmove, _data_FX_MODE_PERLINMOVE);
//addEffect(FX_MODE_PERLINMOVE, &mode_perlinmove, _data_FX_MODE_PERLINMOVE);
addEffect(FX_MODE_RIPPLEPEAK, &mode_ripplepeak, _data_FX_MODE_RIPPLEPEAK);
addEffect(FX_MODE_2DFIRENOISE, &mode_2Dfirenoise, _data_FX_MODE_2DFIRENOISE);
addEffect(FX_MODE_2DSQUAREDSWIRL, &mode_2Dsquaredswirl, _data_FX_MODE_2DSQUAREDSWIRL);
@ -7836,12 +7815,12 @@ void WS2812FX::setupEffectData() {
addEffect(FX_MODE_2DLISSAJOUS, &mode_2DLissajous, _data_FX_MODE_2DLISSAJOUS);
addEffect(FX_MODE_2DFRIZZLES, &mode_2DFrizzles, _data_FX_MODE_2DFRIZZLES);
addEffect(FX_MODE_2DPLASMABALL, &mode_2DPlasmaball, _data_FX_MODE_2DPLASMABALL);
addEffect(FX_MODE_FLOWSTRIPE, &mode_FlowStripe, _data_FX_MODE_FLOWSTRIPE);
//addEffect(FX_MODE_FLOWSTRIPE, &mode_FlowStripe, _data_FX_MODE_FLOWSTRIPE);
addEffect(FX_MODE_2DHIPHOTIC, &mode_2DHiphotic, _data_FX_MODE_2DHIPHOTIC);
addEffect(FX_MODE_2DSINDOTS, &mode_2DSindots, _data_FX_MODE_2DSINDOTS);
addEffect(FX_MODE_2DDNASPIRAL, &mode_2DDNASpiral, _data_FX_MODE_2DDNASPIRAL);
addEffect(FX_MODE_2DBLACKHOLE, &mode_2DBlackHole, _data_FX_MODE_2DBLACKHOLE);
addEffect(FX_MODE_WAVESINS, &mode_wavesins, _data_FX_MODE_WAVESINS);
//addEffect(FX_MODE_WAVESINS, &mode_wavesins, _data_FX_MODE_WAVESINS);
addEffect(FX_MODE_ROCKTAVES, &mode_rocktaves, _data_FX_MODE_ROCKTAVES);
addEffect(FX_MODE_2DAKEMI, &mode_2DAkemi, _data_FX_MODE_2DAKEMI);
//addEffect(FX_MODE_CUSTOMEFFECT, &mode_customEffect, _data_FX_MODE_CUSTOMEFFECT); //WLEDSR Custom Effects

View File

@ -87,15 +87,11 @@ uint32_t color_add(uint32_t,uint32_t);
#define MIN_SHOW_DELAY (_frametime < 16 ? 8 : 15)
#define NUM_COLORS 3 /* number of colors per segment */
//#define SEGMENT _segments[_segment_index]
//#define SEGCOLOR(x) _colors_t[x]
//#define SEGENV _segment_runtimes[_segment_index]
//#define SEGLEN _virtualSegmentLength
#define SEGMENT strip.getSegment(strip.getCurrSegmentId())
#define SEGENV strip.getSegmentRuntime(strip.getCurrSegmentId())
#define SEGCOLOR(x) strip.segColor(x)
#define SEGLEN strip.segLen()
#define SPEED_FORMULA_L 5U + (50U*(255U - SEGMENT.speed))/SEGLEN
#define SPEED_FORMULA_L (5U + (50U*(255U - SEGMENT.speed))/SEGLEN)
// some common colors
#define RED (uint32_t)0xFF0000
@ -176,12 +172,14 @@ uint32_t color_add(uint32_t,uint32_t);
#define FX_MODE_FIRE_FLICKER 45
#define FX_MODE_GRADIENT 46
#define FX_MODE_LOADING 47
#define FX_MODE_POLICE 48 // candidate for removal (after below three)
//#define FX_MODE_POLICE 48 // candidate for removal (after below three)
#define FX_MODE_WAVESINS 48 // was Police prior to 0.14 (use Two Dots with Red/Blue)
#define FX_MODE_FAIRY 49 //was Police All prior to 0.13.0-b6 (use "Two Dots" with Red/Blue and full intensity)
#define FX_MODE_TWO_DOTS 50
#define FX_MODE_FAIRYTWINKLE 51 //was Two Areas prior to 0.13.0-b6 (use "Two Dots" with full intensity)
#define FX_MODE_RUNNING_DUAL 52
#define FX_MODE_HALLOWEEN 53 // candidate for removal
//#define FX_MODE_HALLOWEEN 53 // candidate for removal
#define FX_MODE_PERLINMOVE 53 // was Halloween prior to 0.14 (use Cahse 2 with Purple/Orange)
#define FX_MODE_TRICOLOR_CHASE 54
#define FX_MODE_TRICOLOR_WIPE 55
#define FX_MODE_TRICOLOR_FADE 56
@ -242,7 +240,8 @@ uint32_t color_add(uint32_t,uint32_t);
#define FX_MODE_CHUNCHUN 111
#define FX_MODE_DANCING_SHADOWS 112
#define FX_MODE_WASHING_MACHINE 113
#define FX_MODE_CANDY_CANE 114 // candidate for removal
//#define FX_MODE_CANDY_CANE 114 // candidate for removal
#define FX_MODE_FLOWSTRIPE 114 // was Cany Cane prior to 0.14 (use Cahse 2 with Red/White)
#define FX_MODE_BLENDS 115
#define FX_MODE_TV_SIMULATOR 116
#define FX_MODE_DYNAMIC_SMOOTH 117
@ -257,9 +256,6 @@ uint32_t color_add(uint32_t,uint32_t);
// WLED-SR effects
#ifndef USERMOD_AUDIOREACTIVE
#define FX_MODE_PERLINMOVE 53 // should be moved to 53
#define FX_MODE_FLOWSTRIPE 114 // should be moved to 114
#define FX_MODE_WAVESINS 48 // should be moved to 48
#define FX_MODE_2DBLACKHOLE 124 // non audio
#define FX_MODE_2DDNASPIRAL 125 // non audio
#define FX_MODE_2DHIPHOTIC 126 // non audio
@ -321,7 +317,7 @@ uint32_t color_add(uint32_t,uint32_t);
#define FX_MODE_PUDDLEPEAK 144 // audio enhanced
#define FX_MODE_NOISEMOVE 145
#define FX_MODE_2DNOISE 146 // non audio
#define FX_MODE_PERLINMOVE 147 // should be moved to 53
//#define FX_MODE_PERLINMOVE 147 // moved to 53
#define FX_MODE_RIPPLEPEAK 148 // audio enhanced
#define FX_MODE_2DFIRENOISE 149 // non audio
#define FX_MODE_2DSQUAREDSWIRL 150 // non audio
@ -353,12 +349,12 @@ uint32_t color_add(uint32_t,uint32_t);
#define FX_MODE_2DLISSAJOUS 176 // non audio
#define FX_MODE_2DFRIZZLES 177 // non audio
#define FX_MODE_2DPLASMABALL 178 // non audio
#define FX_MODE_FLOWSTRIPE 179 // should be moved to 114
//#define FX_MODE_FLOWSTRIPE 179 // moved to 114
#define FX_MODE_2DHIPHOTIC 180 // non audio
#define FX_MODE_2DSINDOTS 181 // non audio
#define FX_MODE_2DDNASPIRAL 182 // non audio
#define FX_MODE_2DBLACKHOLE 183 // non audio
#define FX_MODE_WAVESINS 184 // should be moved to 48
//#define FX_MODE_WAVESINS 184 // moved to 48
#define FX_MODE_ROCKTAVES 185
#define FX_MODE_2DAKEMI 186 // audio enhanced
//#define FX_MODE_CUSTOMEFFECT 187 //WLEDSR Custom Effects