[PATCH 3/4] Correctly tag a CSV imported CCR dive as CCR
Anton Lundin
glance at acc.umu.se
Sat Jun 27 14:38:12 PDT 2015
This looks if we're importing any o2 values form the csv file, then its
probably a CCR dive.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
xslt/csv2xml.xslt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt
index b3dbc7a..e13d0a9 100644
--- a/xslt/csv2xml.xslt
+++ b/xslt/csv2xml.xslt
@@ -43,6 +43,9 @@
<xsl:value-of select="concat(substring($time, 2, 2), ':', substring($time, 4, 2))"/>
</xsl:attribute>
<divecomputer model="Imported from CSV" deviceid="ffffffff">
+ <xsl:if test="$po2Field >= 0 or $o2sensor1Field >= 0 or $o2sensor2Field >= 0 or $o2sensor3Field >= 0">
+ <xsl:attribute name="dctype">CCR</xsl:attribute>
+ </xsl:if>
<xsl:call-template name="printLine">
<xsl:with-param name="line" select="substring-before(//csv, $lf)"/>
<xsl:with-param name="lineno" select="'1'"/>
--
2.1.4
More information about the subsurface
mailing list