Fix the CNS sample value.
The CNS value in the public api is reported as a fraction, and not a percentage.
This commit is contained in:
parent
e810232a6d
commit
568365397d
@ -276,7 +276,7 @@ divesystem_idive_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callba
|
|||||||
|
|
||||||
// CNS
|
// CNS
|
||||||
unsigned int cns = array_uint16_le (data + offset + 29);
|
unsigned int cns = array_uint16_le (data + offset + 29);
|
||||||
sample.cns = cns;
|
sample.cns = cns / 100.0;
|
||||||
if (callback) callback (DC_SAMPLE_CNS, sample, userdata);
|
if (callback) callback (DC_SAMPLE_CNS, sample, userdata);
|
||||||
|
|
||||||
offset += SZ_SAMPLE;
|
offset += SZ_SAMPLE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user