diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-05-06 17:38:45 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-07 11:17:17 -0700 |
commit | 69b4a404b9961bc9b3b2f3cbbf7e0bc634f3a5dd (patch) | |
tree | 3c3aa3a876c10e62d9c542044fc6434bb3b9b9b9 /xslt | |
parent | 30a60f34b6bebab5c3b0928857f1493ce033387b (diff) | |
download | subsurface-69b4a404b9961bc9b3b2f3cbbf7e0bc634f3a5dd.tar.gz |
Ignore the gas_change alarm on MacDive import
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@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/MacDive.xslt | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/xslt/MacDive.xslt b/xslt/MacDive.xslt index 7e0e4c6e7..628c67eac 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> |