[PATCH 1/2] Fix divinglog import limit checking

Miika Turkia miika.turkia at gmail.com
Sat Oct 7 21:35:49 PDT 2017


On Sun, Oct 8, 2017 at 2:25 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
> On Sat, Oct 7, 2017 at 3:01 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> Looking through your patch, I notice that you extract rbt and otu - but then never seem
>> to do anything with them...
>
> Right. I extracted them because it actually made the code easier to
> read (matching the descriptions), but the old code didn't actually use
> the values.

I would not be surprised if the imports had more of these. I think it
is best to document the import format in source code while reversing.
And if there is no equivalent in Subsurface, or I erroneously think
so, that piece of code might be in reality useless.

> The test-case doesn't actually have RBT values at all (because they no
> cylinder pressure sensor either), and OTU we don't even save at that
> level anyway.
>
> Anyway, the appended intentionally whitespace-mangled trivial
> one-liner should save the RBT value, but because of lack of test
> values, I'm not sure what it's worth - I'd like somebody that has test
> data (Miika?) to verify that it actually does work..

With this one-line change the rbt ends up being saved to the Subsurface XML:

-  <sample time='4:52 min' depth='32.53 m' pressure='102.2 bar'
heartbeat='108' />
+  <sample time='4:52 min' depth='32.53 m' pressure='102.2 bar'
rbt='11:00 min' heartbeat='108' />

miika


More information about the subsurface mailing list