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 17:02:21 -0700 |
commit | 1ad253df9dd5ae97a75ebc9993407413227fe7be (patch) | |
tree | 5dbed3ce4aa3be790a38a9606f56acae1f30df05 | |
parent | f29fa78a8d8ca76e82e8a25507e365fe9f842e65 (diff) | |
download | subsurface-1ad253df9dd5ae97a75ebc9993407413227fe7be.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>
-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"> |