From e3ab1c0701fceffa370d56bff187d0c0e90d5d21 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 30 Dec 2012 18:11:01 -0800 Subject: 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 --- dive.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dive.h') 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; }; -- cgit v1.2.3-70-g09d2