From 722160cd48df56ac37ac26366b6a3ab31faa272b Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Wed, 16 Aug 2017 20:14:47 +0200 Subject: [PATCH] Fix the atmospheric pressure for the iX3M The iX3M appears to store the atmosperic pressure in units of 1/10 millibar instead of 1 millibar. --- src/divesystem_idive_parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/divesystem_idive_parser.c b/src/divesystem_idive_parser.c index 473dc57..a27aa7f 100644 --- a/src/divesystem_idive_parser.c +++ b/src/divesystem_idive_parser.c @@ -191,7 +191,11 @@ divesystem_idive_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium; break; case DC_FIELD_ATMOSPHERIC: - *((double *) value) = array_uint16_le (data + 11) / 1000.0; + if (parser->model >= IX3M_EASY) { + *((double *) value) = array_uint16_le (data + 11) / 10000.0; + } else { + *((double *) value) = array_uint16_le (data + 11) / 1000.0; + } break; case DC_FIELD_DIVEMODE: if (parser->divemode == 0xFFFFFFFF)