summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>2015-09-09 20:38:52 +0100
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2015-09-09 20:44:37 +0100
commitc98f1cc25febd95beb62a7f5837de90c27071a9e (patch)
treef6977a47e0a68179a6520e8ca9a823a24c668143
parenta6f30bee9682ac03e5ada04c04f76fbd28ae8c07 (diff)
location: No negative speedswip/gps-ts
If timestamp on new location is older than that on previous location, calculating speed from them does not make sense. Instead simply set the speed to unknown in such cases.
-rw-r--r--src/gclue-location.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gclue-location.c b/src/gclue-location.c
index ae0834c..038f43b 100644
--- a/src/gclue-location.c
+++ b/src/gclue-location.c
@@ -493,7 +493,7 @@ gclue_location_set_speed_from_prev_location (GClueLocation *location,
timestamp = geocode_location_get_timestamp (gloc);
prev_timestamp = geocode_location_get_timestamp (prev_gloc);
- if (timestamp == prev_timestamp) {
+ if (timestamp <= prev_timestamp) {
speed = GCLUE_LOCATION_SPEED_UNKNOWN;
goto out;