Removed a lot of the debug output to the console
authorDr. Johann Pfefferl <pfefferl@nghape.jpnet>
Tue, 11 May 2010 14:42:43 +0000 (16:42 +0200)
committerDr. Johann Pfefferl <pfefferl@nghape.jpnet>
Tue, 11 May 2010 14:42:43 +0000 (16:42 +0200)
gps-tracker.c

index 09fc483..881164d 100644 (file)
@@ -95,7 +95,7 @@ static void cb_file_save (GtkWidget * w, AppData * data)
     if (filename) {
       if(g_file_test(data->intermediate_gpx_data_filename, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_EXISTS)) {
         g_rename(data->intermediate_gpx_data_filename, filename);
-        g_print ("File saved as %s\n", filename);
+        //g_print ("File saved as %s\n", filename);
         hildon_banner_show_information(GTK_WIDGET(data->window), NULL, filename);
       }
       else {
@@ -119,9 +119,7 @@ on_gps_device_changed (LocationGPSDevice *device, gpointer data)
   msg = g_string_sized_new (512);
   if (device->fix && device->status) {
     if (device->fix->fields & LOCATION_GPS_DEVICE_LATLONG_SET) {
-      g_print ("lat = %f, long = %f\n",
-          device->fix->latitude,
-          device->fix->longitude);
+      //g_print ("lat = %f, long = %f\n", device->fix->latitude, device->fix->longitude);
       g_string_append_printf (msg, "lat = %f, long = %f\n",
           device->fix->latitude,
           device->fix->longitude);
@@ -131,7 +129,7 @@ on_gps_device_changed (LocationGPSDevice *device, gpointer data)
           g_ascii_formatd(sbuf2, sizeof(sbuf2), "%f", device->fix->longitude));
 
       if (device->fix->fields & LOCATION_GPS_DEVICE_TIME_SET) {
-        g_print ("time = %f\n", device->fix->time);
+        //g_print ("time = %f\n", device->fix->time);
         g_string_append_printf(msg, "time = %F\n", device->fix->time);
         if(fp) {
           gchar st[64];
@@ -145,7 +143,7 @@ on_gps_device_changed (LocationGPSDevice *device, gpointer data)
       }
 
       if (device->fix->fields & LOCATION_GPS_DEVICE_ALTITUDE_SET) {
-        g_print ("alt = %f\n", device->fix->altitude);
+        //g_print ("alt = %f\n", device->fix->altitude);
         g_string_append_printf (msg, "alt = %f\n", device->fix->altitude);
         if(fp)
           g_fprintf(fp, "<ele>%s</ele>\n", g_ascii_formatd(sbuf1, sizeof(sbuf1), "%f", device->fix->altitude));
@@ -153,54 +151,54 @@ on_gps_device_changed (LocationGPSDevice *device, gpointer data)
       }
 
       if (device->fix->fields & LOCATION_GPS_DEVICE_SPEED_SET) {
-        g_print ("speed = %f\n", device->fix->speed);
+        //g_print ("speed = %f\n", device->fix->speed);
         g_string_append_printf (msg, "speed = %f, ", device->fix->speed);
         if(fp)
           g_fprintf(fp, "<speed>%s</speed>\n", g_ascii_formatd(sbuf1, sizeof(sbuf1), "%f", device->fix->speed));
       }
 
       if (device->fix->fields & LOCATION_GPS_DEVICE_TRACK_SET) {
-        g_print ("track = %f\n", device->fix->track);
+        //g_print ("track = %f\n", device->fix->track);
         g_string_append_printf (msg, "track = %f, ", device->fix->track);
         if(fp)
           g_fprintf(fp, "<course>%s</course>\n", g_ascii_formatd(sbuf1, sizeof(sbuf1), "%f", device->fix->track));
       }
 
       if (device->fix->fields & LOCATION_GPS_DEVICE_CLIMB_SET) {
-        g_print ("climb = %f\n", device->fix->climb);
+        //g_print ("climb = %f\n", device->fix->climb);
         g_string_append_printf (msg, "climb = %f\n", device->fix->climb);
       }
 
-      g_print ("Accuracy values:\n");
-      g_print ("\tept = %e, eph = %e, epv = %e, epd = %e, "
-          "eps = %e, epc = %e\n",
-          device->fix->ept,
-          device->fix->eph,
-          device->fix->epv,
-          device->fix->epd,
-          device->fix->eps,
-          device->fix->epc);
+      //g_print ("Accuracy values:\n");
+      //g_print ("\tept = %e, eph = %e, epv = %e, epd = %e, "
+      //    "eps = %e, epc = %e\n",
+      //    device->fix->ept,
+      //    device->fix->eph,
+      //    device->fix->epv,
+      //    device->fix->epd,
+      //    device->fix->eps,
+      //    device->fix->epc);
       if(fp)
         g_fprintf(fp, "</trkpt>\n");
     }
   }
        
-       g_print ("Satellites in view: %d\n", device->satellites_in_view);
-       g_print ("Satellites in use: %d\n", device->satellites_in_use);
+       //g_print ("Satellites in view: %d\n", device->satellites_in_view);
+       //g_print ("Satellites in use: %d\n", device->satellites_in_use);
   g_string_append_printf (msg, "Satellites = % 2d/% 2d\n", device->satellites_in_use, device->satellites_in_view);
-       g_print ("GPS status: %d\n", device->status);
+       //g_print ("GPS status: %d\n", device->status);
        g_string_append_printf (msg, "GPS status: %d\n", device->status);
 
   hildon_gtk_window_set_progress_indicator(GTK_WINDOW(app_data->window), device->status == LOCATION_GPS_DEVICE_STATUS_NO_FIX);
 
 
-       if (device->cell_info) {
-               if (device->cell_info->flags & LOCATION_CELL_INFO_GSM_CELL_INFO_SET)
-                       g_print ("Mobile Coutry Code GSM: %d\n", device->cell_info->gsm_cell_info.mcc);
+       //if (device->cell_info) {
+       //      if (device->cell_info->flags & LOCATION_CELL_INFO_GSM_CELL_INFO_SET)
+       //              g_print ("Mobile Coutry Code GSM: %d\n", device->cell_info->gsm_cell_info.mcc);
 
-               if (device->cell_info->flags & LOCATION_CELL_INFO_WCDMA_CELL_INFO_SET)
-                       g_print ("Mobile Coutry Code WCDMA: %d\n", device->cell_info->wcdma_cell_info.mcc);
-       }
+       //      if (device->cell_info->flags & LOCATION_CELL_INFO_WCDMA_CELL_INFO_SET)
+       //              g_print ("Mobile Coutry Code WCDMA: %d\n", device->cell_info->wcdma_cell_info.mcc);
+       //}
 
   gtk_label_set_text(info, msg->str);
   if(device->status != LOCATION_GPS_DEVICE_STATUS_NO_FIX)