[PATCH] Record ppO2 only when on CCR mode

Miika Turkia miika.turkia at gmail.com
Sat Dec 6 11:38:28 PST 2014


Shearwater describes the current mode with tag currentCircuitSetting,
thus we should record the ppO2 only when in CCR mode.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 xslt/shearwater.xslt | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/xslt/shearwater.xslt b/xslt/shearwater.xslt
index 3083037..2bbe564 100644
--- a/xslt/shearwater.xslt
+++ b/xslt/shearwater.xslt
@@ -103,16 +103,18 @@
               </xsl:otherwise>
             </xsl:choose>
           </xsl:attribute>
-          <xsl:attribute name="po2">
-            <xsl:choose>
-              <xsl:when test="$units = 'imperial'">
-                <xsl:value-of select="concat(averagePPO2 div 14.5037738, ' bar')"/>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:value-of select="concat(averagePPO2, ' bar')"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
+          <xsl:if test="currentCircuitSetting = 0">
+            <xsl:attribute name="po2">
+              <xsl:choose>
+                <xsl:when test="$units = 'imperial'">
+                  <xsl:value-of select="concat(averagePPO2 div 14.5037738, ' bar')"/>
+                </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="concat(averagePPO2, ' bar')"/>
+                </xsl:otherwise>
+              </xsl:choose>
+            </xsl:attribute>
+          </xsl:if>
         </sample>
       </xsl:for-each>
     </dive>
-- 
1.9.1



More information about the subsurface mailing list