aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-11-19 22:14:21 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-19 17:47:19 -0800
commit7caad0c0dfc05964e99786aa3cbf5b38b012d258 (patch)
tree9728270c6d27e084033874e4300c631440538667 /file.c
parentf6b2fe3bf02038afa06da9e4a4aa27bbf55c2d95 (diff)
downloadsubsurface-7caad0c0dfc05964e99786aa3cbf5b38b012d258.tar.gz
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>
Diffstat (limited to 'file.c')
-rw-r--r--file.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/file.c b/file.c
index e793152a5..85414273a 100644
--- a/file.c
+++ b/file.c
@@ -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;