diff options
author | Jan Schubert <Jan.Schubert@GMX.li> | 2013-01-24 23:09:53 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-24 15:00:52 -0800 |
commit | 50d0391dfbf8f63894abeb288dd4467f06f31b4c (patch) | |
tree | a142c06cfddf081aaa806127a3fc26d1fe593eb6 /libdivecomputer.c | |
parent | 67d8891af5ff98870f519a4282918ad2ebd4b3ff (diff) | |
download | subsurface-50d0391dfbf8f63894abeb288dd4467f06f31b4c.tar.gz |
Centralization for Kelvin and Standardization to milliKelvin
This centralizes all occurrences of Kelvin to dive.h and standardizes all
usages to milliKelvin.
[Dirk Hohndel: renamed the constant plus minor white space cleanup]
Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r-- | libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index 8345c859f..3a32c5d97 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -214,7 +214,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 + 273.15) * 1000 + 0.5; + sample->temperature.mkelvin = value.temperature * 1000 + ZERO_C_IN_MKELVIN + 0.5; break; case DC_SAMPLE_EVENT: handle_event(dc, sample, value); |