API redesign progress

Linus Torvalds torvalds at linux-foundation.org
Fri Jun 22 13:53:14 PDT 2012

On Fri, Jun 22, 2012 at 1:29 PM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
> I think I'll just force subsurface users to get the new
> libdivecomputer source, because this is a big step forward. Even if it
> isn't perhaps ready and stable yet, I much prefer this over the
> release-0.1 interfaces.

Ok, I fixed up a few silly problems, tested it with my Vyper Air, and
was all happy.

subsurface changes pushed out.

Looking at the subsurface libdivecomputer interfaces, the horrible
device open and parser setup stuff is now gone. A few comments:

 - do we have to do the parser create for each dive, or could that be
something that is just done once? As libdivecomputer gets more detaisl
from the computer (which might update the parse state), why not just
do it all automatically?

   It seems silly do do the create_parser() in the dive callback. In
fact, it seems silly to do it in the application at all, why isn't it
done implicitly and automatically by dc_device_open()?

 - The event handling is still horrible. There does not seem to be any
sane generic way to just get the event type and meaning.

 - Is there some way to get air temperature before the dive?

But the big things that I *really* hated (enumeration of device models
etc) are fixed and libdivecomputer.c doesn't look crazy. Good.


More information about the subsurface mailing list