Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 2:31f5b5d56af6
- Parent:
- 0:89274444b840
diff -r cad87f63a115 -r 31f5b5d56af6 main.cpp
--- a/main.cpp Fri Mar 08 21:23:33 2013 +0000
+++ b/main.cpp Tue Mar 19 11:25:13 2013 +0000
@@ -97,7 +97,7 @@
char weekDayName[7][4] = {"Sun","Mon","Tue","Wed","Thu", "Fri","Sat"};
char monthName[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
char statusText[5][17] = {"Waiting Sync ","Reading dcf data","Checking Parity ","Last Minute Okay","Signal error "};
-char leapText[2][10] = {" ", "L"};
+char leapText[2][10] = {" ", "Leap"};
char MAX_DAY[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; // Max days in a month for a non-leap year
// Return the maximum day in month for a given month & year
@@ -213,7 +213,7 @@
if (sync==1) {dcf_sec++;}
}
}
- if (sync==0) {
+ if (sync==0 ) {
if (dcfSignalIn) {interrupt_counter =0 ;sync=1;}
}
} // End of ISR
@@ -262,9 +262,9 @@
lcd.locate(0,1);
lcd.printf("%s %02d %s'20%02d", weekDayName[dayofweek], dayofmonth, monthName[month-1], year);
lcd.locate(0,2);
- if (summertime) {lcd.foreground (RED);lcd.printf("Summer Time");}
- else {lcd.foreground (BLUE);lcd.printf("Winter Time");}
- if (dcf_status.is_leap){lcd.foreground (RED);lcd.printf(" %d"),leapText[dcf_status.is_leap];}
+ if (summertime) {lcd.foreground (RED);lcd.printf("Summer Time ");}
+ else {lcd.foreground (BLUE);lcd.printf("Winter Time ");}
+ lcd.foreground (RED);lcd.printf("%s",leapText[dcf_status.is_leap]);
if (status==0) {lcd.foreground (WHITE);}
if (status==1) {lcd.foreground (CYAN);}
if (status==2) {lcd.foreground (BLUE);}