diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-25 12:08:28 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-06 09:35:36 -0800 |
commit | 9c26da3e292d420982e58fb3dfcc62ebfd8c1d6e (patch) | |
tree | 5e5241667bc8c67e555b5e7bfc98f9bb4796a90e | |
parent | ea9303ff3cff8ea7c353b8a0c53e13e82f897360 (diff) | |
download | subsurface-9c26da3e292d420982e58fb3dfcc62ebfd8c1d6e.tar.gz |
Don't overwrite air temperature
If we already have an air temperature set, don't overwrite it with
potentially less accurate infromation from the first sample.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index ca8378379..8ed29edd7 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -695,7 +695,7 @@ static int dive_cb(const unsigned char *data, unsigned int size, dc_parser_destroy(parser); /* Various libdivecomputer interface fixups */ - if (first_temp_is_air && dive->dc.samples) { + if (dive->dc.airtemp.mkelvin == 0 && first_temp_is_air && dive->dc.samples) { dive->dc.airtemp = dive->dc.sample[0].temperature; dive->dc.sample[0].temperature.mkelvin = 0; } |