Skip to content

Commit 690d5a7

Browse files
Formatting.
1 parent 8243f1e commit 690d5a7

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

examples/esp32-sntp/esp32-sntp.ino

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#include <moonPhase.h>
33

44
const char * wifissid = "networkname";
5-
const char * wifipsk = "password";
5+
const char * wifipsk = "password";
66

7-
moonPhase moonPhase; // include a MoonPhase instance
7+
moonPhase moonPhase;
88

99
struct tm timeinfo = {0};
1010

@@ -32,8 +32,7 @@ void loop() {
3232
getLocalTime( &timeinfo );
3333
Serial.print( asctime( &timeinfo ) );
3434

35-
moonData_t moon; // variable to receive the data
36-
moon = moonPhase.getPhase();
35+
moonData_t moon = moonPhase.getPhase();
3736

3837
Serial.print( "Moon phase angle: " );
3938
Serial.print( moon.angle ); // angle is a integer between 0-360

examples/simple/simple.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ void setup() {
77
Serial.println();
88
Serial.println( "moonPhase simple example." );
99

10-
moonData_t moon; // variable to receive the data
10+
moonData_t moon; // variable to receive the data
1111

12-
moon = moonPhase.getPhase(); // gets the current moon phase (1/1/1970 at 00:00:00 UTC )
13-
// Because moonPhase uses the system time, which is not set in this example
12+
moon = moonPhase.getPhase(); // gets the current moon phase ( 1/1/1970 at 00:00:00 UTC )
1413

1514
Serial.print( "Moon phase angle: " );
16-
Serial.print( moon.angle ); // angle is a integer between 0-360
15+
Serial.print( moon.angle ); // angle is a integer between 0-360
1716
Serial.println( " degrees." );
1817
Serial.print( "Moon surface lit: " );
19-
Serial.print( moon.percentLit * 100 ); // percentLit is a real between 0-1
18+
Serial.print( moon.percentLit * 100 ); // percentLit is a real between 0-1
2019
}
2120

2221
void loop() {

0 commit comments

Comments
 (0)