summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-28 18:39:01 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-28 18:39:01 -0800
commit2287dc87cfc64ecd58c6c6f82bd59203ace085d2 (patch)
treed6524bec76e96048ce2c60c1a11c2f7179868d5f /libdivecomputer.c
parentfd983a0992b285963d6f91ea1c99abfa2d269f60 (diff)
downloadsubsurface-2287dc87cfc64ecd58c6c6f82bd59203ace085d2.tar.gz
When libdivecomputer reports a DECOSTOP or DEEPSTOP, set ndl to 0
Without this deco could be mistaken as safety stop (in the case where between two samples we go from a positive ndl to suddenly having a stop - so we never reach ndl of 0) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index de6a84feb..7b3087f9d 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -270,6 +270,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
value.deco.type == DC_DECO_DEEPSTOP) {
stopdepth = value.deco.depth * 1000.0 + 0.5;
stoptime = value.deco.time;
+ ndl = 0;
}
#endif
default: