summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-03-07 06:40:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-07 10:27:42 -0800
commit27ab7c7707752557ba84efabb2448561cb2f52c3 (patch)
treed9f97d081a10f1900cd96aa65e05c4712c0c1add
parent3e27e494157a3d253cab3572b24a495a90265977 (diff)
downloadsubsurface-27ab7c7707752557ba84efabb2448561cb2f52c3.tar.gz
DM4 import pressure detection fix
Seems that the database can contain either null or empty string when there is no pressure data available. Changing the pressureblob validation to reflect this new information. Since the temperature profile is binary data, we most likely should accept 0 as a valid value. My samples have null in this blob if there is no data so it seems to be different than the pressure blob. But of course there are no guarantees... Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--parse-xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 23b13ffe5..bd22ad018 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1707,9 +1707,9 @@ extern int dm4_dive(void *param, int columns, char **data, char **column)
else
cur_sample->depth.mm = cur_dive->maxdepth.mm;
- if (tempBlob && tempBlob[i])
+ if (tempBlob)
cur_sample->temperature.mkelvin = (tempBlob[i] + 273.15) * 1000;
- if (pressureBlob)
+ if (data[19] && data[19][0])
cur_sample->cylinderpressure.mbar = pressureBlob[i] ;
sample_end();
}