diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-11-10 11:56:28 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-10 12:02:33 +0100 |
commit | e29a43681049ef30eb5129f140a1ed0936a9b516 (patch) | |
tree | 4c57c2582e72e42266b7b51ec92276d1b8250347 /uemis-downloader.c | |
parent | 7f515eb7e53c5ab6d8dde4d2e6876464ed7fdeae (diff) | |
parent | 6ad73a8f043be283c07df34c6a5a43fee1b444e8 (diff) | |
download | subsurface-e29a43681049ef30eb5129f140a1ed0936a9b516.tar.gz |
Merge branch 'ceiling-plot'
This enables plotting the ceiling in deco dives and also adds the
necessary code to the uemis importer. The only other dive computer this
has been tested with the OSTC and that needs a libdivecomputer patch in
order to provide the deco/ceiling information to Subsurface.
Fixes #5
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index 5267a0b00..6f85eca59 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -792,7 +792,15 @@ static char *do_uemis_download(struct argument_block *args) if (! uemis_get_answer(mountpath, "processSync", 0, 2, &result)) goto bail; param_buff[1] = "notempty"; - newmax = get_divenr(*max_dive_data, deviceid); + /* if we have an empty divelist then the user will almost + * certainly want to start downloading from the first dive on + * the Uemis; otherwise check which was the last dive + * downloaded */ + if (dive_table.nr > 0) + newmax = get_divenr(*max_dive_data, deviceid); + else + newmax = strdup("0"); + if (sscanf(newmax, "%d", &start) != 1) start = 0; for (;;) { |