From 5cea16ec509bdca4d9410aea193277fa42fba1a4 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 26 Feb 2013 11:15:06 -0800 Subject: [PATCH] Another update to DivingLog import This fixes two bugs: - we overwrote the max depth that we read from an XML file with 0 if there are no samples - we didn't parse the DepthAvg tag in the DivingLog XML Signed-off-by: Dirk Hohndel --- dive.c | 3 ++- xslt/DivingLog.xslt | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dive.c b/dive.c index 2fe7cf32a..3e2d8dd5e 100644 --- a/dive.c +++ b/dive.c @@ -617,7 +617,8 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc) double depthtime = 0; int lasttime = 0; int lastindex = -1; - int maxdepth = 0, mintemp = 0; + int maxdepth = dc->maxdepth.mm; + int mintemp = 0; int lastdepth = 0; int lasttemp = 0, lastpressure = 0; int pressure_delta[MAX_CYLINDERS] = {INT_MAX, }; diff --git a/xslt/DivingLog.xslt b/xslt/DivingLog.xslt index 4a6b4d387..ced6a4e80 100644 --- a/xslt/DivingLog.xslt +++ b/xslt/DivingLog.xslt @@ -47,6 +47,11 @@ + + + + +