summaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2017-09-24 08:49:34 +0300
committerGravatar mturkia <miika.turkia@gmail.com>2017-09-24 17:49:10 +0300
commitae34f62489a57ab33f921e83952d51cfec4e1e7e (patch)
tree09921e9f4b9023c6d6afedcbfb00e716b1701bc8 /xslt
parent10216f5e3ed46646ed8b6fbcb833a8e7bc23c2d6 (diff)
downloadsubsurface-ae34f62489a57ab33f921e83952d51cfec4e1e7e.tar.gz
Support gas changes on Shearwater XML import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/shearwater.xslt20
1 files changed, 20 insertions, 0 deletions
diff --git a/xslt/shearwater.xslt b/xslt/shearwater.xslt
index 29d564bce..4a3884b40 100644
--- a/xslt/shearwater.xslt
+++ b/xslt/shearwater.xslt
@@ -108,6 +108,26 @@
<extradata key="gfMax" value="{gfMax}"/>
<xsl:for-each select="diveLogRecords/diveLogRecord">
+ <xsl:if test="(fractionO2 != preceding-sibling::diveLogRecord[1]/fractionO2) or (fractionHe != preceding-sibling::diveLogRecord[1]/fractionHe)">
+ <event name="gaschange">
+ <xsl:attribute name="time">
+ <xsl:call-template name="sec2time">
+ <xsl:with-param name="timeSec">
+ <xsl:value-of select="currentTime"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="o2">
+ <xsl:value-of select="fractionO2"/>
+ </xsl:attribute>
+ <xsl:attribute name="he">
+ <xsl:value-of select="fractionHe"/>
+ </xsl:attribute>
+ </event>
+ </xsl:if>
+ </xsl:for-each>
+
+ <xsl:for-each select="diveLogRecords/diveLogRecord">
<sample>
<xsl:attribute name="time">
<xsl:call-template name="sec2time">