mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 01:13:24 +00:00
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>
This commit is contained in:
parent
30e10183ca
commit
2120bc3a9e
1 changed files with 20 additions and 0 deletions
20
parse-xml.c
20
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue