diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-11-11 14:29:26 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-11 14:29:26 +0100 |
commit | fe4f13f184ffb97ee4b6dbd4138a9d8ae3aabd14 (patch) | |
tree | ae127ca3591cb72b86bd1b512134086902e140cd /libdivecomputer.h | |
parent | 78ad07c72ed37928020cdbf4842e24690ce35f81 (diff) | |
download | subsurface-fe4f13f184ffb97ee4b6dbd4138a9d8ae3aabd14.tar.gz |
Add special download modes to force updates from the divecomputer
This will hopefully not be something we need often, but if we improve
support for a divecomputer (either in libdivecomputer or in our native
Uemis code or even in the way we handle (and potentially discard) events),
then it is extremely useful to be able to say "re-download things
from the divecomputer and for things that were not edited in Subsurface,
don't try to merge the data (which gives BAD results if for example you
fixed a bug in the depth calculation in libdivecomputer) but instead
simply take the samples, the events and some of the other unedited data
straight from the download".
This commit implements just that - a "force download" checkbox in the
download dialog that makes us reimport all dives from the dive computer,
even the ones we already have, and an "always prefer downloaded dive"
checkbox that then tells Subsurface not to merge but simply to take the
data from the downloaded dive - without overwriting the things we have
already edited in Subsurface (like location, buddy, equipment, etc).
This, as a precaution, refuses to merge dives that don't have identical
start times. So if you have edited the date / time of a dive or if you
have previously merged your dive with a different dive computer (and
therefore modified samples and events) you are out of luck.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.h')
-rw-r--r-- | libdivecomputer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libdivecomputer.h b/libdivecomputer.h index 6430c8448..7497abf11 100644 --- a/libdivecomputer.h +++ b/libdivecomputer.h @@ -17,6 +17,7 @@ typedef struct device_data_t { dc_context_t *context; progressbar_t progress; int preexisting; + gboolean force_download; } device_data_t; extern GError *do_import(device_data_t *data); |