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>
This commit is contained in:
Stefan Fuchs 2017-11-14 12:38:37 +01:00 committed by Jan Mulder
parent 0895bccf49
commit 85d00d1e7c

View file

@ -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