Don't match existing dives by date if the dive computers are known to be different

Linus Torvalds torvalds at linux-foundation.org
Fri Dec 28 14:12:10 PST 2012


When downloading from a dive computer, we fall back on matching the
exact date of the dive if we can't tell whether we already have that
exact dive computer data some other way.

However, if you have multiple dive computers and they are sufficiently
well synchronized, they might actually have the exact same date,
despite the fact that we do want to download both dive computers. We
do check the dive start to the exact second, so this sounds unlikely,
but with dive computers rounding time to the next minute etc, it's not
as unlikely as you'd think. Dirk hit it.

So when we match against date, do check that the dive computer might
actually be one we've already downloaded from. If we have full model
information, we can dismiss the "match date" logic.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---

I didn't test this, I've never hit it, but Dirk has a test-case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 1069 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20121228/2eefa9f0/attachment.obj>


More information about the subsurface mailing list