Allows for a GPS module to be connected to a serial port and exposes an easy to use API to get the GPS data. New feature, added Mbed/LPC17xx RTC synchronisation

Dependents:   SatGPS AntiTheftGPS FLIGHT_CONTROL_AND_COMMUNICATIONS_SYSTEM GPS-Lora ... more

Revision:
5:7f130f85d5a4
Parent:
3:28a1b60b0f37
Child:
6:64771e31464e
--- 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