mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 01:03:24 +00:00
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>
This commit is contained in:
parent
23cb9b49c2
commit
0a59fd74e2
1 changed files with 1 additions and 1 deletions
|
@ -695,7 +695,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
|
||||||
dc_parser_destroy(parser);
|
dc_parser_destroy(parser);
|
||||||
|
|
||||||
/* Various libdivecomputer interface fixups */
|
/* 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.airtemp = dive->dc.sample[0].temperature;
|
||||||
dive->dc.sample[0].temperature.mkelvin = 0;
|
dive->dc.sample[0].temperature.mkelvin = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue