Changeset cef56c6 in subsurface


Ignore:
Timestamp:
May 7, 2017, 4:19:58 AM (3 weeks ago)
Author:
Miika Turkia <miika.turkia@…>
Branches:
master
Children:
6e1c000
Parents:
0dfa448
Message:

Import dive number from Seabear CSV file

Signed-off-by: Miika Turkia <miika.turkia@…>

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/qthelper.cpp

    r0dfa448 rcef56c6  
    15191519
    15201520        /*
     1521         * Parse dive number from Seabear CSV header
     1522         */
     1523
     1524        while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) {
     1525                if (parseLine.contains("//DIVE NR: ")) {
     1526                        qDebug() << "DEBGU: " << parseLine;
     1527                        params[pnr++] = strdup("diveNro");
     1528                        params[pnr++] = strdup(parseLine.replace(QString::fromLatin1("//DIVE NR: "), QString::fromLatin1("")).toUtf8().data());
     1529                        break;
     1530                }
     1531        }
     1532
     1533        /*
    15211534         * Parse header - currently only interested in sample
    15221535         * interval and hardware version. If we have old format
  • xslt/csv2xml.xslt

    rb919a9d rcef56c6  
    2727  <xsl:param name="delta" select="delta"/>
    2828  <xsl:param name="hw" select="hw"/>
     29  <xsl:param name="diveNro" select="diveNro"/>
    2930  <xsl:output method="xml" indent="yes"/>
    3031
     
    112113          </xsl:if>
    113114
     115          <xsl:if test="string-length($diveNro) > 0">
     116            <xsl:attribute name="number">
     117              <xsl:value-of select="$diveNro"/>
     118            </xsl:attribute>
     119          </xsl:if>
     120
    114121          <!-- If the dive is CCR, create oxygen and diluent cylinders -->
    115122
Note: See TracChangeset for help on using the changeset viewer.