summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-26 23:11:30 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-27 08:30:12 -0800
commit3fd39a7a87bf438f012167303a564deac72d267a (patch)
treebeef1275b861afb5b91923b0b19b33f3dc04dfe3 /libdivecomputer.c
parentc94101dd4fc6a92e0039aa4649f17db5f652c766 (diff)
downloadsubsurface-3fd39a7a87bf438f012167303a564deac72d267a.tar.gz
Remove some constants and use helpers instead
We have allot of helpers, use them instead of local variants. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index bc2aea6d0..3f118cf04 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -203,7 +203,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
sample->cylinderpressure.mbar = value.pressure.value * 1000 + 0.5;
break;
case DC_SAMPLE_TEMPERATURE:
- sample->temperature.mkelvin = value.temperature * 1000 + ZERO_C_IN_MKELVIN + 0.5;
+ sample->temperature.mkelvin = C_to_mkelvin(value.temperature);
break;
case DC_SAMPLE_EVENT:
handle_event(dc, sample, value);