mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Import and merge GPS data from the webservice
Dive locations marked (and named) via the companion app are downloaded from the webservice, parsed and merged with the existing dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b1db60ba47
commit
c521aec884
4 changed files with 35 additions and 3 deletions
5
main.c
5
main.c
|
@ -165,7 +165,10 @@ void report_dives(gboolean is_imported, gboolean prefer_imported)
|
|||
struct dive *dive = pp[1];
|
||||
struct dive *merged;
|
||||
|
||||
if (prev->when + prev->duration.seconds < dive->when)
|
||||
/* only try to merge overlapping dives - or if one of the dives has
|
||||
* zero duration (that might be a gps marker from the webservice) */
|
||||
if (prev->duration.seconds && dive->duration.seconds &&
|
||||
prev->when + prev->duration.seconds < dive->when)
|
||||
continue;
|
||||
|
||||
merged = try_to_merge(prev, dive, prefer_imported);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue