mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make the dive merging code more tolerant
Depending on the tool used to import a dive from the uemis Zurich we end up with different time stamps for the dive - just by a few seconds, but the existing code insisted on an exact match. We now allow for up to 60 seconds in difference and still consider two dives as the same. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7a7b58340d
commit
0e29df87f4
1 changed files with 1 additions and 1 deletions
2
dive.c
2
dive.c
|
@ -410,7 +410,7 @@ struct dive *try_to_merge(struct dive *a, struct dive *b)
|
|||
int i;
|
||||
struct dive *res;
|
||||
|
||||
if (a->when != b->when)
|
||||
if ((a->when >= b->when + 60) || (a->when <= b->when - 60))
|
||||
return NULL;
|
||||
|
||||
res = alloc_dive();
|
||||
|
|
Loading…
Add table
Reference in a new issue