diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 45e402fc7..238a0bc11 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -1582,6 +1582,37 @@ int parse_seabear_header(const char *filename, char **params, int pnr) } f.seek(0); + /* + * Grabbing some fields for the extradata + */ + + while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) { + QString needle = "//Firmware Version: "; + if (parseLine.contains(needle)) { + params[pnr++] = strdup("Firmware"); + params[pnr++] = strdup(parseLine.replace(needle, QString::fromLatin1("")).prepend("\"").append("\"").toUtf8().data()); + } + } + f.seek(0); + + while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) { + QString needle = "//Serial number: "; + if (parseLine.contains(needle)) { + params[pnr++] = strdup("Serial"); + params[pnr++] = strdup(parseLine.replace(needle, QString::fromLatin1("")).prepend("\"").append("\"").toUtf8().data()); + } + } + f.seek(0); + + while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) { + QString needle = "//GF: "; + if (parseLine.contains(needle)) { + params[pnr++] = strdup("GF"); + params[pnr++] = strdup(parseLine.replace(needle, QString::fromLatin1("")).prepend("\"").append("\"").toUtf8().data()); + } + } + f.seek(0); + while ((parseLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) { } diff --git a/dives/TestDiveSeabearNewFormat.xml b/dives/TestDiveSeabearNewFormat.xml index 626f07ed6..12585a3f2 100644 --- a/dives/TestDiveSeabearNewFormat.xml +++ b/dives/TestDiveSeabearNewFormat.xml @@ -9,6 +9,9 @@ + + + @@ -213,6 +216,9 @@ + + + @@ -417,6 +423,8 @@ + + @@ -1348,6 +1356,8 @@ + + @@ -1554,6 +1564,9 @@ + + + @@ -1758,6 +1771,9 @@ + + + @@ -1962,6 +1978,9 @@ + + + @@ -2166,6 +2185,8 @@ + + @@ -3097,6 +3118,8 @@ + + diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index efe7c37ef..e3864025e 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -28,6 +28,9 @@ + + + @@ -162,6 +165,30 @@ + + + + + + + + + + + + + + + + + + + + + + + +