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>
This commit is contained in:
Dirk Hohndel 2012-12-28 18:39:01 -08:00
parent fd983a0992
commit 2287dc87cf

View file

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