Suunto download missing alerts?

Linus Torvalds torvalds at linux-foundation.org
Tue Sep 20 21:39:28 PDT 2016


On Tue, Sep 20, 2016 at 9:11 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> 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.

Here's a patch that shouldn't make any difference what-so-ever, but
changes our handle_event() array to be a lot more obvious about the
numbering.

Completely untested, because that's how I roll. A *sane*
libdivecomputer backend (cough Suunto EON Steel cough) would just give
us a string to begin with, rather than those odd numbers (that really
seem to be based on some old Suunto events rather than anything
generic).

Dirk - I've signed off on it because it looks so obviously correct and
it does compile. So how could it *possibly* break. But you should
probably wait for somebody to test this. Hopefully Miika while he
tries to figure out why libdivecomputer tries to tell him he as a
mandatory safety stop rather than being out of air.

                Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-event-string-translation-when-downloading-from-.patch
Type: text/x-patch
Size: 5284 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160920/5d02eb07/attachment-0001.bin>


More information about the subsurface mailing list