mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do a dive de-dup pass
If given multiple dives at the same time, just de-dup the dives. This happens when you've dumped the whole dive-computer several times, and some dives show up in multiple dumps. When de-duping, try to avoid dropping data. So if one dive has notes attached to it, and the other one does not, pick the notes from the dive that does have them. Obvious stuff like that. The sample merge is also written so that it should be possible to merge two dives. Which we don't actually do yet. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ef0d00e76a
commit
5f05173e79
3 changed files with 181 additions and 5 deletions
|
@ -636,11 +636,6 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
|
|||
nonmatch("dive", name, buf);
|
||||
}
|
||||
|
||||
static unsigned int dive_size(int samples)
|
||||
{
|
||||
return sizeof(struct dive) + samples*sizeof(struct sample);
|
||||
}
|
||||
|
||||
/*
|
||||
* File boundaries are dive boundaries. But sometimes there are
|
||||
* multiple dives per file, so there can be other events too that
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue