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.
This commit is contained in:
Jef Driesen 2017-08-16 20:14:47 +02:00
parent 133b7394c2
commit 722160cd48

View File

@ -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)