From 2287dc87cfc64ecd58c6c6f82bd59203ace085d2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 28 Dec 2012 18:39:01 -0800 Subject: 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 --- libdivecomputer.c | 1 + 1 file changed, 1 insertion(+) 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: -- cgit v1.2.3-70-g09d2