diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-09-14 21:00:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-15 08:52:55 -0700 |
commit | 518ec33ba3bf9c5e9966ef108c1673223337b0fa (patch) | |
tree | 5385872d4a99caa93571fe219414e11f704211d5 /libdivecomputer.c | |
parent | 5f13a87cbd0494cd8edc94f4af9281ce9de89d6e (diff) | |
download | subsurface-518ec33ba3bf9c5e9966ef108c1673223337b0fa.tar.gz |
First pass to parse uemis Zurich '.SDA' files
This is missing a ton of the information in the .SDA files It only
parses the divelog.SDA file, not the dive.SDA file It ignores the
information on the gas(es) used and all the data on the tanks.
It still draws some strange artefacts at the end of the dive
But it correctly hooks into the import dialogue, it gives you a file
select box (somewhere, I'm sure, a gtk developer cries quietly) and then
parses enough of this file to serve as a proof of concept.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r-- | libdivecomputer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index 06ab06639..2b62fa365 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -18,6 +18,9 @@ #include <atomics.h> #include <utils.h> +/* handling uemis Zurich SDA files */ +#include "uemis.h" + /* * I'd love to do a while-loop here for pending events, but * that seems to screw up with the dive computer reading timing. @@ -437,6 +440,10 @@ static void do_import(device_data_t *data) device_t *device = NULL; device_status_t rc; + if (data->type == DEVICE_TYPE_UEMIS) { + return uemis_import(); + } + rc = device_open(data->devname, data->type, &device); if (rc != DEVICE_STATUS_SUCCESS) { error("Unable to open %s (%s)", data->name, data->devname); @@ -502,6 +509,7 @@ struct device_list { { "Cressi Edy", DEVICE_TYPE_CRESSI_EDY }, { "Zeagle N2iTiON 3", DEVICE_TYPE_ZEAGLE_N2ITION3 }, { "Atomics Cobalt", DEVICE_TYPE_ATOMICS_COBALT }, + { "Uemis Zurich SDA", DEVICE_TYPE_UEMIS }, { NULL } }; |