diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-01 21:17:37 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-01 22:29:43 -0400 |
commit | 7c427dcc020064e0ea867c77ee86db6e1f4755bb (patch) | |
tree | a27def977fcbad963d41e0e88dba42c4fb7cad34 /dive.h | |
parent | b5b7bdda81acd0ee8c14a081f8bfd38d9809cec8 (diff) | |
download | subsurface-7c427dcc020064e0ea867c77ee86db6e1f4755bb.tar.gz |
Add support to "split" a dive with surface time in the middle
Right now this requires that
(a) the dive have only one divecomputer associated with it.
Trying to split a dive with multiple dive computers would be *much*
harder to do, since you'd have to try to line up the surface
interval between computers etc. So just don't do it after
downloading multiple dive computers for the same dive.
(b) there must be at least one minute between the sample that came up
to the surface and the sample that goes down again.
If you just peeked your head above the surface, don't try to split
things into two dives. Maybe we can relax this for freediving or
something.
also note that the split dive will only get new numbering if the dive
that was split was the very last dive in the divelist.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -721,6 +721,7 @@ extern void fixup_dc_duration(struct divecomputer *dc); extern int dive_getUniqID(struct dive *d); extern unsigned int dc_airtemp(struct divecomputer *dc); extern unsigned int dc_watertemp(struct divecomputer *dc); +extern int split_dive(struct dive *); extern struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer_downloaded); extern struct dive *try_to_merge(struct dive *a, struct dive *b, bool prefer_downloaded); extern void renumber_dives(int start_nr, bool selected_only); |