[Phonehome-commits] r60 - trunk/client/src

pamadio at garage.maemo.org pamadio at garage.maemo.org
Sat Oct 18 20:41:06 EEST 2008


Author: pamadio
Date: 2008-10-18 20:41:06 +0300 (Sat, 18 Oct 2008)
New Revision: 60

Modified:
   trunk/client/src/dsk_mgr.c
Log:
should not store more than one fix per minutes

Modified: trunk/client/src/dsk_mgr.c
===================================================================
--- trunk/client/src/dsk_mgr.c	2008-10-18 15:35:37 UTC (rev 59)
+++ trunk/client/src/dsk_mgr.c	2008-10-18 17:41:06 UTC (rev 60)
@@ -607,6 +607,13 @@
 location_changed (LocationGPSDevice *device, gpointer gps_data)
 {
   //GSList * gps_locations = (GSList *) gps_data;
+  static time_t last_gps_fix=NULL;
+  
+  if(last_gps_fix!=NULL && difftime(time(NULL),last_gps_fix)<60){
+    g_print("Last gpx fix too recent, not including this fix\n");
+    return;
+  }
+  
   gps_info *cur_info;
 
   g_print ("Latitude: %.2f\nLongitude: %.2f\nAltitude: %.2f\n",



More information about the Phonehome-commits mailing list