Fixed compiler errors/warnings (declaration of _uidx, scope of index variables i)
Dependents: GPSDevice LogData_UM6-to-SDcard UM6withGPS mbed-cansat-test-GPS ... more
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