mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Skip mean depth comparison when no such data exist
Downloading dives from the dive computer attempts to merge same dives, e.g. when multiple dive computers are used. If the mean depth is zero when downloading from DC this comparison fails resulting in not merging the multiple dive computers used on one dive. This patch skips the mean depth comparison when this information is not available. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
45c7ceb917
commit
fd24237916
1 changed files with 1 additions and 1 deletions
2
dive.c
2
dive.c
|
@ -1361,7 +1361,7 @@ static int likely_same_dive(struct dive *a, struct dive *b)
|
|||
* have filled in during 'fixup_dive()'
|
||||
*/
|
||||
if (!similar(a->maxdepth.mm, b->maxdepth.mm, 1000) ||
|
||||
!similar(a->meandepth.mm, b->meandepth.mm, 1000) ||
|
||||
(a->meandepth.mm && b->meandepth.mm && !similar(a->meandepth.mm, b->meandepth.mm, 1000)) ||
|
||||
!similar(a->duration.seconds, b->duration.seconds, 5*60))
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue