From 85d00d1e7cdb85f1a40b70023b2025a038979176 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Tue, 14 Nov 2017 12:38:37 +0100 Subject: 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 --- core/dive.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') 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 -- cgit v1.2.3-70-g09d2