summaryrefslogtreecommitdiffstats
path: root/xslt/divelogs-export.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-05-01 09:11:00 -0600
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-02 11:25:57 -0700
commit1559eb590d65ef39c851140d24ae51d7a6076bc1 (patch)
treeb97688f95b479766dc5adad51851dd46ed0a2b32 /xslt/divelogs-export.xslt
parent4f83bb9236d501653ae6890578ee31a8e5cc5f92 (diff)
downloadsubsurface-1559eb590d65ef39c851140d24ae51d7a6076bc1.tar.gz
Use dynamic sample interval on divelogs.de export
Rounding always up should give us sensible sample interval as EON Steel adds extra samples. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/divelogs-export.xslt')
-rw-r--r--xslt/divelogs-export.xslt5
1 files changed, 4 insertions, 1 deletions
diff --git a/xslt/divelogs-export.xslt b/xslt/divelogs-export.xslt
index 7ae342356..8a0b792bf 100644
--- a/xslt/divelogs-export.xslt
+++ b/xslt/divelogs-export.xslt
@@ -222,7 +222,10 @@
<SAMPLEINTERVAL>
<xsl:choose>
<xsl:when test="$special = 1">
- <xsl:text>10</xsl:text>
+ <xsl:variable name="samples">
+ <xsl:value-of select="count(//sample/@time)"/>
+ </xsl:variable>
+ <xsl:value-of select="ceiling($duration div $samples)"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="first">