@@ -2260,17 +2260,18 @@ uint16_t mode_meteor() {
22602260
22612261 byte* trail = SEGENV.data ;
22622262
2263- byte meteorSize= 1 + SEGLEN / 10 ;
2263+ const unsigned meteorSize= 1 + SEGLEN / 20 ; // 5%
22642264 uint16_t counter = strip.now * ((SEGMENT.speed >> 2 ) +8 );
22652265 uint16_t in = counter * SEGLEN >> 16 ;
22662266
2267+ const int max = SEGMENT.palette ==5 || !SEGMENT.check1 ? 240 : 255 ;
22672268 // fade all leds to colors[1] in LEDs one step
22682269 for (int i = 0 ; i < SEGLEN; i++) {
2269- if (random8 () <= 255 - SEGMENT.intensity )
2270- {
2271- byte meteorTrailDecay = 128 + random8 (127 );
2270+ if (random8 () <= 255 - SEGMENT.intensity ) {
2271+ byte meteorTrailDecay = 162 + random8 (92 );
22722272 trail[i] = scale8 (trail[i], meteorTrailDecay);
2273- SEGMENT.setPixelColor (i, color_blend (SEGCOLOR (1 ), SEGMENT.color_from_palette (i, true , false , 0 ), trail[i]));
2273+ uint32_t col = SEGMENT.check1 ? SEGMENT.color_from_palette (i, true , false , 0 , trail[i]) : SEGMENT.color_from_palette (trail[i], false , true , 255 );
2274+ SEGMENT.setPixelColor (i, col);
22742275 }
22752276 }
22762277
@@ -2280,13 +2281,14 @@ uint16_t mode_meteor() {
22802281 if (index >= SEGLEN) {
22812282 index -= SEGLEN;
22822283 }
2283- trail[index] = 240 ;
2284- SEGMENT.setPixelColor (index, SEGMENT.color_from_palette (index, true , false , 0 ));
2284+ trail[index] = max;
2285+ uint32_t col = SEGMENT.check1 ? SEGMENT.color_from_palette (index, true , false , 0 , trail[index]) : SEGMENT.color_from_palette (trail[index], false , true , 255 );
2286+ SEGMENT.setPixelColor (index, col);
22852287 }
22862288
22872289 return FRAMETIME;
22882290}
2289- static const char _data_FX_MODE_METEOR[] PROGMEM = " Meteor@!,Trail length;!,! ;!;1" ;
2291+ static const char _data_FX_MODE_METEOR[] PROGMEM = " Meteor@!,Trail,,,,Gradient; ;!;1" ;
22902292
22912293
22922294// smooth meteor effect
@@ -2298,18 +2300,17 @@ uint16_t mode_meteor_smooth() {
22982300
22992301 byte* trail = SEGENV.data ;
23002302
2301- byte meteorSize= 1 + SEGLEN / 10 ;
2303+ const unsigned meteorSize= 1 + SEGLEN / 20 ; // 5%
23022304 uint16_t in = map ((SEGENV.step >> 6 & 0xFF ), 0 , 255 , 0 , SEGLEN -1 );
23032305
2306+ const int max = SEGMENT.palette ==5 || !SEGMENT.check1 ? 240 : 255 ;
23042307 // fade all leds to colors[1] in LEDs one step
23052308 for (int i = 0 ; i < SEGLEN; i++) {
2306- if (trail[i] != 0 && random8 () <= 255 - SEGMENT.intensity )
2307- {
2308- int change = 3 - random8 (12 ); // change each time between -8 and +3
2309- trail[i] += change;
2310- if (trail[i] > 245 ) trail[i] = 0 ;
2311- if (trail[i] > 240 ) trail[i] = 240 ;
2312- SEGMENT.setPixelColor (i, color_blend (SEGCOLOR (1 ), SEGMENT.color_from_palette (i, true , false , 0 ), trail[i]));
2309+ if (/* trail[i] != 0 &&*/ random8 () <= 255 - SEGMENT.intensity ) {
2310+ int change = trail[i] + 4 - random8 (24 ); // change each time between -20 and +4
2311+ trail[i] = constrain (change, 0 , max);
2312+ uint32_t col = SEGMENT.check1 ? SEGMENT.color_from_palette (i, true , false , 0 , trail[i]) : SEGMENT.color_from_palette (trail[i], false , true , 255 );
2313+ SEGMENT.setPixelColor (i, col);
23132314 }
23142315 }
23152316
@@ -2319,14 +2320,15 @@ uint16_t mode_meteor_smooth() {
23192320 if (index >= SEGLEN) {
23202321 index -= SEGLEN;
23212322 }
2322- trail[index] = 240 ;
2323- SEGMENT.setPixelColor (index, SEGMENT.color_from_palette (index, true , false , 0 ));
2323+ trail[index] = max;
2324+ uint32_t col = SEGMENT.check1 ? SEGMENT.color_from_palette (index, true , false , 0 , trail[index]) : SEGMENT.color_from_palette (trail[index], false , true , 255 );
2325+ SEGMENT.setPixelColor (index, col);
23242326 }
23252327
23262328 SEGENV.step += SEGMENT.speed +1 ;
23272329 return FRAMETIME;
23282330}
2329- static const char _data_FX_MODE_METEOR_SMOOTH[] PROGMEM = " Meteor Smooth@!,Trail length;!,! ;!;1" ;
2331+ static const char _data_FX_MODE_METEOR_SMOOTH[] PROGMEM = " Meteor Smooth@!,Trail,,,,Gradient; ;!;1" ;
23302332
23312333
23322334// Railway Crossing / Christmas Fairy lights
@@ -5984,12 +5986,12 @@ uint16_t mode_2Dscrollingtext(void) {
59845986 col1 = SEGCOLOR (0 );
59855987 col2 = SEGCOLOR (2 );
59865988 }
5987- SEGMENT.drawCharacter (text[i], xoffset, yoffset, letterWidth, letterHeight, col1, col2, (SEGMENT.custom3 + 1 )>> 3 );
5989+ SEGMENT.drawCharacter (text[i], xoffset, yoffset, letterWidth, letterHeight, col1, col2, map (SEGMENT.custom3 , 0 , 31 , - 2 , 2 ) );
59885990 }
59895991
59905992 return FRAMETIME;
59915993}
5992- static const char _data_FX_MODE_2DSCROLLTEXT[] PROGMEM = " Scrolling Text@!,Y Offset,Trail,Font size,Rotate,Gradient,Overlay,Reverse;!,!,Gradient;!;2;ix=128,c1=0,c3=0, rev=0,mi=0,rY=0,mY=0" ;
5994+ static const char _data_FX_MODE_2DSCROLLTEXT[] PROGMEM = " Scrolling Text@!,Y Offset,Trail,Font size,Rotate,Gradient,Overlay,Reverse;!,!,Gradient;!;2;ix=128,c1=0,rev=0,mi=0,rY=0,mY=0" ;
59935995
59945996
59955997// //////////////////////////
0 commit comments