From 284caf1223471e24af5ae010767bab44324445ea Mon Sep 17 00:00:00 2001 From: "Dr. Johann Pfefferl" Date: Wed, 23 Jun 2010 15:33:25 +0200 Subject: [PATCH] Assume "no fix" when the "fix" data structure is NULL --- debian/changelog | 6 ++++++ gps-tracker.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ccf7036..c19d08b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gps-tracker (1.1-2) unstable; urgency=low + + * Assume "no fix" when the "fix" data structure is NULL + + -- Dr. Johann Pfefferl Wed, 23 Jun 2010 15:32:39 +0200 + gps-tracker (1.1-1) unstable; urgency=low * The recorded waypoints are put at the end of the gpx file diff --git a/gps-tracker.c b/gps-tracker.c index 252cd84..9dc33cc 100644 --- a/gps-tracker.c +++ b/gps-tracker.c @@ -79,7 +79,6 @@ static void write_gpx_footer(AppData *app_data) g_fprintf(fp, "\n\n"); g_fprintf(fp, app_data->waypoint_block_str->str); g_fprintf(fp, "\n"); - g_string_truncate(app_data->waypoint_block_str, 0); } static void cb_wp_set_btn (GtkWidget * w, AppData * data) @@ -124,6 +123,7 @@ static void cb_start_stop (GtkWidget * w, AppData * data) gtk_widget_set_sensitive(GTK_WIDGET(data->wp_set_btn), FALSE); } g_string_truncate(data->wp_marker_str, 0); + g_string_truncate(app_data->waypoint_block_str, 0); } static void cb_file_save (GtkWidget * w, AppData * data) @@ -278,6 +278,10 @@ static void on_gps_device_changed (LocationGPSDevice *device, gpointer data) } } } + else { + app_data->has_fix = FALSE; + app_data->last_device_status = LOCATION_GPS_DEVICE_STATUS_NO_FIX; + } //g_print ("Satellites in view: %d\n", device->satellites_in_view); //g_print ("Satellites in use: %d\n", device->satellites_in_use); -- 1.7.9.5