summaryrefslogtreecommitdiffstats
path: root/xslt/MacDive.xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-05-04 23:37:31 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-07 11:16:47 -0700
commit973713e9db0caa54c124ba97ab770e9082f6304e (patch)
treead060e8099368a34707f74a5d6ea7ed8c956ece1 /xslt/MacDive.xslt
parent9cd79776f27ef9e673324c053cd48efea2bda19b (diff)
downloadsubsurface-973713e9db0caa54c124ba97ab770e9082f6304e.tar.gz
Parse the MacDive gaschange values
Fixes #869 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt/MacDive.xslt')
-rw-r--r--xslt/MacDive.xslt18
1 files changed, 18 insertions, 0 deletions
diff --git a/xslt/MacDive.xslt b/xslt/MacDive.xslt
index 9e3d33e2b..3e2c462f4 100644
--- a/xslt/MacDive.xslt
+++ b/xslt/MacDive.xslt
@@ -428,6 +428,24 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
+ <xsl:if test="alarm = 'gas_change'">
+ <xsl:attribute name="value">
+ <xsl:choose>
+ <xsl:when test="contains(extra, 'EAN')">
+ <xsl:value-of select="translate(extra, translate(extra, '1234567890', ''), '')"/>
+ </xsl:when>
+ <xsl:when test="contains(extra, 'Trimix')">
+ <xsl:variable name="trimix">
+ <xsl:value-of select="translate(extra, translate(extra, '1234567890/', ''), '')"/>
+ </xsl:variable>
+ <xsl:value-of select="substring-after($trimix, '/') * 65536 + substring-before($trimix, '/')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="extra"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
</event>
</xsl:if>
</xsl:for-each>