diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-06 20:13:12 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-06 20:13:12 -0800 |
commit | 379fa5f65270da85a4a0816a9fab6589cf70893d (patch) | |
tree | a781361fb111581c1f97bdadfcd1b8229f1cefb8 /save-xml.c | |
parent | df464fcef12e04e0d6e6676a55049771cc075b12 (diff) | |
download | subsurface-379fa5f65270da85a4a0816a9fab6589cf70893d.tar.gz |
Really save airtemp and watertemp in the dive
I thought I had this fixed, but a silly thinko broke my fix.
Only abort the saving if both air AND water temperature are already
covered by the divecomputer(s) in a dive. If at least one of them is
different, then create a divetemperature tag and fill in that value at the
dive level.
Fixes #313
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c index 631abda9a..40aa9cb94 100644 --- a/save-xml.c +++ b/save-xml.c @@ -155,7 +155,7 @@ static void save_dive_temperature(FILE *f, struct dive *dive) { if (!dive->airtemp.mkelvin && !dive->watertemp.mkelvin) return; - if (dive->airtemp.mkelvin == dc_airtemp(&dive->dc) || dive->watertemp.mkelvin == dc_watertemp(&dive->dc)) + if (dive->airtemp.mkelvin == dc_airtemp(&dive->dc) && dive->watertemp.mkelvin == dc_watertemp(&dive->dc)) return; fputs(" <divetemperature", f); |