mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Support merging of two adjacent dives
This introduces the notion of merging two disjoint dives: you can select two dives from the dive list, and if the selection is exactly two dives, and they are adjacent (and share the same dive trip), we support the notion of merging the dives into one dive. The most common reason for this is an extended surface event, which made the dive computer decide that the dive was ended, but maybe you were just waiting for a buddy or a student at the surface, and you want to stitch together two dives into one. There are still details to be sorted out: my Suunto dive computers don't actually do surface samples at the beginning or end of the dive, so when you stitch two dives together, the profile ends up being this odd "a couple of feet under water between the two parts of the dive" thing. But that's an independent thing from the actual merging logic, and I'll work on that separately. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cda1b73bf6
commit
8514ec8723
4 changed files with 77 additions and 12 deletions
3
dive.h
3
dive.h
|
@ -321,6 +321,9 @@ extern gboolean autogroup;
|
|||
extern void add_dive_to_trip(struct dive *, dive_trip_t *);
|
||||
extern void remove_dive_from_trip(struct dive *);
|
||||
|
||||
extern void delete_single_dive(int idx);
|
||||
extern void add_single_dive(int idx, struct dive *dive);
|
||||
|
||||
extern void insert_trip(dive_trip_t **trip);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue