gps->io.nmea=g_strdup(gps->io.buffer);
g_assert(gps->io.nmea);
g_idle_add_full(G_PRIORITY_HIGH_IDLE, (GSourceFunc)gps_nmea_parse, gps, NULL);
+
+ if (gps->update_info)
+ g_idle_add_full(G_PRIORITY_DEFAULT, (GSourceFunc)gps->update_info, gps, NULL);
+
+ if (gps->update_satellite)
+ g_idle_add_full(G_PRIORITY_DEFAULT, (GSourceFunc)gps->update_satellite, gps, NULL);
} else {
/* There was a checksum, and it was bad. */
g_printerr("%s: Bad checksum in NMEA sentence:\n%s\n", __PRETTY_FUNCTION__, gps->io.buffer);
/* New location */
void(* update_location)(Gps *gps, gboolean newly_fixed);
- void(* update_satellite)(Gps *gps);
- void(* update_info)(Gps *gps);
+ gboolean(* update_satellite)(Gps *gps);
+ gboolean(* update_info)(Gps *gps);
};
Gps *_gps;
if (_gps_info)
gps_display_data(&gps->data);
+gps_display_data_speed(info_banner.speed, gps->data.speed);
+
+return FALSE;
+}
+
+gboolean
+gps_satellite_update(Gps *gps)
+{
if (_satdetails_on)
gps_display_details(&gps->data);
-gps_display_data_speed(info_banner.speed, gps->data.speed);
-
-return TRUE;
+return FALSE;
}
gboolean