summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-12-24 19:06:26 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-12-24 19:06:26 +0100
commitded8bfe96585088629f5d70369fbe9f39f4e54b5 (patch)
treef20cdf4bb2e03bb26a512a77bf5837c3c94afbf2
parent4d4ea9c3698077451ecf91c27d45e6503aa1cd0b (diff)
hso: new helper code to debug GPS related issues
Disabled in normal compilation, can be enabled to debug issues.
-rw-r--r--plugins/option/mm-broadband-modem-hso.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/option/mm-broadband-modem-hso.c b/plugins/option/mm-broadband-modem-hso.c
index 39cd36f1..967b0ce2 100644
--- a/plugins/option/mm-broadband-modem-hso.c
+++ b/plugins/option/mm-broadband-modem-hso.c
@@ -627,6 +627,27 @@ trace_received (MMGpsSerialPort *port,
const gchar *trace,
MMIfaceModemLocation *self)
{
+ /* Helper to debug GPS location related issues. Don't depend on a real GPS
+ * fix for debugging, just use some random values to update */
+#if 0
+ if (g_str_has_prefix (trace, "$GPGGA")) {
+ GString *str;
+ GDateTime *now;
+
+ now = g_date_time_new_now_utc ();
+ str = g_string_new ("");
+ g_string_append_printf (str,
+ "$GPGGA,%02u%02u%02u,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47",
+ g_date_time_get_hour (now),
+ g_date_time_get_minute (now),
+ g_date_time_get_second (now));
+ mm_iface_modem_location_gps_update (self, str->str);
+ g_string_free (str, TRUE);
+ g_date_time_unref (now);
+ return;
+ }
+#endif
+
mm_iface_modem_location_gps_update (self, trace);
}