mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
fe4f13f184
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>
25 lines
612 B
C
25 lines
612 B
C
#ifndef LIBDIVECOMPUTER_H
|
|
#define LIBDIVECOMPUTER_H
|
|
|
|
/* libdivecomputer */
|
|
#include <libdivecomputer/device.h>
|
|
#include <libdivecomputer/parser.h>
|
|
|
|
/* handling uemis Zurich SDA files */
|
|
#include "uemis.h"
|
|
|
|
/* don't forget to include the UI toolkit specific display-XXX.h first
|
|
to get the definition of progressbar_t */
|
|
typedef struct device_data_t {
|
|
dc_descriptor_t *descriptor;
|
|
const char *vendor, *product, *devname;
|
|
dc_device_t *device;
|
|
dc_context_t *context;
|
|
progressbar_t progress;
|
|
int preexisting;
|
|
gboolean force_download;
|
|
} device_data_t;
|
|
|
|
extern GError *do_import(device_data_t *data);
|
|
|
|
#endif
|