Uwatec Smart Z data download takes 1.5 hours for only 4 dives
jef at libdivecomputer.org
Mon Dec 23 13:37:50 UTC 2013
On 23-12-13 22:25, Dirk Hohndel wrote:
> On Mon, 2013-12-23 at 22:21 +0100, Jef Driesen wrote:
>> Unfortunately that's a limitation of how subsurface implements the "download
>> only new dives" feature. Subsurface starts downloading dives, and aborts the
>> download once a previously downloaded dive is recognized. But the Uwatec
>> protocol forces you to always download ALL dives at once, unless you tell it not
>> to do that. This works by sending a device timestamp to the device during
>> handshaking, and then the device will only return those dives that are more
>> recent than the timestamp (e.g. only the new dives). This is available in
>> libdivecomputer through the fingerprint feature, but subsurface doesn't use it.
>> @Dirk: This is one of those cases where a custom "download only new dives"
>> implementation will always be less efficient than libdivecomputer's built-in
>> fingerprint based implementation.
> Linus - I don't remember why we did not use the fingerprint based
> implementation... can you remind me?
The import change here is that you'll need to maintain a small "database" to
store the most recent fingerprints, one for each unique device (based on the
family type and serial number). The fingerprints can be stored in the xml, or
somewhere separately as you wish.
There is an example implementation in the universal app. With the "-c" option
you can specify a directory where the fingerprint database (just one file per
unique device) is stored. Everything else happens automatically. There is also
the "-f" option to try a specific fingerprint. That last one is often handy for
trying the feature manually.
>>> Another small issue I encountered: the dive download dialogue window does not
>>> remember the irda0 port setting, but returns to /dev/ttyS31.
>> Doesn't matter, because the device node isn't used. IrDA communication uses
>> sockets, which don't need a device node at all.
> We really need to add code that recognizes the dive computers that don't
> need a device node and then simply gray that field out.
> Anyone interested in working on that? It shouldn't be all that hard -
> work with Jef to figure out which DCs don't need a device node,
> recognize them in the downloading Widget and if the user selects one of
> them disable the input field...
There is already an api for that: the dc_descriptor_get_transport function. I
already implemented this a while ago for the gtk version , but maybe it got
lost in the port to Qt?
 commit e3b8d8ee70d6323113355175abb0bf34940bc5e4
More information about the subsurface