Implement the dive mode field.
Dives with all gas mixes disabled are flagged as gauge dives in the Uwatec application.
This commit is contained in:
parent
76f93d3fe5
commit
c135eb75de
@ -480,6 +480,14 @@ uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi
|
|||||||
return DC_STATUS_UNSUPPORTED;
|
return DC_STATUS_UNSUPPORTED;
|
||||||
*((double *) value) = (signed short) array_uint16_le (data + table->temp_surface) / 10.0;
|
*((double *) value) = (signed short) array_uint16_le (data + table->temp_surface) / 10.0;
|
||||||
break;
|
break;
|
||||||
|
case DC_FIELD_DIVEMODE:
|
||||||
|
if (parser->trimix)
|
||||||
|
return DC_STATUS_UNSUPPORTED;
|
||||||
|
if (parser->ngasmixes)
|
||||||
|
*((dc_divemode_t *) value) = DC_DIVEMODE_OC;
|
||||||
|
else
|
||||||
|
*((dc_divemode_t *) value) = DC_DIVEMODE_GAUGE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return DC_STATUS_UNSUPPORTED;
|
return DC_STATUS_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user