Merging data from two DC broken?

Miika Turkia miika.turkia at gmail.com
Sat Feb 16 05:31:03 PST 2013


On Sat, Feb 16, 2013 at 2:11 PM, Jef Driesen <jefdriesen at telenet.be> wrote:
> On 16-02-13 10:28, Dirk Hohndel wrote:
>>
>>
>> On Feb 16, 2013, at 1:25 AM, Miika Turkia wrote:
>>>
>>> File sent directly to Dirk.
>>>
>>> I did a bit more testing. If I close the combined XML file where no
>>> merging have occurred after download and then open it again - the DCs
>>> are merged properly. So the basic merge is functioning properly but it
>>> is not triggered when importing/downloading from DC.
>>
>>
>> And because of this I can of course not reproduce this here :-(
>
>
> If Miika sends you the memory dumps of his two dive computers, then you
> should be able to reproduce the problem with the simulator.
>
> On native linux, you don't need any of the virtual machine setup. Just run
> socat to setup two pseudo terminals:
>
> socat PTY,raw,echo=0,link=/tmp/ttyS0 PTY,raw,echo=0,link=/tmp/ttyS1
>
> and then run the simulator on /tmp/ttyS1 and subsurface on /tmp/ttyS0. The
> only extra you have to do is to compile libdivecomputer with "./configure
> --enable-pty". Without this option, libdivecomputer will have trouble with
> the pty's.

What is the simulator you are talking about? I could do my testing
with it rather than hooking up the dive computers back and forth
(especially if it would be faster).

Anyway the problem seems to be the meandepth that is zero. Attached
patch skips the comparison for mean depth if this information is not
available. A proper fix would naturally to calculate the mean depth
during import. I suppose someone with knowledge of this part of the
code can do that properly in no time...

miika
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Skip-mean-depth-comparison-when-no-such-data-exist.patch
Type: application/octet-stream
Size: 1212 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130216/deb8af3a/attachment.obj>


More information about the subsurface mailing list