Skip to content

Commit 468c73f

Browse files
committed
Updated file headers.
1 parent a1e1979 commit 468c73f

File tree

7 files changed

+61
-64
lines changed

7 files changed

+61
-64
lines changed

AudioPatterns.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Torch
2+
* Torch: https://github.com/evilgeniuslabs/torch
33
* Copyright (C) 2015 Jason Coon
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
9-
*
9+
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
14+
*
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
18+
1919
uint16_t analyzerColumns() {
2020
fill_solid(leds, NUM_LEDS, CRGB::Black);
2121

@@ -116,13 +116,13 @@ uint16_t audioNoise() {
116116
colorLoop = 0;
117117

118118
static int lastPeak = 0;
119-
119+
120120
if(peaksLeft[0] >= lastPeak) {
121121
noisespeedy = peaksLeft[0] / 32;
122122
}
123123

124124
noisespeedz = peaksLeft[0] / 128;
125-
125+
126126
lastPeak = peaksLeft[0];
127127

128128
fillnoise8();
@@ -149,4 +149,3 @@ uint16_t audioNoise() {
149149

150150
return 0;
151151
}
152-

Commands.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Torch
2+
* Torch: https://github.com/evilgeniuslabs/torch
33
* Copyright (C) 2015 Jason Coon
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
9-
*
9+
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
14+
*
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
18+
1919
#ifndef IrCodes_H
2020
#define IrCodes_H
2121

@@ -82,7 +82,7 @@ enum class InputCommand {
8282

8383
// IR Raw Key Codes for SparkFun remote
8484
#define IRCODE_SPARKFUN_POWER 0x10EFD827 // 284153895
85-
#define IRCODE_SPARKFUN_A 0x10EFF807 //
85+
#define IRCODE_SPARKFUN_A 0x10EFF807 //
8686
#define IRCODE_SPARKFUN_B 0x10EF7887
8787
#define IRCODE_SPARKFUN_C 0x10EF58A7
8888
#define IRCODE_SPARKFUN_UP 0x10EFA05F // 284139615

Drawing.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Torch
2+
* Torch: https://github.com/evilgeniuslabs/torch
33
* Copyright (C) 2015 Jason Coon
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
9-
*
9+
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
14+
*
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
18+
1919
void drawCircle(int16_t x0, int16_t y0, uint16_t radius, const CRGB& color)
2020
{
2121
int a = radius, b = 0;

Effects.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Torch
2+
* Torch: https://github.com/evilgeniuslabs/torch
33
* Copyright (C) 2015 Jason Coon
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
9-
*
9+
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
14+
*
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
18-
18+
1919
// give it a linear tail to the right
2020
void streamRight(byte scale, int fromX = 0, int toX = MATRIX_WIDTH, int fromY = 0, int toY = MATRIX_HEIGHT)
2121
{

Noise.h

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
2-
* Torch
2+
* Torch: https://github.com/evilgeniuslabs/torch
33
* Copyright (C) 2015 Jason Coon
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
9-
*
9+
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
14+
*
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
@@ -96,7 +96,7 @@ void fillnoise8() {
9696
noisey = random16();
9797
noisez = random16();
9898
}
99-
99+
100100
// If we're runing at a low "speed", some 8-bit artifacts become visible
101101
// from frame-to-frame. In order to reduce this, we can do some fast data-smoothing.
102102
// The amount of data smoothing we're doing depends on "speed".
@@ -106,12 +106,12 @@ void fillnoise8() {
106106
if( lowestNoise < 8) {
107107
dataSmoothing = 200 - (lowestNoise * 4);
108108
}
109-
109+
110110
for(int i = 0; i < MAX_DIMENSION; i++) {
111111
int ioffset = noisescale * i;
112112
for(int j = 0; j < MAX_DIMENSION; j++) {
113113
int joffset = noisescale * j;
114-
114+
115115
uint8_t data = inoise8(noisex + ioffset, noisey + joffset, noisez);
116116

117117
// The range of the inoise8 function is roughly 16-238.
@@ -125,11 +125,11 @@ void fillnoise8() {
125125
uint8_t newdata = scale8( olddata, dataSmoothing) + scale8( data, 256 - dataSmoothing);
126126
data = newdata;
127127
}
128-
128+
129129
noise[i][j] = data;
130130
}
131131
}
132-
132+
133133
noisex += noisespeedx;
134134
noisey += noisespeedy;
135135
noisez += noisespeedz;
@@ -138,7 +138,7 @@ void fillnoise8() {
138138
void mapNoiseToLEDsUsingPalette(CRGBPalette16 palette, uint8_t hueReduce = 0)
139139
{
140140
static uint8_t ihue=0;
141-
141+
142142
for(int i = 0; i < MATRIX_WIDTH; i++) {
143143
for(int j = 0; j < MATRIX_HEIGHT; j++) {
144144
// We use the value at the (i,j) coordinate in the noise
@@ -149,11 +149,11 @@ void mapNoiseToLEDsUsingPalette(CRGBPalette16 palette, uint8_t hueReduce = 0)
149149
uint8_t bri = noise[i][j];
150150

151151
// if this palette is a 'loop', add a slowly-changing base value
152-
if( colorLoop) {
152+
if( colorLoop) {
153153
index += ihue;
154154
}
155155

156-
// brighten up, as the color palette itself often contains the
156+
// brighten up, as the color palette itself often contains the
157157
// light/dark dynamic range desired
158158
if( bri > 127 ) {
159159
bri = 255;
@@ -172,14 +172,14 @@ void mapNoiseToLEDsUsingPalette(CRGBPalette16 palette, uint8_t hueReduce = 0)
172172
leds[n] = color;
173173
}
174174
}
175-
175+
176176
ihue+=1;
177177
}
178178

179179
uint16_t drawNoise(CRGBPalette16 palette,uint8_t hueReduce = 0) {
180180
// generate noise data
181181
fillnoise8();
182-
182+
183183
// convert the noise data to colors in the LED array
184184
// using the current palette
185185
mapNoiseToLEDsUsingPalette(palette, hueReduce);
@@ -192,7 +192,7 @@ uint16_t rainbowNoise() {
192192
noisespeedy = 0;
193193
noisespeedz = 0;
194194
noisescale = 30;
195-
colorLoop = 0;
195+
colorLoop = 0;
196196
return drawNoise(RainbowColors_p);
197197
}
198198

@@ -201,7 +201,7 @@ uint16_t rainbowStripeNoise() {
201201
noisespeedy = 0;
202202
noisespeedz = 0;
203203
noisescale = 20;
204-
colorLoop = 0;
204+
colorLoop = 0;
205205
return drawNoise(RainbowStripeColors_p);
206206
}
207207

@@ -210,7 +210,7 @@ uint16_t partyNoise() {
210210
noisespeedy = 0;
211211
noisespeedz = 0;
212212
noisescale = 30;
213-
colorLoop = 0;
213+
colorLoop = 0;
214214
return drawNoise(PartyColors_p);
215215
}
216216

@@ -219,7 +219,7 @@ uint16_t forestNoise() {
219219
noisespeedy = 0;
220220
noisespeedz = 0;
221221
noisescale = 120;
222-
colorLoop = 0;
222+
colorLoop = 0;
223223
return drawNoise(ForestColors_p);
224224
}
225225

@@ -228,7 +228,7 @@ uint16_t cloudNoise() {
228228
noisespeedy = 0;
229229
noisespeedz = 0;
230230
noisescale = 30;
231-
colorLoop = 0;
231+
colorLoop = 0;
232232
return drawNoise(CloudColors_p);
233233
}
234234

@@ -237,7 +237,7 @@ uint16_t fireNoise() {
237237
noisespeedy = 0;
238238
noisespeedz = 8;
239239
noisescale = 50;
240-
colorLoop = 0;
240+
colorLoop = 0;
241241
return drawNoise(HeatColors_p, 60);
242242
}
243243

@@ -246,7 +246,7 @@ uint16_t lavaNoise() {
246246
noisespeedy = 0;
247247
noisespeedz = 16;
248248
noisescale = 50;
249-
colorLoop = 0;
249+
colorLoop = 0;
250250
return drawNoise(LavaColors_p);
251251
}
252252

@@ -255,7 +255,7 @@ uint16_t oceanNoise() {
255255
noisespeedy = 0;
256256
noisespeedz = 0;
257257
noisescale = 90;
258-
colorLoop = 0;
258+
colorLoop = 0;
259259
return drawNoise(OceanColors_p);
260260
}
261261

@@ -265,7 +265,7 @@ uint16_t blackAndWhiteNoise() {
265265
noisespeedy = 0;
266266
noisespeedz = 0;
267267
noisescale = 30;
268-
colorLoop = 0;
268+
colorLoop = 0;
269269
return drawNoise(blackAndWhiteStripedPalette);
270270
}
271271

@@ -275,7 +275,6 @@ uint16_t blackAndBlueNoise() {
275275
noisespeedy = 0;
276276
noisespeedz = 0;
277277
noisescale = 30;
278-
colorLoop = 0;
278+
colorLoop = 0;
279279
return drawNoise(blackAndBlueStripedPalette);
280280
}
281-

Pulse.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
/*
2-
* Torch
2+
* Torch: https://github.com/evilgeniuslabs/torch
33
* Copyright (C) 2015 Jason Coon
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
88
* (at your option) any later version.
9-
*
9+
*
1010
* This program is distributed in the hope that it will be useful,
1111
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
* GNU General Public License for more details.
14-
*
14+
*
1515
* You should have received a copy of the GNU General Public License
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

1919
uint16_t pulse() {
2020
// palette = RainbowColors_p;
21-
21+
2222
static uint8_t hue = 0;
2323
static uint8_t centerX = 0;
2424
static uint8_t centerY = 0;
2525
static uint8_t step = 0;
26-
26+
2727
static const uint8_t maxSteps = 16;
2828
static const float fadeRate = 0.8;
2929

@@ -33,15 +33,15 @@ uint16_t pulse() {
3333
centerX = random(32);
3434
centerY = random(32);
3535
hue = random(256); // 170;
36-
36+
3737
drawCircle(centerX, centerY, step, ColorFromPalette(palette, hue));
3838
step++;
3939
}
4040
else {
4141
if (step < maxSteps) {
4242
// initial pulse
4343
drawCircle(centerX, centerY, step, ColorFromPalette(palette, hue, pow(fadeRate, step - 2) * 255));
44-
44+
4545
// secondary pulse
4646
if (step > 3) {
4747
drawCircle(centerX, centerY, step - 3, ColorFromPalette(palette, hue, pow(fadeRate, step - 2) * 255));
@@ -52,7 +52,6 @@ uint16_t pulse() {
5252
step = 0;
5353
}
5454
}
55-
55+
5656
return 30;
5757
}
58-

0 commit comments

Comments
 (0)