mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
8486a32515
commit
e2c9c0bec4
1 changed files with 29 additions and 0 deletions
29
file.c
29
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;
|
||||
|
|
Loading…
Reference in a new issue