mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Correctly reset stop depth if we receive NDL sample from libdivecomputer
The existing code forgot to reset the stopdepth to 0 which resulted in a bogus safety stop being displayed on some divecomputers after the diver finished their deco obligation. Reported-by: Jan.Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4ddea283a5
commit
59e92d7cfa
1 changed files with 1 additions and 0 deletions
|
@ -249,6 +249,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
|||
case DC_SAMPLE_DECO:
|
||||
if (value.deco.type == DC_DECO_NDL) {
|
||||
sample->ndl.seconds = ndl = value.deco.time;
|
||||
sample->stopdepth.mm = stopdepth = value.deco.depth * 1000.0 + 0.5;
|
||||
sample->in_deco = in_deco = FALSE;
|
||||
} else if (value.deco.type == DC_DECO_DECOSTOP ||
|
||||
value.deco.type == DC_DECO_DEEPSTOP) {
|
||||
|
|
Loading…
Add table
Reference in a new issue