Gases in divelist

Dirk Hohndel dirk at hohndel.org
Mon Mar 18 08:42:28 PDT 2013


Miika Turkia <miika.turkia at gmail.com> writes:

> On Mon, Mar 18, 2013 at 5:22 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> Linus Torvalds <torvalds at linux-foundation.org> writes:
>>
>>> On Mon, Mar 18, 2013 at 8:11 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>>>
>>>> The bookmark comes with a heading?
>>>
>>> Not for me it doesn't. A "bookmark" is without a heading, there's a
>>> separate notion of a heading (which is the same as a bookmark but
>>> *does* have a heading).
>>
>> So my guess is that DM4 combines them into the same.
>> libdivecomputer uses SAMPLE_EVENT_HEADING instead.
>>
>> Sadly, once DM4 has combined the two things into one we can't tell them
>> apart anymore (is this a HEADING of 0 or a BOOKMARK without a heading?).
>
> It is actually quite clear in the DB. If there is a heading value, it
> is always the heading. Otherwise this field is empty.
> sqlite> select * from Mark where DiveId = 305;
> DiveId|MarkTime|Type|Heading
> 305|2076|258|130
> 305|3341|19|

So type 258 is a heading and type 19 is a bookmark? Or am I misreading this?

>> Not sure what to do here. My gut feeling would be to say "whatever" and
>> just drop the value for bookmarks. What do people think?
>
> I can change the DM4 import to generate a heading event if that is
> preferred. Then we would have both bookmark and heading at same time.

Well, only if there are two events, right?
I there is only a heading event in the database (as it appears to be at
time 2876 in the example above), why would you create a bookmark event
as well?

But this is good news as that means I could take Robert's second patch
and we could remove the value from the bookmark display in the
tooltip...

/D


More information about the subsurface mailing list