No negative depth on divelogs.de export

Crafting depth samples produced a negative depth for the last sample.
This patch checks that negative last sample is ignored. (This occurred
when last manual sample is not full minutes.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-04-08 23:08:58 +03:00 committed by Dirk Hohndel
parent 27fa775c7c
commit 07fabc03fd

View file

@ -214,11 +214,13 @@
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<SAMPLE>
<DEPTH>
<xsl:value-of select="$curdepth div 1000"/>
</DEPTH>
</SAMPLE>
<xsl:if test="$curdepth &gt; 0">
<SAMPLE>
<DEPTH>
<xsl:value-of select="$curdepth div 1000"/>
</DEPTH>
</SAMPLE>
</xsl:if>
</xsl:otherwise>
</xsl:choose>