diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:41:41 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-11 08:41:41 -0800 |
commit | 08284275e733fcea8b909b86fda503d4b24e0b84 (patch) | |
tree | b2092172f09044d58efdae479447bae9b6c824ad /core/file.c | |
parent | b8b858a9d299877969527ef5b3c4bde97bb86d05 (diff) | |
parent | 2b06a0b2234cf2779f80e87038011067be282bcb (diff) | |
download | subsurface-08284275e733fcea8b909b86fda503d4b24e0b84.tar.gz |
Merge branch 'master' of https://github.com/dje29/subsurface
Diffstat (limited to 'core/file.c')
-rw-r--r-- | core/file.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/file.c b/core/file.c index 5b910e72b..889a9102b 100644 --- a/core/file.c +++ b/core/file.c @@ -293,31 +293,31 @@ static void add_sample_data(struct sample *sample, enum csv_format type, double sample->cylinderpressure.mbar = psi_to_mbar(val * 4); break; case POSEIDON_DEPTH: - sample->depth.mm = val * 0.5 *1000; + sample->depth.mm = lrint(val * 0.5 * 1000); break; case POSEIDON_TEMP: sample->temperature.mkelvin = C_to_mkelvin(val * 0.2); break; case POSEIDON_SETPOINT: - sample->setpoint.mbar = val * 10; + sample->setpoint.mbar = lrint(val * 10); break; case POSEIDON_SENSOR1: - sample->o2sensor[0].mbar = val * 10; + sample->o2sensor[0].mbar = lrint(val * 10); break; case POSEIDON_SENSOR2: - sample->o2sensor[1].mbar = val * 10; + sample->o2sensor[1].mbar = lrint(val * 10); break; case POSEIDON_PRESSURE: - sample->cylinderpressure.mbar = val * 1000; + sample->cylinderpressure.mbar = lrint(val * 1000); break; case POSEIDON_O2CYLINDER: - sample->o2cylinderpressure.mbar = val * 1000; + sample->o2cylinderpressure.mbar = lrint(val * 1000); break; case POSEIDON_NDL: - sample->ndl.seconds = val * 60; + sample->ndl.seconds = lrint(val * 60); break; case POSEIDON_CEILING: - sample->stopdepth.mm = val * 1000; + sample->stopdepth.mm = lrint(val * 1000); break; } } |