aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Marc Arndt <marc@marcarndt.com>2017-08-15 15:14:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-08-29 06:50:18 -0700
commitac7e60b456780eac30e067c958b7302cf747b2e7 (patch)
treea49a600949160916a043426ae1f0512be4b5603f
parentaed5b7d26708d9559effc27ed2d3b3656f5bc738 (diff)
downloadsubsurface-ac7e60b456780eac30e067c958b7302cf747b2e7.tar.gz
Ignore Divesoft Button Press Events
Prevent button press events from showing on the profile graph when we import divesoft DLF files. Reported-by: Marc Arndt Signed-off-by: Marc Arndt <marc@marcarndt.com>
-rw-r--r--core/parse-xml.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c
index 1fbf7f37e..97cd71d5c 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -3628,6 +3628,10 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
case 3: /* diver error */
case 4: /* internal error */
case 5: /* device activity log */
+ //Event 18 is a button press. Lets ingore that event.
+ if (ptr[4] == 18)
+ continue;
+
event_start();
cur_event.time.seconds = time;
switch (ptr[4]) {