From 41834a31c7db703702f9486712a918279d84da6d Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 23 Feb 2015 22:49:09 +0100 Subject: [PATCH] Fix the freedive mode for the Oceanic Veo 2 and 3. In freedive mode, the Oceanic Veo 2.0 and 3.0 have samples that are only 4 bytes long, instead of the normal 8 bytes. The Oceanic VT3 and Hollis DG03 use the same logbook layout, and although I haven't been able to confirm this with real data, it's very likely they need the same fix. --- src/oceanic_atom2_parser.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c index 8482f46..c7d1b46 100644 --- a/src/oceanic_atom2_parser.c +++ b/src/oceanic_atom2_parser.c @@ -339,6 +339,9 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns mode = FREEDIVE; } else if (parser->model == T3B) { mode = (data[2] & 0xC0) >> 6; + } else if (parser->model == VEO20 || parser->model == VEO30 || + parser->model == VT3 || parser->model == DG03) { + mode = (data[1] & 0x60) >> 5; } if (!parser->cached) { @@ -500,6 +503,9 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ mode = FREEDIVE; } else if (parser->model == T3B) { mode = (data[2] & 0xC0) >> 6; + } else if (parser->model == VEO20 || parser->model == VEO30 || + parser->model == VT3 || parser->model == DG03) { + mode = (data[1] & 0x60) >> 5; } unsigned int time = 0;