diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-05-01 09:11:00 -0600 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-02 11:25:57 -0700 |
commit | 1559eb590d65ef39c851140d24ae51d7a6076bc1 (patch) | |
tree | b97688f95b479766dc5adad51851dd46ed0a2b32 /xslt/divelogs-export.xslt | |
parent | 4f83bb9236d501653ae6890578ee31a8e5cc5f92 (diff) | |
download | subsurface-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.xslt | 5 |
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"> |