diff options
author | Anton Lundin <glance@acc.umu.se> | 2013-11-26 23:11:30 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-27 08:30:12 -0800 |
commit | 3fd39a7a87bf438f012167303a564deac72d267a (patch) | |
tree | beef1275b861afb5b91923b0b19b33f3dc04dfe3 /uemis.c | |
parent | c94101dd4fc6a92e0039aa4649f17db5f652c766 (diff) | |
download | subsurface-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 'uemis.c')
-rw-r--r-- | uemis.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -293,7 +293,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 + ZERO_C_IN_MKELVIN; + dive->dc.airtemp.mkelvin = C_to_mkelvin(*(uint16_t *)(data + 45)); dive->dc.surface_pressure.mbar = *(uint16_t *)(data + 43); if (*(uint8_t *)(data + 19)) dive->dc.salinity = SEAWATER_SALINITY; /* avg grams per 10l sea water */ @@ -351,7 +351,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) + ZERO_C_IN_MKELVIN; + sample->temperature.mkelvin = C_to_mkelvin(u_sample->dive_temperature); sample->sensor = active; sample->cylinderpressure.mbar = (u_sample->tank_pressure_high * 256 + u_sample->tank_pressure_low) * 10; |