Set proper gas type on UDDF import

Use type 25 on UDDF import when the gas mix contains some helium.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-07-16 16:53:25 +03:00 committed by Dirk Hohndel
parent 004b9d72c5
commit cd4dc503fc

View file

@ -301,7 +301,18 @@
<xsl:value-of select="../../equipment_used/tank_used[@id=$tank_idx]/gas_ref/@ref"/>
</xsl:variable>
<event name="gaschange" type="11">
<xsl:variable name="type">
<xsl:choose>
<xsl:when test="translate(//gas_def/gas_mix[@id=$idx]/o2, ',', '.') &gt; 0">
<xsl:value-of select="25"/> <!-- SAMPLE_EVENT_GASCHANGE2 -->
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="11"/> <!-- SAMPLE_EVENT_GASCHANGE -->
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<event name="gaschange" type="{$type}">
<xsl:attribute name="time">
<xsl:call-template name="timeConvert">
<xsl:with-param name="timeSec">
@ -327,7 +338,18 @@
<xsl:value-of select="./@ref"/>
</xsl:variable>
<event name="gaschange" type="11">
<xsl:variable name="type">
<xsl:choose>
<xsl:when test="translate(//gasdefinitions/mix[@id=$idx]/he|//u:gasdefinitions/u:mix[@id=$idx]/u:he|//u1:gasdefinitions/u1:mix[@id=$idx]/u1:he, ',', '.') &gt; 0">
<xsl:value-of select="25"/> <!-- SAMPLE_EVENT_GASCHANGE2 -->
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="11"/> <!-- SAMPLE_EVENT_GASCHANGE -->
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<event name="gaschange" type="{$type}">
<xsl:attribute name="time">
<xsl:call-template name="timeConvert">
<xsl:with-param name="timeSec">