mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
61239a890c
commit
f6b2fe3bf0
1 changed files with 9 additions and 1 deletions
10
file.c
10
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue