mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
libdivecomputer: allow a "zero depth" deco stop depth
That just means that we're not in deco, the same way as giving a nonzero NDL value does. But if you don't have NDL, this is a much more convenient way of saying "not in deco". The Garmin Descent gives us stop information, but not necessarily NDL, and really wants this. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
faea11e4fb
commit
5c2bca048f
1 changed files with 1 additions and 1 deletions
|
@ -418,9 +418,9 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
||||||
sample->in_deco = in_deco = false;
|
sample->in_deco = in_deco = false;
|
||||||
} else if (value.deco.type == DC_DECO_DECOSTOP ||
|
} else if (value.deco.type == DC_DECO_DECOSTOP ||
|
||||||
value.deco.type == DC_DECO_DEEPSTOP) {
|
value.deco.type == DC_DECO_DEEPSTOP) {
|
||||||
sample->in_deco = in_deco = true;
|
|
||||||
sample->stopdepth.mm = stopdepth = lrint(value.deco.depth * 1000.0);
|
sample->stopdepth.mm = stopdepth = lrint(value.deco.depth * 1000.0);
|
||||||
sample->stoptime.seconds = stoptime = value.deco.time;
|
sample->stoptime.seconds = stoptime = value.deco.time;
|
||||||
|
sample->in_deco = in_deco = stopdepth > 0;
|
||||||
ndl = 0;
|
ndl = 0;
|
||||||
} else if (value.deco.type == DC_DECO_SAFETYSTOP) {
|
} else if (value.deco.type == DC_DECO_SAFETYSTOP) {
|
||||||
sample->in_deco = in_deco = false;
|
sample->in_deco = in_deco = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue