From 379fa5f65270da85a4a0816a9fab6589cf70893d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 6 Dec 2013 20:13:12 -0800 Subject: 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 --- save-xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'save-xml.c') 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("