[PATCH 3/3] Ignore the gas_change alarm on MacDive import
Miika Turkia
miika.turkia at gmail.com
Wed May 6 07:38:45 PDT 2015
As the gas changes can be parsed more reliably from the gases list, we
just ignore the gas_change events as redundant information.
Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
xslt/MacDive.xslt | 23 +----------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/xslt/MacDive.xslt b/xslt/MacDive.xslt
index 7e0e4c6..628c67e 100644
--- a/xslt/MacDive.xslt
+++ b/xslt/MacDive.xslt
@@ -412,7 +412,7 @@
</xsl:if>
</sample>
- <xsl:if test="alarm != ''">
+ <xsl:if test="alarm != '' and alarm != gas_change">
<event>
<xsl:attribute name="time">
<xsl:call-template name="timeConvert">
@@ -445,32 +445,11 @@
<xsl:when test="alarm = 'user_depth_alarm'">
<xsl:value-of select="'maxdepth'"/>
</xsl:when>
- <xsl:when test="alarm = 'gas_change'">
- <xsl:value-of select="'gaschange'"/>
- </xsl:when>
<xsl:otherwise>
<xsl:value-of select="alarm"/>
</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>
--
2.1.4
More information about the subsurface
mailing list