aboutsummaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-30 18:11:01 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-30 18:17:21 -0800
commite3ab1c0701fceffa370d56bff187d0c0e90d5d21 (patch)
treea4c3dec2c1de47494f4ceec9e82b8f994c596455 /dive.h
parent46b64d8e21bd770c908cc883f3627f4f08a2c0a7 (diff)
downloadsubsurface-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.h')
-rw-r--r--dive.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 1191ec6b6..34b1ec549 100644
--- a/dive.h
+++ b/dive.h
@@ -230,6 +230,7 @@ struct sample {
duration_t ndl;
duration_t stoptime;
depth_t stopdepth;
+ gboolean in_deco;
int cns;
int po2;
};