From f6b2fe3bf02038afa06da9e4a4aa27bbf55c2d95 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 19 Nov 2014 22:14:20 +0100 Subject: Add support for importing CEILING from MKVI logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is based on the great work done by Søren Reinke's on his MKVI Logfile Analyzer. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- file.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3-70-g09d2