@@ -51,7 +51,7 @@ uint16_t triwave16(uint16_t in) {
51
51
* Generates a tristate square wave w/ attac & decay
52
52
* @param x input value 0-255
53
53
* @param pulsewidth 0-127
54
- * @param attdec attac & decay, max. pulsewidth / 2
54
+ * @param attdec attack & decay, max. pulsewidth / 2
55
55
* @returns signed waveform value
56
56
*/
57
57
int8_t tristate_square8 (uint8_t x, uint8_t pulsewidth, uint8_t attdec) {
@@ -1239,7 +1239,7 @@ uint16_t mode_fireworks() {
1239
1239
if (SEGMENT.is2D ()) SEGMENT.setPixelColorXY (x, y, col);
1240
1240
else SEGMENT.setPixelColor (index , col);
1241
1241
SEGENV.aux1 = SEGENV.aux0 ; // old spark
1242
- SEGENV.aux0 = index ; // remember where spark occured
1242
+ SEGENV.aux0 = index ; // remember where spark occurred
1243
1243
}
1244
1244
}
1245
1245
return FRAMETIME;
@@ -1272,8 +1272,8 @@ uint16_t mode_rain() {
1272
1272
SEGENV.aux0 ++; // increase spark index
1273
1273
SEGENV.aux1 ++;
1274
1274
}
1275
- if (SEGENV.aux0 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark positiom
1276
- if (SEGENV.aux1 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark positiom
1275
+ if (SEGENV.aux0 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark position
1276
+ if (SEGENV.aux1 == 0 ) SEGENV.aux0 = UINT16_MAX; // reset previous spark position
1277
1277
if (SEGENV.aux0 >= width*height) SEGENV.aux0 = 0 ; // ignore
1278
1278
if (SEGENV.aux1 >= width*height) SEGENV.aux1 = 0 ;
1279
1279
}
@@ -3601,7 +3601,7 @@ uint16_t mode_tetrix(void) {
3601
3601
}
3602
3602
3603
3603
if (drop->step == 0 ) { // init brick
3604
- // speed calcualtion : a single brick should reach bottom of strip in X seconds
3604
+ // speed calculation : a single brick should reach bottom of strip in X seconds
3605
3605
// if the speed is set to 1 this should take 5s and at 255 it should take 0.25s
3606
3606
// as this is dependant on SEGLEN it should be taken into account and the fact that effect runs every FRAMETIME s
3607
3607
int speed = SEGMENT.speed ? SEGMENT.speed : random8 (1 ,255 );
@@ -3684,7 +3684,7 @@ static const char _data_FX_MODE_PLASMA[] PROGMEM = "Plasma@Phase,!;!;!";
3684
3684
3685
3685
/*
3686
3686
* Percentage display
3687
- * Intesity values from 0-100 turn on the leds.
3687
+ * Intensity values from 0-100 turn on the leds.
3688
3688
*/
3689
3689
uint16_t mode_percent (void ) {
3690
3690
@@ -3737,7 +3737,7 @@ static const char _data_FX_MODE_PERCENT[] PROGMEM = "Percent@,% of fill,,,,One c
3737
3737
3738
3738
/*
3739
3739
* Modulates the brightness similar to a heartbeat
3740
- * (unimplemented?) tries to draw an ECG aproximation on a 2D matrix
3740
+ * (unimplemented?) tries to draw an ECG approximation on a 2D matrix
3741
3741
*/
3742
3742
uint16_t mode_heartbeat (void ) {
3743
3743
uint8_t bpm = 40 + (SEGMENT.speed >> 3 );
@@ -4415,7 +4415,7 @@ uint16_t mode_tv_simulator(void) {
4415
4415
// how much time is elapsed ?
4416
4416
tvSimulator->elapsed = millis () - tvSimulator->startTime ;
4417
4417
4418
- // fade from prev volor to next color
4418
+ // fade from prev color to next color
4419
4419
if (tvSimulator->elapsed < tvSimulator->fadeTime ) {
4420
4420
r = map (tvSimulator->elapsed , 0 , tvSimulator->fadeTime , tvSimulator->pr , nr);
4421
4421
g = map (tvSimulator->elapsed , 0 , tvSimulator->fadeTime , tvSimulator->pg , ng);
@@ -6283,7 +6283,7 @@ uint16_t mode_gravcenter(void) { // Gravcenter. By Andrew Tuline.
6283
6283
SEGMENT.fade_out (251 ); // 30%
6284
6284
6285
6285
float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255 .0f ;
6286
- segmentSampleAvg *= 0.125 ; // divide by 8, to compensate for later "sensitivty " upscaling
6286
+ segmentSampleAvg *= 0.125 ; // divide by 8, to compensate for later "sensitivity " upscaling
6287
6287
6288
6288
float mySampleAvg = mapf (segmentSampleAvg*2.0 , 0 , 32 , 0 , (float )SEGLEN/2 .0f ); // map to pixels available in current segment
6289
6289
uint16_t tempsamp = constrain (mySampleAvg, 0 , SEGLEN/2 ); // Keep the sample from overflowing.
@@ -6335,7 +6335,7 @@ uint16_t mode_gravcentric(void) { // Gravcentric. By Andrew
6335
6335
SEGMENT.fade_out (253 ); // 50%
6336
6336
6337
6337
float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255 .0f ;
6338
- segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivty " upscaling
6338
+ segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivity " upscaling
6339
6339
6340
6340
float mySampleAvg = mapf (segmentSampleAvg*2.0 , 0 .0f , 32 .0f , 0 .0f , (float )SEGLEN/2 .0f ); // map to pixels availeable in current segment
6341
6341
int tempsamp = constrain (mySampleAvg, 0 , SEGLEN/2 ); // Keep the sample from overflowing.
@@ -6384,7 +6384,7 @@ uint16_t mode_gravimeter(void) { // Gravmeter. By Andrew Tuline.
6384
6384
SEGMENT.fade_out (249 ); // 25%
6385
6385
6386
6386
float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255.0 ;
6387
- segmentSampleAvg *= 0.25 ; // divide by 4, to compensate for later "sensitivty " upscaling
6387
+ segmentSampleAvg *= 0.25 ; // divide by 4, to compensate for later "sensitivity " upscaling
6388
6388
6389
6389
float mySampleAvg = mapf (segmentSampleAvg*2.0 , 0 , 64 , 0 , (SEGLEN-1 )); // map to pixels availeable in current segment
6390
6390
int tempsamp = constrain (mySampleAvg,0 ,SEGLEN-1 ); // Keep the sample from overflowing.
@@ -6484,7 +6484,7 @@ uint16_t mode_midnoise(void) { // Midnoise. By Andrew Tuline.
6484
6484
SEGMENT.fade_out (SEGMENT.speed );
6485
6485
6486
6486
float tmpSound2 = volumeSmth * (float )SEGMENT.intensity / 256.0 ; // Too sensitive.
6487
- tmpSound2 *= (float )SEGMENT.intensity / 128.0 ; // Reduce sensitity /length.
6487
+ tmpSound2 *= (float )SEGMENT.intensity / 128.0 ; // Reduce sensitivity /length.
6488
6488
6489
6489
int maxLen = mapf (tmpSound2, 0 , 127 , 0 , SEGLEN/2 );
6490
6490
if (maxLen >SEGLEN/2 ) maxLen = SEGLEN/2 ;
@@ -6895,7 +6895,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch
6895
6895
6896
6896
if (FFT_MajorPeak > MAX_FREQUENCY) FFT_MajorPeak = 1 ;
6897
6897
// MajorPeak holds the freq. value which is most abundant in the last sample.
6898
- // With our sampling rate of 10240Hz we have a usable freq range from roughtly 80Hz to 10240/2 Hz
6898
+ // With our sampling rate of 10240Hz we have a usable freq range from roughly 80Hz to 10240/2 Hz
6899
6899
// we will treat everything with less than 65Hz as 0
6900
6900
6901
6901
if (FFT_MajorPeak < 80 ) {
@@ -6916,7 +6916,7 @@ uint16_t mode_freqmatrix(void) { // Freqmatrix. By Andreas Plesch
6916
6916
6917
6917
return FRAMETIME;
6918
6918
} // mode_freqmatrix()
6919
- static const char _data_FX_MODE_FREQMATRIX[] PROGMEM = " Freqmatrix@Speed,Sound effect,Low bin,High bin,Sensivity ;;;1f;m12=3,si=0" ; // Corner, Beatsin
6919
+ static const char _data_FX_MODE_FREQMATRIX[] PROGMEM = " Freqmatrix@Speed,Sound effect,Low bin,High bin,Sensitivity ;;;1f;m12=3,si=0" ; // Corner, Beatsin
6920
6920
6921
6921
6922
6922
// ////////////////////
@@ -7000,7 +7000,7 @@ uint16_t mode_freqwave(void) { // Freqwave. By Andreas Pleschun
7000
7000
7001
7001
if (FFT_MajorPeak > MAX_FREQUENCY) FFT_MajorPeak = 1 .0f ;
7002
7002
// MajorPeak holds the freq. value which is most abundant in the last sample.
7003
- // With our sampling rate of 10240Hz we have a usable freq range from roughtly 80Hz to 10240/2 Hz
7003
+ // With our sampling rate of 10240Hz we have a usable freq range from roughly 80Hz to 10240/2 Hz
7004
7004
// we will treat everything with less than 65Hz as 0
7005
7005
7006
7006
if (FFT_MajorPeak < 80 ) {
@@ -7047,7 +7047,7 @@ uint16_t mode_gravfreq(void) { // Gravfreq. By Andrew Tuline.
7047
7047
SEGMENT.fade_out (250 );
7048
7048
7049
7049
float segmentSampleAvg = volumeSmth * (float )SEGMENT.intensity / 255 .0f ;
7050
- segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivty " upscaling
7050
+ segmentSampleAvg *= 0 .125f ; // divide by 8, to compensate for later "sensitivity " upscaling
7051
7051
7052
7052
float mySampleAvg = mapf (segmentSampleAvg*2 .0f , 0 ,32 , 0 , (float )SEGLEN/2 .0f ); // map to pixels availeable in current segment
7053
7053
int tempsamp = constrain (mySampleAvg,0 ,SEGLEN/2 ); // Keep the sample from overflowing.
@@ -7075,7 +7075,7 @@ uint16_t mode_gravfreq(void) { // Gravfreq. By Andrew Tuline.
7075
7075
7076
7076
return FRAMETIME;
7077
7077
} // mode_gravfreq()
7078
- static const char _data_FX_MODE_GRAVFREQ[] PROGMEM = " Gravfreq@Rate of fall,Sensivity ;!,!;!;1f;ix=128,m12=0,si=0" ; // Pixels, Beatsin
7078
+ static const char _data_FX_MODE_GRAVFREQ[] PROGMEM = " Gravfreq@Rate of fall,Sensitivity ;!,!;!;1f;ix=128,m12=0,si=0" ; // Pixels, Beatsin
7079
7079
7080
7080
7081
7081
// ////////////////////
@@ -7667,7 +7667,7 @@ static const char _data_FX_MODE_2DWAVINGCELL[] PROGMEM = "Waving Cell@!,,Amplitu
7667
7667
static const char _data_RESERVED[] PROGMEM = " RSVD" ;
7668
7668
7669
7669
// add (or replace reserved) effect mode and data into vector
7670
- // use id==255 to find unallocatd gaps (with "Reserved" data string)
7670
+ // use id==255 to find unallocated gaps (with "Reserved" data string)
7671
7671
// if vector size() is smaller than id (single) data is appended at the end (regardless of id)
7672
7672
void WS2812FX::addEffect (uint8_t id, mode_ptr mode_fn, const char *mode_name) {
7673
7673
if (id == 255 ) { // find empty slot
0 commit comments