Use only one byte for the oxygen percentage.
One byte is already more than sufficient to store an oxygen percentage. Using two bytes doesn't cause any problems for some models, because the upper byte is always zero, but for other models that's not the case. Most likely this upper byte is used to store something else.
This commit is contained in:
parent
48661ce7a8
commit
68f97e907a
@ -381,7 +381,7 @@ uwatec_smart_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsi
|
||||
break;
|
||||
case DC_FIELD_GASMIX:
|
||||
gasmix->helium = 0.0;
|
||||
gasmix->oxygen = array_uint16_le (data + table->gasmix + flags * 2) / 100.0;
|
||||
gasmix->oxygen = data[table->gasmix + flags * 2] / 100.0;
|
||||
gasmix->nitrogen = 1.0 - gasmix->oxygen - gasmix->helium;
|
||||
break;
|
||||
default:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user