[PATCH] More events from Suunto DM4 added
Miika Turkia
miika.turkia at gmail.com
Wed Mar 6 21:23:40 PST 2013
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 at gmail.com>
---
parse-xml.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/parse-xml.c b/parse-xml.c
index 6c63937..bd22ad0 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;
}
}
--
1.7.9.5
More information about the subsurface
mailing list