From 8eeeb97b853033acd8abfd65187d072a556270ef Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 26 Sep 2011 13:14:41 -0700 Subject: [PATCH] Update Mares IconHd parsing to current libdivecomputer interface 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 --- libdivecomputer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdivecomputer.c b/libdivecomputer.c index a10243d..5fea5c2 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -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); -- 2.43.0