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.
Fork of MODGPS by
Diff: GPS.cpp
- Revision:
- 5:7f130f85d5a4
- Parent:
- 3:28a1b60b0f37
- Child:
- 6:64771e31464e
diff -r 1e3a53f150aa -r 7f130f85d5a4 GPS.cpp --- a/GPS.cpp Sat Apr 16 09:41:43 2011 +0000 +++ b/GPS.cpp Wed Apr 20 09:15:07 2011 +0000 @@ -141,6 +141,14 @@ } process_required = false; } + + // If we have a valid GPS time then, once per minute, set the RTC. + if (theTime.status == 'A' && theTime.second == 0 && theTime.tenths == 0 && theTime.hundreths == 0) { + // set_time() is defined in rtc_time.h + // http://mbed.org/projects/libraries/svn/mbed/trunk/rtc_time.h + set_time(theTime.to_C_tm()); + } + } void