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 /uemis.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 'uemis.c')
-rw-r--r-- | uemis.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -297,7 +297,7 @@ void uemis_parse_divelog_binary(char *base64, void *datap) { datalen = uemis_convert_base64(base64, &data); - dive->dc.airtemp.mkelvin = *(uint16_t *)(data + 45) * 100 + 273150; + dive->dc.airtemp.mkelvin = *(uint16_t *)(data + 45) * 100 + ZERO_C_IN_MKELVIN; dive->dc.surface_pressure.mbar = *(uint16_t *)(data + 43); if (*(uint8_t *)(data + 19)) dive->dc.salinity = 10300; /* avg grams per 10l sea water */ @@ -355,7 +355,7 @@ void uemis_parse_divelog_binary(char *base64, void *datap) { sample = prepare_sample(dc); sample->time.seconds = u_sample->dive_time; sample->depth.mm = rel_mbar_to_depth(u_sample->water_pressure, dive); - sample->temperature.mkelvin = (u_sample->dive_temperature * 100) + 273150; + sample->temperature.mkelvin = (u_sample->dive_temperature * 100) + ZERO_C_IN_MKELVIN; sample->sensor = active; sample->cylinderpressure.mbar = (u_sample->tank_pressure_high * 256 + u_sample->tank_pressure_low) * 10; |