1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Create events from mouthpiece position

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:
Anton Lundin 2014-11-19 22:14:21 +01:00 committed by Dirk Hohndel
parent f6b2fe3bf0
commit 7caad0c0df

21
file.c
View file

@ -592,6 +592,27 @@ int parse_txt_file(const char *filename, const char *csv)
switch (i) {
case 3:
switch (type) {
case 0:
//MouthPiece position event: 0=OC, 1=CC, 2=UN, 3=NC
switch (value) {
case 0:
add_event(dc, cur_sampletime, 0, 0, 0,
QT_TRANSLATE_NOOP("gettextFromC", "MouthPiece position OC"));
break;
case 1:
add_event(dc, cur_sampletime, 0, 0, 0,
QT_TRANSLATE_NOOP("gettextFromC", "MouthPiece position CC"));
break;
case 2:
add_event(dc, cur_sampletime, 0, 0, 0,
QT_TRANSLATE_NOOP("gettextFromC", "MouthPiece position UN"));
break;
case 3:
add_event(dc, cur_sampletime, 0, 0, 0,
QT_TRANSLATE_NOOP("gettextFromC", "MouthPiece position NC"));
break;
}
break;
case 6:
add_sample_data(sample, POSEIDON_SENSOR1, value);
break;