summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkoan <jkoan@gmx.de>2020-08-15 07:15:22 +0200
committerjkoan <jkoan@users.noreply.github.com>2020-11-18 15:57:09 +0100
commitbab784a39a5d26827fcc76661eee3738e4b46c0e (patch)
treefcfdc085ae89c48cf27940c5745cbff4f63509ae
parentc5e8008919743d18a595b0a99d3751d376990283 (diff)
downloadnavit-bab784a39a5d26827fcc76661eee3738e4b46c0e.tar.gz
fix:vehicle_geoclue:Fix speed and direction and do some cleanup
-rw-r--r--navit/vehicle/geoclue/vehicle_geoclue.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/navit/vehicle/geoclue/vehicle_geoclue.c b/navit/vehicle/geoclue/vehicle_geoclue.c
index 2220b24bb..6384a1cc3 100644
--- a/navit/vehicle/geoclue/vehicle_geoclue.c
+++ b/navit/vehicle/geoclue/vehicle_geoclue.c
@@ -49,9 +49,7 @@ struct vehicle_priv {
double height;
struct coord_geo geo;
int accuracy;
- struct tm time;
char* time_str;
- char *timep;
GClueSimple *simple;
};
GClueClient *client = NULL;
@@ -86,11 +84,11 @@ static void print_location(GClueSimple *simple,
if(altitude != -G_MAXDOUBLE) {
priv->height=altitude;
}
- speed = gclue_location_get_altitude(location);
+ speed = gclue_location_get_speed(location);
if(speed != -G_MAXDOUBLE) {
priv->speed=speed;
}
- direction = gclue_location_get_altitude(location);
+ direction = gclue_location_get_heading(location);
if(direction != -G_MAXDOUBLE) {
priv->direction=direction;
}
@@ -217,7 +215,6 @@ static struct vehicle_priv *vehicle_geoclue_new(struct vehicle_methods *meth,
ret = (struct vehicle_priv*)g_new0(struct vehicle_priv, 1);
ret->cbl = cbl;
- ret->time.tm_year=0;
gclue_simple_new("navit",
GCLUE_ACCURACY_LEVEL_EXACT,
NULL,