Skip to content

Commit c12e1d4

Browse files
author
Federico Fissore
committed
Examples: mass code format. See example_formatter.conf
1 parent 99536ea commit c12e1d4

File tree

6 files changed

+9
-16
lines changed

6 files changed

+9
-16
lines changed

examples/Arduino/TFTEtchASketch/TFTEtchASketch.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ void setup() {
4545
TFTscreen.background(0, 0, 0);
4646
}
4747

48-
void loop()
49-
{
48+
void loop() {
5049
// read the potentiometers on A0 and A1
5150
int xValue = analogRead(A0);
5251
int yValue = analogRead(A1);

examples/Arduino/TFTGraph/TFTGraph.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ void loop() {
6060
if (xPos >= 160) {
6161
xPos = 0;
6262
TFTscreen.background(250, 16, 200);
63-
}
64-
else {
63+
} else {
6564
// increment the horizontal position:
6665
xPos++;
6766
}

examples/Esplora/EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void setup() {
7373
logo = EsploraTFT.loadImage("arduino.bmp");
7474
if (logo.isValid()) {
7575
Esplora.writeGreen(255);
76-
}
77-
else
76+
} else {
7877
Esplora.writeRed(255);
78+
}
7979

8080
}
8181

examples/Esplora/EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ void setup() {
3131
EsploraTFT.background(0, 0, 0);
3232
}
3333

34-
void loop()
35-
{
34+
void loop() {
3635

3736
int xAxis = Esplora.readJoystickX(); // read the X axis
3837
int yAxis = Esplora.readJoystickY(); // read the Y axis
@@ -41,14 +40,12 @@ void loop()
4140
// depending on the position of the joystick
4241
if (xAxis < 10 && xAxis > -10) {
4342
xPos = xPos;
44-
}
45-
else {
43+
} else {
4644
xPos = xPos + (map(xAxis, -512, 512, 2, -2));
4745
}
4846
if (yAxis < 10 && yAxis > -10) {
4947
yAxis = yAxis;
50-
}
51-
else {
48+
} else {
5249
yPos = yPos + (map(yAxis, -512, 512, -2, 2));
5350
}
5451

examples/Esplora/EsploraTFTGraph/EsploraTFTGraph.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ void loop() {
4646
if (xPos >= 160) {
4747
xPos = 0;
4848
EsploraTFT.background(250, 16, 200);
49-
}
50-
else {
49+
} else {
5150
// increment the horizontal position:
5251
xPos++;
5352
}

examples/Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ void setup() {
3333
EsploraTFT.background(0, 0, 0);
3434
}
3535

36-
void loop()
37-
{
36+
void loop() {
3837
// read the x-axis of te accelerometer
3938
int tilt = Esplora.readAccelerometer(X_AXIS);
4039

0 commit comments

Comments
 (0)