summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-03-07 07:23:40 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-07 10:21:55 -0800
commit2120bc3a9e1729b3d7374725260f5e8603d9fa4f (patch)
tree76975b6cd2884bc25426f194d547a3d95b471b2f /parse-xml.c
parent30e10183caa3adaf088b9677b628c1d3512dfaf5 (diff)
downloadsubsurface-2120bc3a9e1729b3d7374725260f5e8603d9fa4f.tar.gz
More events from Suunto DM4 added
I got a few more events from a new sample database. Bookmark heading is now shown if such information is stored. Also the unknown events display the event number for easier identification. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 80a12442e..23b13ffe5 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1563,6 +1563,18 @@ extern int dm4_events(void *handle, int columns, char **data, char **column)
/* 5 Ceiling broken */
cur_event.name = strdup("violation");
break;
+ case 6:
+ /* 6 Mandatory safety stop ceiling error */
+ cur_event.name = strdup("violation");
+ break;
+ case 8:
+ /* 8 Dive time alarm */
+ cur_event.name = strdup("divetime");
+ break;
+ case 9:
+ /* 9 Depth alarm */
+ cur_event.name = strdup("maxdepth");
+ break;
case 10:
/* 10 OLF 80% */
case 11:
@@ -1581,12 +1593,20 @@ extern int dm4_events(void *handle, int columns, char **data, char **column)
/* 19 Surfaced */
cur_event.name = strdup("surface");
break;
+ case 257:
+ /* 257 Dive active */
+ /* This seems to be given after surface
+ * when descending again. Ignoring it. */
+ break;
case 258:
/* 258 Bookmark */
cur_event.name = strdup("bookmark");
+ if (data[3])
+ cur_event.value = atoi(data[3]);
break;
default:
cur_event.name = strdup("unknown");
+ cur_event.value = atoi(data[2]);
break;
}
}