From 693bfa391605346013f4b6d0ad134ee48506c61b Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Sat, 13 Sep 2014 13:20:16 +0200 Subject: [PATCH] Fix the Tusa Zen header size and pressure. For the Tusa Zen, the header is 16 bytes smaller. With this change, the gasmixes and the intial temperature are now parsed correctly. The tank pressure samples have also been disabled manually, because this is a non-air integrated model that doesn't seem to set the initial tank pressure to the magic value 10000. --- src/oceanic_atom2_parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c index 00c52e9..beed0a8 100644 --- a/src/oceanic_atom2_parser.c +++ b/src/oceanic_atom2_parser.c @@ -47,6 +47,7 @@ #define ELEMENT2 0x4357 #define VEO20 0x4359 #define VEO30 0x435A +#define ZEN 0x4441 #define ZENAIR 0x4442 #define ATMOSAI2 0x4443 #define PROPLUS21 0x4444 @@ -287,7 +288,7 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns parser->model == VEO20 || parser->model == VEO30 || parser->model == OCS || parser->model == PROPLUS3 || parser->model == A300 || parser->model == MANTA || - parser->model == INSIGHT2) { + parser->model == INSIGHT2 || parser->model == ZEN) { headersize -= PAGESIZE; } else if (parser->model == VT4 || parser->model == VT41) { headersize += PAGESIZE; @@ -391,7 +392,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ parser->model == VEO20 || parser->model == VEO30 || parser->model == OCS || parser->model == PROPLUS3 || parser->model == A300 || parser->model == MANTA || - parser->model == INSIGHT2) { + parser->model == INSIGHT2 || parser->model == ZEN) { headersize -= PAGESIZE; } else if (parser->model == VT4 || parser->model == VT41) { headersize += PAGESIZE; @@ -440,7 +441,7 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ unsigned int have_temperature = 1, have_pressure = 1; if (parser->model == VEO30 || parser->model == OCS || parser->model == ELEMENT2 || parser->model == VEO20 || - parser->model == A300) { + parser->model == A300 || parser->model == ZEN) { have_pressure = 0; } else if (parser->model == F10) { have_temperature = 0;