summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-11-19 22:14:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-19 17:50:10 -0800
commite2c9c0bec428db617a73fd88609c677078fa57c1 (patch)
tree17485db4e16a636a6fcf63202d71bf53e71d6661 /file.c
parent8486a3251543d1afb391425d3d193a51c3bd1190 (diff)
downloadsubsurface-e2c9c0bec428db617a73fd88609c677078fa57c1.tar.gz
Create more events from Poseidon 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>
Diffstat (limited to 'file.c')
-rw-r--r--file.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/file.c b/file.c
index f9475b71f..b706566be 100644
--- a/file.c
+++ b/file.c
@@ -616,6 +616,17 @@ int parse_txt_file(const char *filename, const char *csv)
QT_TRANSLATE_NOOP("gettextFromC", "MouthPiece position NC"));
break;
}
+ case 3:
+ //Power Off event
+ add_event(dc, cur_sampletime, 0, 0, 0,
+ QT_TRANSLATE_NOOP("gettextFromC", "Power off"));
+ break;
+ case 4:
+ //Battery State of Charge in %
+#ifdef SAMPLE_EVENT_BATTERY
+ add_event(dc, cur_sampletime, SAMPLE_EVENT_BATTERY, 0,
+ value, QT_TRANSLATE_NOOP("gettextFromC", "battery"));
+#endif
break;
case 6:
add_sample_data(sample, POSEIDON_SENSOR1, value);
@@ -628,6 +639,11 @@ int parse_txt_file(const char *filename, const char *csv)
prev_depth = value;
add_sample_data(sample, POSEIDON_DEPTH, value);
break;
+ case 11:
+ //Ascent Rate Alert >10 m/s
+ add_event(dc, cur_sampletime, SAMPLE_EVENT_ASCENT, 0, 0,
+ QT_TRANSLATE_NOOP("gettextFromC", "ascent"));
+ break;
case 13:
add_sample_data(sample, POSEIDON_O2CYLINDER, value);
if (!o2cylinder_pressure) {
@@ -649,10 +665,23 @@ int parse_txt_file(const char *filename, const char *csv)
prev_setpoint = value;
add_sample_data(sample, POSEIDON_SETPOINT, value);
break;
+ case 22:
+ //End of O2 calibration Event: 0 = OK, 2 = Failed, rest of dive setpoint 1.0
+ if (value == 2)
+ add_event(dc, cur_sampletime, 0, SAMPLE_FLAGS_END, 0,
+ QT_TRANSLATE_NOOP("gettextFromC", "O2 calibration failed"));
+ add_event(dc, cur_sampletime, 0, SAMPLE_FLAGS_END, 0,
+ QT_TRANSLATE_NOOP("gettextFromC", "O2 calibration"));
+ break;
case 25:
//25 Max Ascent depth
add_sample_data(sample, POSEIDON_CEILING, value);
break;
+ case 31:
+ //Start of O2 calibration Event
+ add_event(dc, cur_sampletime, 0, SAMPLE_FLAGS_BEGIN, 0,
+ QT_TRANSLATE_NOOP("gettextFromC", "O2 calibration"));
+ break;
case 37:
//Remaining dive time #2?
has_ndl = true;