mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Export only used cylinders to divelogs.de
This attempts to export only used cylinders to divelogs.de. The detection is based only on o2 percentage as per our test dives. However, the new cylinder id would be better, but that does not exist on old dives. Fixes #757 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3c9c1ec06f
commit
aa76bbaa97
1 changed files with 12 additions and 0 deletions
|
@ -109,6 +109,17 @@
|
|||
|
||||
<ADDITIONALTANKS>
|
||||
<xsl:for-each select="cylinder[position() != $cylinder]">
|
||||
<xsl:variable name="gas">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@o2 != ''">
|
||||
<xsl:value-of select="substring-before(@o2, '.')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'21'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:if test="following-sibling::divecomputer/event[@name='gaschange' and @value=$gas]">
|
||||
<xsl:variable name="cur_cyl">
|
||||
<xsl:value-of select="position()"/>
|
||||
</xsl:variable>
|
||||
|
@ -147,6 +158,7 @@
|
|||
<xsl:value-of select="substring-before(@he, '%')"/>
|
||||
</HEPCT>
|
||||
</TANK>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</ADDITIONALTANKS>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue