]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Update Mares IconHd parsing to current libdivecomputer interface
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Sep 2011 20:14:41 +0000 (13:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 26 Sep 2011 20:14:41 +0000 (13:14 -0700)
The libdivecomputer interfaces are pure crap.  There are no generic
"open the dive computer" or "create a parser for the dive computer"
interfaces, instead each dive computer you support has its own open and
parser generator interface.

And they change.  Happily fairly seldom, but they change.  And two days
ago, Jef changed the interface for the Mares Icon HD computer in order
to support the newer HD Net Ready variant.

I've asked Jef to make a sane interface for "open the dive computer" and
"just create the parser" for libdivecomputer, but he claims that he
cannot just track the device model details internally.  Which is
obviously a completely bogus claim, since the way *we* track the model
details is to just feed it back from the silly event.

libdivecomputer should just do that internally and not bother us with
its crazy internal model numbers.  But whatever.

In the meantime, work around this braindamage, and hope that
libdivecomputer comes to its senses some day.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
libdivecomputer.c

index a10243dd4d594801f6574e0c9284c8f44dc2458c..5fea5c28c848d08659718b08e34cedd2b004bc9e 100644 (file)
@@ -70,7 +70,7 @@ static parser_status_t create_parser(device_data_t *devdata, parser_t **parser)
                return mares_nemo_parser_create(parser, devdata->devinfo.model);
 
        case DEVICE_TYPE_MARES_ICONHD:
-               return mares_iconhd_parser_create(parser);
+               return mares_iconhd_parser_create(parser, devdata->devinfo.model);
 
        case DEVICE_TYPE_HW_OSTC:
                return hw_ostc_parser_create(parser);