diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-02-14 09:47:15 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-14 09:47:15 -0800 |
commit | 869edfbe39c7134a2d3615fd0010ede7e5d557ac (patch) | |
tree | 43e80caa95ca3a911558f28c1d68b85a78c82197 /save-xml.c | |
parent | adf135ad38f0a9e2c279f3066f7fad20a2f364b1 (diff) | |
parent | 23cfd907dea74dd8e4c8bbf93c8c3f598868623e (diff) | |
download | subsurface-869edfbe39c7134a2d3615fd0010ede7e5d557ac.tar.gz |
Merge branch 'airtemp-fix'
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c index 22059a178..c0af41c4c 100644 --- a/save-xml.c +++ b/save-xml.c @@ -150,6 +150,21 @@ static void save_depths(FILE *f, struct divecomputer *dc) fputs(" />\n", f); } +static void save_dive_temperature(FILE *f, struct dive *dive) +{ + temperature_t temp; + temp.mkelvin = dive->airtemp.mkelvin; + dive->airtemp.mkelvin = 0; + fixup_airtemp(dive); + if (dive->airtemp.mkelvin && temp.mkelvin != dive->airtemp.mkelvin) { + fputs(" <divetemperature", f); + show_temperature(f, temp, " air='", "'"); + fputs(" />\n", f); + } + dive->airtemp.mkelvin = temp.mkelvin; + +} + static void save_temperatures(FILE *f, struct divecomputer *dc) { if (!dc->airtemp.mkelvin && !dc->watertemp.mkelvin) @@ -448,7 +463,7 @@ void save_dive(FILE *f, struct dive *dive) save_overview(f, dive); save_cylinder_info(f, dive); save_weightsystem_info(f, dive); - + save_dive_temperature(f, dive); /* Save the dive computer data */ dc = &dive->dc; do { |