mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Export additional tanks to divelogs.de
All recorded cylinders are exported to divelogs.de. This potentially includes cylinders that have not been used. The start and end pressure for additional cylinders is taken from the cylinder information. Main tank gets this information from first and last pressure reading or from the cylinder information if samples are not available. This should be ok when there is only one cylinder with pressure sensor, but does not probably work for people having multiple sensors. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bc9df4652f
commit
8ae5b816bd
1 changed files with 46 additions and 0 deletions
|
@ -107,6 +107,49 @@
|
|||
</xsl:choose>
|
||||
</CYLINDERENDPRESSURE>
|
||||
|
||||
<ADDITIONALTANKS>
|
||||
<xsl:for-each select="cylinder[position() != $cylinder]">
|
||||
<xsl:variable name="cur_cyl">
|
||||
<xsl:value-of select="position()"/>
|
||||
</xsl:variable>
|
||||
|
||||
<TANK>
|
||||
<CYLINDERDESCRIPTION>
|
||||
<xsl:value-of select="@description"/>
|
||||
</CYLINDERDESCRIPTION>
|
||||
|
||||
<xsl:variable name="dbl">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring(@description, 1, 1) = 'D' and substring-before(substring(@description, 2), ' ') * 2 = substring-before(@size, ' ')">
|
||||
<xsl:value-of select="'2'"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'1'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<DBLTANK>
|
||||
<xsl:value-of select="$dbl - 1"/>
|
||||
</DBLTANK>
|
||||
<CYLINDERSIZE>
|
||||
<xsl:value-of select="substring-before(@size, ' ') div $dbl"/>
|
||||
</CYLINDERSIZE>
|
||||
<CYLINDERSTARTPRESSURE>
|
||||
<xsl:value-of select="@start"/>
|
||||
</CYLINDERSTARTPRESSURE>
|
||||
<CYLINDERENDPRESSURE>
|
||||
<xsl:value-of select="@end"/>
|
||||
</CYLINDERENDPRESSURE>
|
||||
<O2PCT>
|
||||
<xsl:value-of select="substring-before(@o2, '%')"/>
|
||||
</O2PCT>
|
||||
<HEPCT>
|
||||
<xsl:value-of select="substring-before(@he, '%')"/>
|
||||
</HEPCT>
|
||||
</TANK>
|
||||
</xsl:for-each>
|
||||
</ADDITIONALTANKS>
|
||||
|
||||
<WEIGHT>
|
||||
<xsl:call-template name="sum">
|
||||
<xsl:with-param name="values" select="weightsystem/@weight"/>
|
||||
|
@ -115,6 +158,9 @@
|
|||
<O2PCT>
|
||||
<xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@o2, '%')"/>
|
||||
</O2PCT>
|
||||
<HEPCT>
|
||||
<xsl:value-of select="substring-before(cylinder[position() = $cylinder]/@he, '%')"/>
|
||||
</HEPCT>
|
||||
<LOGNOTES>
|
||||
<xsl:value-of select="notes"/>
|
||||
</LOGNOTES>
|
||||
|
|
Loading…
Add table
Reference in a new issue