Add support for the salinity field.
This commit is contained in:
parent
5ca1ef40c1
commit
74fcd11d2b
@ -522,6 +522,7 @@ uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi
|
|||||||
|
|
||||||
dc_gasmix_t *gasmix = (dc_gasmix_t *) value;
|
dc_gasmix_t *gasmix = (dc_gasmix_t *) value;
|
||||||
dc_tank_t *tank = (dc_tank_t *) value;
|
dc_tank_t *tank = (dc_tank_t *) value;
|
||||||
|
dc_salinity_t *water = (dc_salinity_t *) value;
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -582,6 +583,12 @@ uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi
|
|||||||
else
|
else
|
||||||
*((dc_divemode_t *) value) = DC_DIVEMODE_GAUGE;
|
*((dc_divemode_t *) value) = DC_DIVEMODE_GAUGE;
|
||||||
break;
|
break;
|
||||||
|
case DC_FIELD_SALINITY:
|
||||||
|
if (table->salinity == UNSUPPORTED)
|
||||||
|
return DC_STATUS_UNSUPPORTED;
|
||||||
|
water->type = parser->watertype;
|
||||||
|
water->density = salinity * 1000.0;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return DC_STATUS_UNSUPPORTED;
|
return DC_STATUS_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user