@@ -51,7 +51,7 @@ static uint16_t triwave16(uint16_t in) {
5151 * Generates a tristate square wave w/ attac & decay
5252 * @param x input value 0-255
5353 * @param pulsewidth 0-127
54- * @param attdec attac & decay, max. pulsewidth / 2
54+ * @param attdec attack & decay, max. pulsewidth / 2
5555 * @returns signed waveform value
5656 */
5757static int8_t tristate_square8 (uint8_t x, uint8_t pulsewidth, uint8_t attdec) {
@@ -1241,7 +1241,7 @@ uint16_t mode_fireworks() {
12411241 if (SEGMENT.is2D ()) SEGMENT.setPixelColorXY (j, k, col);
12421242 else SEGMENT.setPixelColor (index, col);
12431243 SEGENV.aux1 = SEGENV.aux0 ; // old spark
1244- SEGENV.aux0 = index; // remember where spark occured
1244+ SEGENV.aux0 = index; // remember where spark occurred
12451245 }
12461246 }
12471247 return FRAMETIME;
@@ -1278,8 +1278,8 @@ uint16_t mode_rain() {
12781278 SEGENV.aux0 ++; // increase spark index
12791279 SEGENV.aux1 ++;
12801280 }
1281- if (SEGENV.aux0 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark positiom
1282- if (SEGENV.aux1 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark positiom
1281+ if (SEGENV.aux0 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark position
1282+ if (SEGENV.aux1 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark position
12831283 if (SEGENV.aux0 >= width*height) SEGENV.aux0 = 0 ; // ignore
12841284 if (SEGENV.aux1 >= width*height) SEGENV.aux1 = 0 ;
12851285 }
@@ -3707,7 +3707,7 @@ uint16_t mode_tetrix(void) {
37073707 }
37083708
37093709 if (drop->step == 0 ) { // init brick
3710- // speed calcualtion : a single brick should reach bottom of strip in X seconds
3710+ // speed calculation : a single brick should reach bottom of strip in X seconds
37113711 // if the speed is set to 1 this should take 5s and at 255 it should take 0.25s
37123712 // as this is dependant on SEGLEN it should be taken into account and the fact that effect runs every FRAMETIME s
37133713 int speed = SEGMENT.speed ? SEGMENT.speed : random8 (1 ,255 );
@@ -3790,7 +3790,7 @@ static const char _data_FX_MODE_PLASMA[] PROGMEM = "Plasma@Phase,!;!;!";
37903790
37913791/*
37923792 * Percentage display
3793- * Intesity values from 0-100 turn on the leds.
3793+ * Intensity values from 0-100 turn on the leds.
37943794 */
37953795uint16_t mode_percent (void ) {
37963796
@@ -3843,7 +3843,7 @@ static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill,,,,One c
38433843
38443844/*
38453845 * Modulates the brightness similar to a heartbeat
3846- * (unimplemented?) tries to draw an ECG aproximation on a 2D matrix
3846+ * (unimplemented?) tries to draw an ECG approximation on a 2D matrix
38473847 */
38483848uint16_t mode_heartbeat (void ) {
38493849 uint8_t bpm = 40 + (SEGMENT.speed >> 3 );
@@ -4525,7 +4525,7 @@ uint16_t mode_tv_simulator(void) {
45254525 // how much time is elapsed ?
45264526 tvSimulator->elapsed = strip.now - tvSimulator->startTime ;
45274527
4528- // fade from prev volor to next color
4528+ // fade from prev color to next color
45294529 if (tvSimulator->elapsed < tvSimulator->fadeTime ) {
45304530 r = map (tvSimulator->elapsed , 0 , tvSimulator->fadeTime , tvSimulator->pr , nr);
45314531 g = map (tvSimulator->elapsed , 0 , tvSimulator->fadeTime , tvSimulator->pg , ng);
@@ -6487,7 +6487,7 @@ uint16_t mode_gravcenter(void) { // Gravcenter. By Andrew Tuline.
64876487 SEGMENT.fade_out (251 ); // 30%
64886488
64896489 float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255 .0f ;
6490- segmentSampleAvg *= 0.125 ; // divide by 8, to compensate for later "sensitivty " upscaling
6490+ segmentSampleAvg *= 0.125 ; // divide by 8, to compensate for later "sensitivity " upscaling
64916491
64926492 float mySampleAvg = mapf (segmentSampleAvg*2.0 , 0 , 32 , 0 , (float )SEGLEN/2.0 ); // map to pixels available in current segment
64936493 uint16_t tempsamp = constrain (mySampleAvg, 0 , SEGLEN/2 ); // Keep the sample from overflowing.
@@ -6542,7 +6542,7 @@ uint16_t mode_gravcentric(void) { // Gravcentric. By Andrew
65426542 SEGMENT.fade_out (253 ); // 50%
65436543
65446544 float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255.0 ;
6545- segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivty " upscaling
6545+ segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivity " upscaling
65466546
65476547 float mySampleAvg = mapf (segmentSampleAvg*2.0 , 0 .0f , 32 .0f , 0 .0f , (float )SEGLEN/2.0 ); // map to pixels availeable in current segment
65486548 int tempsamp = constrain (mySampleAvg, 0 , SEGLEN/2 ); // Keep the sample from overflowing.
@@ -6609,7 +6609,7 @@ uint16_t mode_gravimeter(void) { // Gravmeter. By Andrew Tuline.
66096609
66106610 float segmentSampleAvg = (volumeSmth * sensGain) - sensOffset;
66116611 if (segmentSampleAvg < 0 ) segmentSampleAvg = 0 ; // could be <0 due to sensOffset
6612- segmentSampleAvg *= 0 .25f ; // divide by 4, to compensate for later "sensitivty " upscaling
6612+ segmentSampleAvg *= 0 .25f ; // divide by 4, to compensate for later "sensitivity " upscaling
66136613 float mySampleAvg = mapf (segmentSampleAvg*2 .0f , 0 , 64 , 0 , (SEGLEN-1 )); // map to pixels availeable in current segment
66146614 int tempsamp = constrain (mySampleAvg,0 ,SEGLEN-1 ); // Keep the sample from overflowing.
66156615 uint8_t gravity = 8 - SEGMENT.speed /32 ;
@@ -6753,7 +6753,7 @@ uint16_t mode_midnoise(void) { // Midnoise. By Andrew Tuline.
67536753 // SEGMENT.fade_out(SEGMENT.speed);
67546754
67556755 float tmpSound2 = volumeSmth * (float )SEGMENT.intensity / 256.0 ; // Too sensitive.
6756- tmpSound2 *= (float )SEGMENT.intensity / 128.0 ; // Reduce sensitity /length.
6756+ tmpSound2 *= (float )SEGMENT.intensity / 128.0 ; // Reduce sensitivity /length.
67576757
67586758 int maxLen = mapf (tmpSound2, 0 , 127 , 0 , SEGLEN/2 );
67596759 if (maxLen >SEGLEN/2 ) maxLen = SEGLEN/2 ;
@@ -7269,7 +7269,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch
72697269
72707270 if (FFT_MajorPeak > MAX_FREQUENCY) FFT_MajorPeak = 1 ;
72717271 // MajorPeak holds the freq. value which is most abundant in the last sample.
7272- // With our sampling rate of 10240Hz we have a usable freq range from roughtly 80Hz to 10240/2 Hz
7272+ // With our sampling rate of 10240Hz we have a usable freq range from roughly 80Hz to 10240/2 Hz
72737273 // we will treat everything with less than 65Hz as 0
72747274
72757275 if ((FFT_MajorPeak > 80 .0f ) && (volumeSmth > 0 .25f )) { // WLEDMM
@@ -7290,7 +7290,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch
72907290
72917291 return FRAMETIME;
72927292} // mode_freqmatrix()
7293- static const char _data_FX_MODE_FREQMATRIX[] PROGMEM = " Freqmatrix@Speed,Sound effect,Low bin,High bin,Sensivity ;;;1f;c1=18,c2=48,c3=6,m12=3,si=0" ; // Corner, Beatsin; notes range C3 to C7
7293+ static const char _data_FX_MODE_FREQMATRIX[] PROGMEM = " Freqmatrix@Speed,Sound effect,Low bin,High bin,Sensitivity ;;;1f;c1=18,c2=48,c3=6,m12=3,si=0" ; // Corner, Beatsin; notes range C3 to C7
72947294
72957295
72967296// ////////////////////
@@ -7374,7 +7374,7 @@ uint16_t mode_freqwave(void) { // Freqwave. By Andreas Pleschun
73747374
73757375 if (FFT_MajorPeak > MAX_FREQUENCY) FFT_MajorPeak = 1 .0f ;
73767376 // MajorPeak holds the freq. value which is most abundant in the last sample.
7377- // With our sampling rate of 10240Hz we have a usable freq range from roughtly 80Hz to 10240/2 Hz
7377+ // With our sampling rate of 10240Hz we have a usable freq range from roughly 80Hz to 10240/2 Hz
73787378 // we will treat everything with less than 65Hz as 0
73797379
73807380 if ((FFT_MajorPeak < 80 ) || (volumeSmth < 1 .0f ) || (FFT_MajorPeak > 10800 )) { // silence or out-of-range --> black
@@ -7437,7 +7437,7 @@ uint16_t mode_gravfreq(void) { // Gravfreq. By Andrew Tuline.
74377437 SEGMENT.fadeToBlackBy (96 );
74387438
74397439 float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255 .0f ;
7440- segmentSampleAvg *= 0.125 ; // divide by 8, to compensate for later "sensitivty " upscaling
7440+ segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivity " upscaling
74417441
74427442 float mySampleAvg = mapf (segmentSampleAvg*2 .0f , 0 ,32 , 0 , (float )SEGLEN/2.0 ); // map to pixels availeable in current segment
74437443 int tempsamp = constrain (mySampleAvg,0 ,SEGLEN/2 ); // Keep the sample from overflowing.
@@ -7466,7 +7466,7 @@ uint16_t mode_gravfreq(void) { // Gravfreq. By Andrew Tuline.
74667466 SEGENV.aux0 = indexNew;
74677467 return FRAMETIME;
74687468} // mode_gravfreq()
7469- static const char _data_FX_MODE_GRAVFREQ[] PROGMEM = " Gravfreq ☾@Rate of fall,Sensivity ;!,!;!;1f;ix=128,m12=0,si=0" ; // Pixels, Beatsin
7469+ static const char _data_FX_MODE_GRAVFREQ[] PROGMEM = " Gravfreq ☾@Rate of fall,Sensitivity ;!,!;!;1f;ix=128,m12=0,si=0" ; // Pixels, Beatsin
74707470
74717471
74727472// ////////////////////
@@ -8152,7 +8152,7 @@ static const char _data_FX_MODE_2DWAVINGCELL[] PROGMEM = "Waving Cell@!,,Amplitu
81528152static const char _data_RESERVED[] PROGMEM = " RSVD" ;
81538153
81548154// add (or replace reserved) effect mode and data into vector
8155- // use id==255 to find unallocatd gaps (with "Reserved" data string)
8155+ // use id==255 to find unallocated gaps (with "Reserved" data string)
81568156// if vector size() is smaller than id (single) data is appended at the end (regardless of id)
81578157void WS2812FX::addEffect (uint8_t id, mode_ptr mode_fn, const char *mode_name) {
81588158 if (id == 255 ) { // find empty slot
0 commit comments