This is based on the great work done by Søren Reinke's on his MKVI Logfile
Analyzer.

Signed-off-by: Anton Lundin <gla...@acc.umu.se>
---
 file.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/file.c b/file.c
index f9475b7..b706566 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;
-- 
1.9.1

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to