new Uemis downloader

Dirk Hohndel dirk at hohndel.org
Sat Dec 1 13:41:32 PST 2012


Linus Torvalds <torvalds at linux-foundation.org> writes:

> On Sat, Dec 1, 2012 at 2:31 AM, Bearsh <me at bearsh.org> wrote:
>>
>> I just installed libdc from git and also did so for subsurface (master,
>> v2.1-126-g79c2b00), then I removed my previous dive file in
>> ~/subsurface/, started subsurface and tried to download from my Uemis.
>> It says 'Init communication', then the Uemis goes into sync mode, the
>> dialog prints 'Start Downloading' and then the dialog just vanishes
>> without any other message.
>
> This sounds like exactly what happens when the downloader thinks it
> already downloaded all the files earlier.

Yes, but that wasn't it. A typo in a last minute cleanup ("oh, we need
to check for this command, too" - but there was a missing '!' in front
of the strcmp) turned a trivial change into a fatal bug. The wrong code
path got executed when we tried to get the DeviceId and without correct
DeviceId nothing else works.

Oops.

Fix TESTED and pushed.

But I'd love to see both you and Bearsh test this as well.

> BTW, Dirk - why would libdivecomputer versions matter for the Uemis
> downloader? It doesn't use libdivecomputer, and it can do the end of
> deco without it, no?

Grmbl. Because of the way that Jef wanted to implement the detection of
"you no longer are in deco". He asked me to add a new event for NDL -
and we detect that we are no longer required to have a deco stop when we
get the next NDL event... but without the enum for that event we can't
create this... so even though the Uemis downloader doesn't use
libdivecomputer, it still needs to be able to create that event for
things to work.

But since I think this is the wrong design on the Subsurface side,
anyway, I am halfway through a rewrite of how we deal with deco /
ndl. It will become a property of the sample and not an event driven
mechanism. And that will (as a sideeffect) allow the Uemis downloader to
no longer be tied to libdivecomputer headers. And will give us a much
nicer display of NDL / deco times (plus depth of the next deco step) in
the tooltip in the profile. And no more confusing event markers for all
this...

/D


More information about the subsurface mailing list