Fix DivingLog import

DivingLog seems to report cylinder start and end pressures in metric
format, but sample readings are in imperial in case user has selected
this unit. So we must convert the sample pressures in this case.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2017-04-09 15:02:25 +03:00 committed by Dirk Hohndel
parent e355037e20
commit 360cd85445

View file

@ -211,7 +211,14 @@
Until further information, just grab "randomly" the first
pressure reading -->
<xsl:attribute name="pressure">
<xsl:value-of select="Press1"/>
<xsl:choose>
<xsl:when test="$depthUnit = 'imperial'">
<xsl:value-of select="concat(format-number((Press1 div 14.5037738007), '#.##'), ' bar')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Press1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="depth">
<xsl:call-template name="depthConvert">