summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-05-06 17:38:44 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-07 11:17:10 -0700
commit30a60f34b6bebab5c3b0928857f1493ce033387b (patch)
treee7f6fc45303264a22521322862c999891960edef /xslt
parent381f7020176d6f15c81abe0d53b68f1755aa2645 (diff)
downloadsubsurface-30a60f34b6bebab5c3b0928857f1493ce033387b.tar.gz
Parse MacDive gas usage from gases list
Gas change events can be parsed properly from the gases list with clear information on what the gas mixture was. 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.xslt15
1 files changed, 15 insertions, 0 deletions
diff --git a/xslt/MacDive.xslt b/xslt/MacDive.xslt
index 21f827b9e..7e0e4c6e7 100644
--- a/xslt/MacDive.xslt
+++ b/xslt/MacDive.xslt
@@ -208,6 +208,21 @@
</cylinder>
</xsl:for-each>
+ <xsl:for-each select="gases/gas">
+ <event name="gaschange">
+ <xsl:attribute name="time">
+ <xsl:call-template name="sec2time">
+ <xsl:with-param name="timeSec">
+ <xsl:value-of select="sum(preceding-sibling::gas/duration)"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="helium * 65536 + oxygen"/>
+ </xsl:attribute>
+ </event>
+ </xsl:for-each>
+
<xsl:if test="diveMaster">
<divemaster>
<xsl:value-of select="diveMaster"/>