diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-30 18:11:01 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-30 18:17:21 -0800 |
commit | e3ab1c0701fceffa370d56bff187d0c0e90d5d21 (patch) | |
tree | a4c3dec2c1de47494f4ceec9e82b8f994c596455 /dive.c | |
parent | 46b64d8e21bd770c908cc883f3627f4f08a2c0a7 (diff) | |
download | subsurface-e3ab1c0701fceffa370d56bff187d0c0e90d5d21.tar.gz |
Update deco handling
This commit makes deco handling in Subsurface more compatible with the way
libdivecomputer creates the data. Previously we assumed that having a
stopdepth or stoptime and no ndl meant that we were in deco. But
libdivecomputer supports many dive computers that provide the deco state
of the diver but with no information about the next stop or the time
needed there. In order to be able to model this in Subsurface this adds an
in_deco flag to the samples. This is only stored to the XML file when it
changes so it doesn't add much overhead but will allow us to display some
deco information on dive computers like the Atomic Aquatics Cobalt or many
of the Suuntos (among others).
The commit also removes the old event based deco code that was commented
out already. And fixes the code so that the deco / ndl information is
stored for the very last sample as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -721,6 +721,8 @@ add_sample_b: sample.stoptime = as->stoptime; if (as->stopdepth.mm) sample.stopdepth = as->stopdepth; + if (as->in_deco) + sample.in_deco = TRUE; merge_one_sample(&sample, at, res); |