diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-24 13:59:11 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-14 22:40:14 -0600 |
commit | 5b14ed16accc39a1ed46f894404b10655576e386 (patch) | |
tree | a9c4ad2021f2f64be4b38c69a87dbea82f9b5c05 /libdivecomputer.c | |
parent | 87ca15c5c35f32049f66f3cb2da1dc723bc5c1a9 (diff) | |
download | subsurface-5b14ed16accc39a1ed46f894404b10655576e386.tar.gz |
Add "download into private trip" dialog checkmark
This adds a checkbox for the divecomputer download dialog that allows you
to tell the download to put the newly downloaded dives into a trip of
their own. That in turn will disable the dive merging with any existing
dives, which means that you will not mix up your newly downloaded dives
with any old dives.
That, in turn, is very convenient of you know that some of the dives were
done by other divers (or from testing that happened during servicing etc),
or the dive dates etc were wrong because the dive computer date had reset
due to battery changes etc.
Once you have all the dives in a private trip of their own, you can then
fix them up (delete dives you don't want to merge etc), and then after all
the data is ok you might want to merge the cleaned-up results with
previous trips etc, and then manually ask subsurface to merge the dives or
whatever.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r-- | libdivecomputer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index 0011a201d..401fd8a6f 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -515,6 +515,13 @@ static int dive_cb(const unsigned char *data, unsigned int size, dive->dc.sample[0].temperature.mkelvin = 0; } + if (devdata->create_new_trip) { + if (!devdata->trip) + devdata->trip = create_and_hookup_trip_from_dive(dive); + else + add_dive_to_trip(dive, devdata->trip); + } + dive->downloaded = true; record_dive(dive); mark_divelist_changed(true); |