1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-30 19:52:13 +01:00

Indent all multi-line C style comments in built-in examples by at least two spaces

This is required for Auto Format compatibility because it has the undesirable effect of indenting only unindented contents of multi-lline comments, thus altering the relative indentation of the text.

The exception is the Max/MSP patches as I did not know whether indentation would break them.
This commit is contained in:
per1234 2017-07-14 15:30:34 -07:00 committed by Cristian Maglie
parent 499c424d59
commit 8f48433f33
73 changed files with 1240 additions and 1240 deletions

View File

@ -19,7 +19,7 @@
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/ButtonStateChange

View File

@ -12,7 +12,7 @@
modified 9 Apr 2012
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Tone3

View File

@ -10,7 +10,7 @@
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Tone

View File

@ -10,7 +10,7 @@
by Tom Igoe
based on a snippet from Greg Borenstein
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Tone4

View File

@ -12,7 +12,7 @@
modified 31 May 2012
by Tom Igoe, with suggestion from Michael Flynn
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Tone2

View File

@ -44,22 +44,22 @@ void loop() {
// Graphing sketch
// This program takes ASCII-encoded strings
// from the serial port at 9600 baud and graphs them. It expects values in the
// range 0 to 1023, followed by a newline, or newline and carriage return
// This program takes ASCII-encoded strings
// from the serial port at 9600 baud and graphs them. It expects values in the
// range 0 to 1023, followed by a newline, or newline and carriage return
// Created 20 Apr 2005
// Updated 24 Nov 2015
// by Tom Igoe
// This example code is in the public domain.
// Created 20 Apr 2005
// Updated 24 Nov 2015
// by Tom Igoe
// This example code is in the public domain.
import processing.serial.*;
import processing.serial.*;
Serial myPort; // The serial port
int xPos = 1; // horizontal position of the graph
float inByte = 0;
Serial myPort; // The serial port
int xPos = 1; // horizontal position of the graph
float inByte = 0;
void setup () {
void setup () {
// set the window size:
size(400, 300);
@ -77,8 +77,8 @@ void setup () {
// set initial background:
background(0);
}
void draw () {
}
void draw () {
// draw the line:
stroke(127, 34, 255);
line(xPos, height, xPos, height - inByte);
@ -91,10 +91,10 @@ void draw () {
// increment the horizontal position:
xPos++;
}
}
}
void serialEvent (Serial myPort) {
void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');
@ -106,7 +106,7 @@ void serialEvent (Serial myPort) {
println(inByte);
inByte = map(inByte, 0, 1023, 0, height);
}
}
}
*/

View File

@ -68,21 +68,21 @@ void establishContact() {
}
/*
Processing sketch to run with this example:
Processing sketch to run with this example:
// This example code is in the public domain.
// This example code is in the public domain.
import processing.serial.*;
import processing.serial.*;
int bgcolor; // Background color
int fgcolor; // Fill color
Serial myPort; // The serial port
int[] serialInArray = new int[3]; // Where we'll put what we receive
int serialCount = 0; // A count of how many bytes we receive
int xpos, ypos; // Starting position of the ball
boolean firstContact = false; // Whether we've heard from the microcontroller
int bgcolor; // Background color
int fgcolor; // Fill color
Serial myPort; // The serial port
int[] serialInArray = new int[3]; // Where we'll put what we receive
int serialCount = 0; // A count of how many bytes we receive
int xpos, ypos; // Starting position of the ball
boolean firstContact = false; // Whether we've heard from the microcontroller
void setup() {
void setup() {
size(256, 256); // Stage size
noStroke(); // No border on the next thing drawn
@ -100,16 +100,16 @@ void setup() {
// Open whatever port is the one you're using.
String portName = Serial.list()[0];
myPort = new Serial(this, portName, 9600);
}
}
void draw() {
void draw() {
background(bgcolor);
fill(fgcolor);
// Draw the shape
ellipse(xpos, ypos, 20, 20);
}
}
void serialEvent(Serial myPort) {
void serialEvent(Serial myPort) {
// read a byte from the serial port:
int inByte = myPort.read();
// if this is the first byte received, and it's an A,
@ -143,7 +143,7 @@ void serialEvent(Serial myPort) {
serialCount = 0;
}
}
}
}
*/
/*

View File

@ -74,18 +74,18 @@ void establishContact() {
/*
Processing code to run with this example:
Processing code to run with this example:
// This example code is in the public domain.
// This example code is in the public domain.
import processing.serial.*; // import the Processing serial library
Serial myPort; // The serial port
import processing.serial.*; // import the Processing serial library
Serial myPort; // The serial port
float bgcolor; // Background color
float fgcolor; // Fill color
float xpos, ypos; // Starting position of the ball
float bgcolor; // Background color
float fgcolor; // Fill color
float xpos, ypos; // Starting position of the ball
void setup() {
void setup() {
size(640,480);
// List all the available serial ports
@ -103,20 +103,20 @@ void setup() {
// draw with smooth edges:
smooth();
}
}
void draw() {
void draw() {
background(bgcolor);
fill(fgcolor);
// Draw the shape
ellipse(xpos, ypos, 20, 20);
}
}
// serialEvent method is run automatically by the Processing applet
// whenever the buffer reaches the byte value set in the bufferUntil()
// method in the setup():
// serialEvent method is run automatically by the Processing applet
// whenever the buffer reaches the byte value set in the bufferUntil()
// method in the setup():
void serialEvent(Serial myPort) {
void serialEvent(Serial myPort) {
// read the serial buffer:
String myString = myPort.readStringUntil('\n');
// if you got any bytes other than the linefeed:

View File

@ -34,17 +34,17 @@ void loop() {
/* Processing code for this example
// This example code is in the public domain.
// This example code is in the public domain.
import processing.serial.*;
import processing.serial.*;
float redValue = 0; // red value
float greenValue = 0; // green value
float blueValue = 0; // blue value
float redValue = 0; // red value
float greenValue = 0; // green value
float blueValue = 0; // blue value
Serial myPort;
Serial myPort;
void setup() {
void setup() {
size(200, 200);
// List all the available serial ports
@ -57,14 +57,14 @@ void setup() {
myPort = new Serial(this, Serial.list()[0], 9600);
// don't generate a serialEvent() unless you get a newline character:
myPort.bufferUntil('\n');
}
}
void draw() {
void draw() {
// set the background color with the color values:
background(redValue, greenValue, blueValue);
}
}
void serialEvent(Serial myPort) {
void serialEvent(Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');
@ -84,7 +84,7 @@ void serialEvent(Serial myPort) {
blueValue = map(colors[2], 0, 1023, 0, 255);
}
}
}
}
*/

View File

@ -16,7 +16,7 @@
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Array
*/

View File

@ -12,7 +12,7 @@
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/ForLoop
*/

View File

@ -19,9 +19,9 @@
modified 9 Apr 2012
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/IfStatement
http://www.arduino.cc/en/Tutorial/IfStatement
*/

View File

@ -15,7 +15,7 @@
created 1 Jul 2009
by Tom Igoe
This example code is in the public domain.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/SwitchCase2
*/

View File

@ -34,23 +34,23 @@ void loop() {
}
/* Processing code for this example
// Tweak the Arduino Logo
// by Scott Fitzgerald
// This example code is in the public domain
// Tweak the Arduino Logo
// by Scott Fitzgerald
// This example code is in the public domain
// import the serial library
import processing.serial.*;
// import the serial library
import processing.serial.*;
// create an instance of the serial library
Serial myPort;
// create an instance of the serial library
Serial myPort;
// create an instance of PImage
PImage logo;
// create an instance of PImage
PImage logo;
// a variable to hold the background color
int bgcolor = 0;
// a variable to hold the background color
int bgcolor = 0;
void setup() {
void setup() {
size(1, 1);
surface.setResizable(true);
// set the color mode to Hue/Saturation/Brightness
@ -78,9 +78,9 @@ void setup() {
// If you know the name of the port used by the Arduino board, you
// can specify it directly like this.
// port = new Serial(this, "COM1", 9600);
}
}
void draw() {
void draw() {
// if there is information in the serial port
if ( myPort.available() > 0) {
@ -98,5 +98,5 @@ void draw() {
// draw the Arduino logo
image(logo, 0, 0);
}
}
*/