aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-11-19 22:14:20 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-19 17:46:53 -0800
commitf6b2fe3bf02038afa06da9e4a4aa27bbf55c2d95 (patch)
tree3e49e3a068cb0ca98ed640e0f52f0423c0a91f48
parent61239a890cce5c50c205aca8988e2fed57fa82b3 (diff)
downloadsubsurface-f6b2fe3bf02038afa06da9e4a4aa27bbf55c2d95.tar.gz
Add support for importing CEILING from MKVI logs
This is based on the great work done by Søren Reinke's on his MKVI Logfile Analyzer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--file.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/file.c b/file.c
index a3903dc0c..e793152a5 100644
--- a/file.c
+++ b/file.c
@@ -243,7 +243,8 @@ enum csv_format {
POSEIDON_SENSOR2,
POSEIDON_PRESSURE,
POSEIDON_O2CYLINDER,
- POSEIDON_NDL
+ POSEIDON_NDL,
+ POSEIDON_CEILING
};
static void add_sample_data(struct sample *sample, enum csv_format type, double val)
@@ -282,6 +283,9 @@ static void add_sample_data(struct sample *sample, enum csv_format type, double
case POSEIDON_NDL:
sample->ndl.seconds = val * 60;
break;
+ case POSEIDON_CEILING:
+ sample->stopdepth.mm = val * 1000;
+ break;
}
}
@@ -620,6 +624,10 @@ int parse_txt_file(const char *filename, const char *csv)
prev_setpoint = value;
add_sample_data(sample, POSEIDON_SETPOINT, value);
break;
+ case 25:
+ //25 Max Ascent depth
+ add_sample_data(sample, POSEIDON_CEILING, value);
+ break;
case 37:
//Remaining dive time #2?
has_ndl = true;