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.
Dependencies: mbed mbed-rtos 4DGL-uLCD-SE RPCInterface
Diff: main.cpp
- Revision:
- 16:f4749ef7baa7
- Parent:
- 15:5120c88a7a87
- Child:
- 17:8d33d5305d26
diff -r 5120c88a7a87 -r f4749ef7baa7 main.cpp
--- a/main.cpp Wed Dec 04 19:09:11 2019 +0000
+++ b/main.cpp Fri Dec 06 18:40:27 2019 +0000
@@ -149,10 +149,7 @@
t = localtime(&unix_time);
setup_analog_clock(WHITE);
- int hour = (t->tm_hour + utc_offset);
- if (hour < 0){ hour += 24;}
- else if (hour >= 24) {hour -= 24;}
- show_time_analog(t->tm_sec,t->tm_min,hour,t->tm_mday,t->tm_mon+1,t->tm_year+1900,RED+BLUE,WHITE,BLUE,BLACK);
+ show_time_analog(t->tm_sec,t->tm_min,t->tm_hour,t->tm_mday,t->tm_mon+1,t->tm_year+1900,RED+BLUE,WHITE,BLUE,BLACK);
}
prev_display_time = display_time;
@@ -209,7 +206,7 @@
unix_time = atoll(unix_time_str);
utc_offset = offset;
- set_time(unix_time); // Set RTC time to Wed, 28 Oct 2009 11:35:37
+ set_time(unix_time + utc_offset*(3600.0));
}