Subsurface deco calculations

Linus Torvalds torvalds at linux-foundation.org
Wed Feb 8 09:14:04 PST 2017


On Wed, Feb 8, 2017 at 8:24 AM, Miika Turkia <miika.turkia at gmail.com> wrote:
>
> The automatic merge does not trigger when importing dives from XML
> files, so importing the attached files does not directly demonstrate
> the issue. (Manually merging these dives from divelist does include
> all the cylinders.)

Actually, the automatic merge does trigger, but because you have
autotrips, the import ends up not merging because the dives are in
different trips.

And I think I can reproduce the problem by removing the gas percentage
from the gas change event. That's how we now get gas changes from
libdivecomputer - just the cylinder number. But then when we save the
XML, we'll (for legacy reasons) also save the gasmix value, which hid
the issue when importing back from an xml file.

IOW, if I take your xml files and remove the trip and the gas change
gasmix percentage from them, I can reproduce something very similar to
what you report.

Let me investigate a bit more before I'm sure, but I think this should
be easily fixable (we *should* look up the percentages from the
cylinder index, we must not do so for some reason).

                 Linus


More information about the subsurface mailing list