When downloading from a dive computer, stop at mergeable dives

Dirk Hohndel dirk at hohndel.org
Wed Nov 21 09:09:18 PST 2012


On Wed, 2012-11-21 at 17:56 +0100, Jef Driesen wrote:
> On 2012-11-20 02:31, Linus Torvalds wrote:
> > We do want to have some way of saying "force download of all dives
> > from today" or something like that, I suspect. Because while I don't
> > want to re-download *every* dive, I might want to force-merge the 
> > last
> > <N> dives.
> 
> Have you considered using the libdivecomputer fingerprint feature for 
> this purpose? It has been explicitly designed for this scenario. It 
> supports multiple devices out-of-the box, without needing any sort of 
> heuristics like matching start times. It will also give you the shortest 
> possible download times, something which is not always possible to 
> achieve with a custom implementation.
> 
> Anyway, if you want to play with this feature, have a look at the "-c" 
> option of the universal application. In a multi device scenario, you 
> download both devices with the command:
> 
> ./universal -c <cachedir> -d <xmlfile> -b <backend> <devname>
> 
> The fingerprint of the most recent dive will get stored in the 
> cachedir. When you run the same command again, it will load this 
> fingerprint again and only download the new dives (if any of course). 
> Because the universal app uses a different fingerprint file per device 
> (based on the device serial number), you get multi device support for 
> free.

How do we use this via the API? As you know, Subsurface doesn't run the
universal app to download dives, it is linked against libdivecomputer
and uses that API...

/D



More information about the subsurface mailing list