Use dive computer model/ID when trying to merge dives

If we havd divecomputer model and dive ID information available, use
that to match existing dives when trying to merge them.

Otherwise fall back to the fuzzy time-based merging logic.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2012-12-16 10:55:58 -08:00 committed by Dirk Hohndel
parent 92c15238b6
commit 73defa9a52
2 changed files with 67 additions and 12 deletions

3
dive.h
View file

@ -448,6 +448,9 @@ static inline struct dive *get_dive_by_diveid(int diveid, int deviceid)
return NULL;
}
/* Check if two dive computer entries are the exact same dive (-1=no/0=maybe/1=yes) */
extern int match_one_dc(struct divecomputer *a, struct divecomputer *b);
/*
* Iterate over each dive, with the first parameter being the index
* iterator variable, and the second one being the dive one.