diff options
Diffstat (limited to 'packages/tangogps')
-rw-r--r-- | packages/tangogps/files/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch | 182 | ||||
-rw-r--r-- | packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch | 73 | ||||
-rw-r--r-- | packages/tangogps/files/0004-Update-fix-timestamp-from-gypsy.patch | 18 | ||||
-rw-r--r-- | packages/tangogps/tangogps-fso_0.9.2.bb | 11 | ||||
-rw-r--r-- | packages/tangogps/tangogps.inc | 6 | ||||
-rw-r--r-- | packages/tangogps/tangogps_0.9.0.3.bb | 5 | ||||
-rw-r--r-- | packages/tangogps/tangogps_0.9.3.bb | 3 |
8 files changed, 5 insertions, 293 deletions
diff --git a/packages/tangogps/files/.mtn2git_empty b/packages/tangogps/files/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/tangogps/files/.mtn2git_empty +++ /dev/null diff --git a/packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch b/packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch deleted file mode 100644 index d5b673dfca..0000000000 --- a/packages/tangogps/files/0002-Get-GPS-data-via-the-gypsy-interface.patch +++ /dev/null @@ -1,182 +0,0 @@ -From aab817f5f2d66f1ef1e710eb6b698865d14b7fc2 Mon Sep 17 00:00:00 2001 -From: Daniel Willmann <daniel@totalueberwachung.de> -Date: Mon, 21 Jul 2008 04:33:59 +0200 -Subject: [PATCH] Get GPS data via the gypsy interface. - Except for the time (which ogpsd doesn't send periodically) the interface - is implemented. - ---- - configure.in | 2 +- - src/gps_functions.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++ - src/gps_functions.h | 3 +- - src/init.c | 6 ++- - 4 files changed, 103 insertions(+), 4 deletions(-) - -diff --git a/configure.in b/configure.in -index 3661a57..cf06033 100644 ---- a/configure.in -+++ b/configure.in -@@ -23,7 +23,7 @@ AM_GLIB_GNU_GETTEXT - - AM_PROG_LIBTOOL - --PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0]) -+PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0 gypsy]) - AC_SUBST(PACKAGE_CFLAGS) - AC_SUBST(PACKAGE_LIBS) - -diff --git a/src/gps_functions.c b/src/gps_functions.c -index bafbc18..57646e1 100644 ---- a/src/gps_functions.c -+++ b/src/gps_functions.c -@@ -4,6 +4,13 @@ - # include <config.h> - #endif - -+#include <gypsy/gypsy-control.h> -+#include <gypsy/gypsy-device.h> -+#include <gypsy/gypsy-position.h> -+#include <gypsy/gypsy-accuracy.h> -+#include <gypsy/gypsy-course.h> -+#include <gypsy/gypsy-satellite.h> -+ - #include <glib.h> - #include <glib/gprintf.h> - -@@ -630,3 +637,92 @@ get_gps() - - - } -+ -+static void on_fix_status_changed(GypsyDevice *device, GypsyDeviceFixStatus status, void *user_data) -+{ -+ gpsdata->fix.mode = status; -+ gpsdata->valid = status > 1; -+} -+ -+static void on_position_changed(GypsyPosition *position, GypsyPositionFields fields_set, -+ int timestamp, double latitude, double longitude, double altitude, void *user_data) -+{ -+ if (gpsdata->valid) { -+ gpsdata->fix.latitude = latitude; -+ gpsdata->fix.longitude = longitude; -+ gpsdata->fix.altitude = altitude; -+ } -+} -+ -+static void on_accuracy_changed(GypsyAccuracy *accuracy, int fields, double pdop, -+ double hdop, double vdop, void *user_data) -+{ -+ gpsdata->hdop = hdop; -+} -+ -+static void on_course_changed(GypsyCourse *course, GypsyCourseFields fields_set, -+ int timestamp, double speed, double direction, double climb, void *user_data) -+{ -+ gpsdata->fix.speed = speed/3.6; -+ gpsdata->fix.track = direction; -+} -+ -+static void on_satellites_changed(GypsySatellite *sat, GPtrArray *sats, void *user_data) -+{ -+ int i; -+ -+ gpsdata->satellites_used = 0; -+ gpsdata->satellites_inview = sats->len; -+ for (i = 0; i < sats->len; i++) { -+ GypsySatelliteDetails *details = sats->pdata[i]; -+ -+ if (details->in_use) { -+ gpsdata->satellites_used++; -+ } -+ } -+} -+ -+// typedef struct { -+// double time; /* Time of update, seconds since Unix epoch */ -+// int mode; /* Mode of fix */ -+// double latitude; /* Latitude in degrees (valid if mode >= 2) */ -+// double longitude; /* Longitude in degrees (valid if mode >= 2) */ -+// double altitude; /* Altitude in meters (valid if mode == 3) */ -+// double track; /* Course made good (relative to true north) */ -+// double speed; /* Speed over ground, meters/sec */ -+// double bearing; /* in radian */ -+// } gps_fix_t; -+// -+// typedef struct { -+// gps_fix_t fix; -+// int satellites_used; -+// int satellites_inview; -+// double hdop; -+// gboolean valid; -+// } gps_data_t; -+ -+ -+#define GYPSY_OBJ_PATH "/org/freedesktop/Gypsy" -+ -+int setup_gypsy() { -+ gpsdata = g_new0(gps_data_t,1); -+ -+ GypsyControl *gyctrl = gypsy_control_get_default(); -+ GypsyDevice *gydevice = gypsy_device_new(GYPSY_OBJ_PATH); -+ GypsyPosition *gypos = gypsy_position_new(GYPSY_OBJ_PATH); -+ GypsyAccuracy *gyacc = gypsy_accuracy_new(GYPSY_OBJ_PATH); -+ GypsyCourse *gycourse = gypsy_course_new(GYPSY_OBJ_PATH); -+ GypsySatellite *gysat = gypsy_satellite_new(GYPSY_OBJ_PATH); -+ -+ g_signal_connect(gydevice, "fix-status-changed", G_CALLBACK(on_fix_status_changed), NULL); -+ g_signal_connect(gypos, "position-changed", G_CALLBACK(on_position_changed), NULL); -+ g_signal_connect(gyacc, "accuracy-changed", G_CALLBACK(on_accuracy_changed), NULL); -+ g_signal_connect(gycourse, "course-changed", G_CALLBACK(on_course_changed), NULL); -+ g_signal_connect(gysat, "satellites-changed", G_CALLBACK(on_satellites_changed), NULL); -+ -+ gpsdata->fix.mode = gypsy_device_get_fix_status(gydevice, NULL); -+ gpsdata->valid = gpsdata->fix.mode > 1; -+ -+ return 1; -+} -+ -diff --git a/src/gps_functions.h b/src/gps_functions.h -index 1090565..207b39f 100644 ---- a/src/gps_functions.h -+++ b/src/gps_functions.h -@@ -1,4 +1,5 @@ -- -+int -+setup_gypsy(); - - void - get_gps(); -diff --git a/src/init.c b/src/init.c -index 46ca583..c557ce4 100644 ---- a/src/init.c -+++ b/src/init.c -@@ -26,7 +26,7 @@ - #include "wp.h" - - FILE *fp = NULL; -- -+int have_gypsy = 0; - - - void -@@ -197,7 +197,8 @@ cb_gps_timer() - - printf("timer called\n"); - -- get_gps(); -+ if (!have_gypsy) -+ get_gps(); - - - if(gpsdata) -@@ -868,5 +869,6 @@ init() - gtk_label_set_text(GTK_LABEL(widget), "V: " VERSION " (C) Marcus Bauer, GPLv2"); - #endif - -+ have_gypsy = setup_gypsy(); - timer = g_timeout_add (1000,cb_gps_timer,data); - } --- -1.5.4.5 - diff --git a/packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch b/packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch deleted file mode 100644 index 09b2c2ad8a..0000000000 --- a/packages/tangogps/files/0003-Try-to-request-the-GPS-resource-from-ousaged.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 2562a173716141cd9ea5c227dfa52f04ce4205f8 Mon Sep 17 00:00:00 2001 -From: Daniel Willmann <daniel@totalueberwachung.de> -Date: Tue, 22 Jul 2008 00:22:58 +0200 -Subject: [PATCH] Try to request the GPS resource from ousaged - ---- - configure.in | 2 +- - src/gps_functions.c | 22 ++++++++++++++++++++++ - 2 files changed, 23 insertions(+), 1 deletions(-) - -diff --git a/configure.in b/configure.in -index cf06033..2bc3cf9 100644 ---- a/configure.in -+++ b/configure.in -@@ -23,7 +23,7 @@ AM_GLIB_GNU_GETTEXT - - AM_PROG_LIBTOOL - --PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0 gypsy]) -+PKG_CHECK_MODULES(PACKAGE, [gtk+-2.0 gdk-2.0 gconf-2.0 dbus-glib-1 gypsy]) - AC_SUBST(PACKAGE_CFLAGS) - AC_SUBST(PACKAGE_LIBS) - -diff --git a/src/gps_functions.c b/src/gps_functions.c -index 57646e1..0802e67 100644 ---- a/src/gps_functions.c -+++ b/src/gps_functions.c -@@ -11,6 +11,7 @@ - #include <gypsy/gypsy-course.h> - #include <gypsy/gypsy-satellite.h> - -+#include <dbus/dbus-glib.h> - #include <glib.h> - #include <glib/gprintf.h> - -@@ -705,6 +706,11 @@ static void on_satellites_changed(GypsySatellite *sat, GPtrArray *sats, void *u - #define GYPSY_OBJ_PATH "/org/freedesktop/Gypsy" - - int setup_gypsy() { -+ DBusGConnection *connection; -+ DBusGProxy *proxy; -+ GError *error; -+ int result; -+ - gpsdata = g_new0(gps_data_t,1); - - GypsyControl *gyctrl = gypsy_control_get_default(); -@@ -723,6 +729,22 @@ int setup_gypsy() { - gpsdata->fix.mode = gypsy_device_get_fix_status(gydevice, NULL); - gpsdata->valid = gpsdata->fix.mode > 1; - -+ error = NULL; -+ connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); -+ if (connection == NULL) { -+ g_printerr ("Failed to open connection to bus: %s\n", -+ error->message); -+ g_error_free (error); -+ proxy = NULL; -+ } -+ -+ proxy = dbus_g_proxy_new_for_name (connection, -+ "org.freesmartphone.ousaged", -+ "/org/freesmartphone/Usage", -+ "org.freesmartphone.Usage"); -+ -+ dbus_g_proxy_call (proxy, "RequestResource", &error, G_TYPE_STRING, "GPS", G_TYPE_INVALID, G_TYPE_BOOLEAN, &result, G_TYPE_INVALID); -+ - return 1; - } - --- -1.5.4.5 - diff --git a/packages/tangogps/files/0004-Update-fix-timestamp-from-gypsy.patch b/packages/tangogps/files/0004-Update-fix-timestamp-from-gypsy.patch deleted file mode 100644 index d427108cc7..0000000000 --- a/packages/tangogps/files/0004-Update-fix-timestamp-from-gypsy.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- tangogps-0.9.2/src/gps_functions.c~ 2008-08-15 05:54:26.000000000 +0930 -+++ tangogps-0.9.2/src/gps_functions.c 2008-08-15 23:29:19.000000000 +0930 -@@ -649,6 +649,7 @@ - int timestamp, double latitude, double longitude, double altitude, void *user_data) - { - if (gpsdata->valid) { -+ gpsdata->fix.time = timestamp; - gpsdata->fix.latitude = latitude; - gpsdata->fix.longitude = longitude; - gpsdata->fix.altitude = altitude; -@@ -664,6 +665,7 @@ - static void on_course_changed(GypsyCourse *course, GypsyCourseFields fields_set, - int timestamp, double speed, double direction, double climb, void *user_data) - { -+ gpsdata->fix.time = timestamp; - gpsdata->fix.speed = speed/3.6; - gpsdata->fix.track = direction; - } diff --git a/packages/tangogps/tangogps-fso_0.9.2.bb b/packages/tangogps/tangogps-fso_0.9.2.bb deleted file mode 100644 index 22b65e7f4a..0000000000 --- a/packages/tangogps/tangogps-fso_0.9.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -require tangogps.inc - -PR = "r1" - -RDEPENDS = "frameworkd" - -SRC_URI += "\ - file://0002-Get-GPS-data-via-the-gypsy-interface.patch;patch=1 \ - file://0003-Try-to-request-the-GPS-resource-from-ousaged.patch;patch=1 \ - file://0004-Update-fix-timestamp-from-gypsy.patch;patch=1 \ -" diff --git a/packages/tangogps/tangogps.inc b/packages/tangogps/tangogps.inc index 4c9e427cdd..90789377d1 100644 --- a/packages/tangogps/tangogps.inc +++ b/packages/tangogps/tangogps.inc @@ -4,10 +4,12 @@ HOMEPAGE = "http://tangogps.org/" SECTION = "x11/applications" LICENSE = "GPLv2" PRIORITY = "optional" -DEPENDS = "curl gtk+ gconf gypsy" -RRECOMMENDS = "gpsd" +DEPENDS = "curl gtk+ gconf sqlite3" SRC_URI = "http://www.tangogps.org/downloads/tangogps-${PV}.tar.gz" S = "${WORKDIR}/tangogps-${PV}" inherit autotools pkgconfig + +RRECOMMENDS = "gpsd" + diff --git a/packages/tangogps/tangogps_0.9.0.3.bb b/packages/tangogps/tangogps_0.9.0.3.bb deleted file mode 100644 index a023594b53..0000000000 --- a/packages/tangogps/tangogps_0.9.0.3.bb +++ /dev/null @@ -1,5 +0,0 @@ -require tangogps.inc - -DEPENDS += "gpsd" -RDEPENDS = "gpsd" -PR = "r2" diff --git a/packages/tangogps/tangogps_0.9.3.bb b/packages/tangogps/tangogps_0.9.3.bb index 83465c1da9..59020fd6bd 100644 --- a/packages/tangogps/tangogps_0.9.3.bb +++ b/packages/tangogps/tangogps_0.9.3.bb @@ -1,4 +1,3 @@ require tangogps.inc +PR = "r3" -DEPENDS += "sqlite3" -PR = "r1" |