From 568365397d923aaeac6aa77772ccfa4dcc40c5b5 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 8 May 2015 09:37:39 +0200 Subject: [PATCH] Fix the CNS sample value. The CNS value in the public api is reported as a fraction, and not a percentage. --- src/divesystem_idive_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/divesystem_idive_parser.c b/src/divesystem_idive_parser.c index 751f9df..4b44879 100644 --- a/src/divesystem_idive_parser.c +++ b/src/divesystem_idive_parser.c @@ -276,7 +276,7 @@ divesystem_idive_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callba // CNS 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); offset += SZ_SAMPLE;