Skip to content

Commit 3771829

Browse files
authored
Update SetAndCalibrate.ino
Corrected comment indentation
1 parent 88b24d5 commit 3771829

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

examples/SetAndCalibrate/SetAndCalibrate.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ void setup() { // Arduino standard setup method
7373
if (!deviceStatus) { // If it didn't start
7474
Serial.println(F("Oscillator did not start, trying again.")); // Show error and
7575
delay(1000); // wait for a second
76-
} // of if-then oscillator didn't start
77-
} // of while the oscillator is off
76+
} // of if-then oscillator didn't start
77+
} // of while the oscillator is off
7878
MCP7940.adjust(); // Set to library compile Date/Time
7979
Serial.println(F("Enter the following serial commands:"));
8080
Serial.println(F("SETDATE yyyy-mm-dd hh:mm:ss"));
@@ -87,15 +87,15 @@ void setup() { // Arduino standard setup method
8787
** and acted upon **
8888
***************************************************************************************************/
8989
void readCommand() {
90-
static uint8_t inputBytes = 0; // Variable for buffer position
91-
while (Serial.available()) { // Loop while incoming serial data
90+
static uint8_t inputBytes = 0; // Variable for buffer position
91+
while (Serial.available()) { // Loop while incoming serial data
9292
inputBuffer[inputBytes] = Serial.read(); // Get the next byte of data
9393
if (inputBuffer[inputBytes] != '\n' &&
94-
inputBytes < SPRINTF_BUFFER_SIZE) // keep on reading until a newline
95-
inputBytes++; // shows up or the buffer is full
94+
inputBytes < SPRINTF_BUFFER_SIZE) // keep on reading until a newline
95+
inputBytes++; // shows up or the buffer is full
9696
else {
9797
inputBuffer[inputBytes] = 0; // Add the termination character
98-
for (uint8_t i = 0; i < inputBytes; i++) // Convert the whole input buffer
98+
for (uint8_t i = 0; i < inputBytes; i++) // Convert the whole input buffer
9999
inputBuffer[i] = toupper(inputBuffer[i]); // to uppercase characters
100100
Serial.print(F("\nCommand \""));
101101
Serial.write(inputBuffer);
@@ -132,7 +132,7 @@ void readCommand() {
132132
MCP7940.adjust(
133133
DateTime(year, month, day, hour, minute, second)); // Adjust the RTC date/time
134134
Serial.print(F("Date has been set."));
135-
} // of if-then-else the date could be parsed
135+
} // of if-then-else the date could be parsed
136136
break; //
137137
/*******************************************************************************************
138138
** Calibrate the RTC and reset the time **

0 commit comments

Comments
 (0)