Suunto download missing alerts?

Linus Torvalds torvalds at
Tue Sep 20 21:11:36 PDT 2016

On Tue, Sep 20, 2016 at 8:39 PM, Miika Turkia <miika.turkia at> wrote:
> we have a report on user forum that when downloading dives from Suunto
> D6i, some alerts are missing. And when looking at my own logs from
> Vyper Air, I cannot find any airtime alarms since 2012. Also, now that
> I compare the users logs, an import from DM5 gives tank pressure alarm
> but direct import with Subsurface gives safety stop (mandatory) for
> the same alarm. Does anyone have a hunch on where to look?

So this would almost certainly be a libdivecomputer thing.

The event handling is around line 600+ in src/suunto_d9_parser.c in
libdivecomputer.  That says

                                        case 0x0D: // Air Time Warning
                                                sample.event.type =

and if you know you should have an airtime warning, you might want to
add a debug output thing there.

We then translate those things inro something human-readable in
subsurface in core/libdivecomputer.c: handle_event().

And it looks like that translation is fine, although maybe we should
make it be based on the symbolic numbers, rather than hardcoded. But
SAMPLE_EVENT_AIRTIME is (21), and events[21] is "airtime", so it
_looks_ right.

What is the number? You should see it in the xml file, it *should*
look soemthing like

    <event time='41:10 min' type='21' name='airtime' />

but presumably it says "type='13' name='safety stop (mandatory)'" instead.

But without some instrumentation in libdivecomputer, it's hard to
guess what's really going on. Maybe airtime never worked?

The libdivecomputer code to parse those events is ancient. The Suunto
D9 parser is one of the original ones, I think. Goes back to 2008 in
the libdivecomputer code.


More information about the subsurface mailing list