diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-11-14 12:38:37 +0100 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2017-11-16 08:32:46 +0100 |
commit | 85d00d1e7cdb85f1a40b70023b2025a038979176 (patch) | |
tree | 78c73c07799da6454076016808ad3ca6c78844cf /core/dive.c | |
parent | 0895bccf495f478821c92dc1da00c2f62752f031 (diff) | |
download | subsurface-85d00d1e7cdb85f1a40b70023b2025a038979176.tar.gz |
For surface samples init ndl and compass bearing from prev sample
This avoids printing useless info to the XML file.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/dive.c b/core/dive.c index 5391f3df9..c85b869a3 100644 --- a/core/dive.c +++ b/core/dive.c @@ -1747,6 +1747,9 @@ static void merge_one_sample(struct sample *sample, int time, struct divecompute struct sample *prev = dc->sample + last; int last_time = prev->time.seconds; int last_depth = prev->depth.mm; + /* Init a few values from prev sample to avoid useless info in XML */ + surface.bearing.degrees = prev->bearing.degrees; + surface.ndl.seconds = prev->ndl.seconds; /* * Only do surface events if the samples are more than |