From 1faea84b5b63d1378276d86be6302d54266ec731 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 23 Apr 2012 21:07:52 +0200 Subject: [PATCH] Fix the gas mix parsing for the Oceanic VT 4.x. --- src/oceanic_atom2_parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c index 6934041..d2d131c 100644 --- a/src/oceanic_atom2_parser.c +++ b/src/oceanic_atom2_parser.c @@ -264,6 +264,9 @@ oceanic_atom2_parser_get_field (parser_t *abstract, parser_field_type_t type, un // Get the offset to the header and footer sample. unsigned int header = headersize - PAGESIZE / 2; unsigned int footer = size - footersize; + if (parser->model == VT4 || parser->model == VT41) { + header = 3 * PAGESIZE; + } if (!parser->cached) { sample_statistics_t statistics = SAMPLE_STATISTICS_INITIALIZER; @@ -292,6 +295,8 @@ oceanic_atom2_parser_get_field (parser_t *abstract, parser_field_type_t type, un case FIELD_TYPE_GASMIX_COUNT: if (parser->model == DATAMASK || parser->model == COMPUMASK) *((unsigned int *) value) = 1; + else if (parser->model == VT4 || parser->model == VT41) + *((unsigned int *) value) = 4; else *((unsigned int *) value) = 3; break;