mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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 <dirk@hohndel.org>
This commit is contained in:
parent
42fa5a6368
commit
5cea16ec50
2 changed files with 7 additions and 1 deletions
3
dive.c
3
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, };
|
||||
|
|
|
@ -47,6 +47,11 @@
|
|||
<xsl:value-of select="concat(Depth, ' m')"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="DepthAvg != ''">
|
||||
<xsl:attribute name="mean">
|
||||
<xsl:value-of select="concat(DepthAvg, ' m')"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
</depth>
|
||||
|
||||
<location>
|
||||
|
|
Loading…
Reference in a new issue