diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-03 21:31:22 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-03 21:41:35 -0800 |
commit | 9cd18c43aaaccaa8ba0fbdf8e5a23ad6c7bbeb73 (patch) | |
tree | a13e4deb45f159d30275f3d090beeb6981f9b333 /deco.c | |
parent | 2c336032568cd13bec23fce2500bde551141c3e3 (diff) | |
download | subsurface-9cd18c43aaaccaa8ba0fbdf8e5a23ad6c7bbeb73.tar.gz |
Make GF values configurable
There are a couple of issues with this commit:
GtkEntry should emit the 'changed' signal when it is modified (so that
changes in the preferences get applied right away) - but that doesn't
appear to be working consistently.
Also, this doesn't appear to affect the deco of any dives that I try it
with. So my guess is something is wrong with the underlying deco
algorithm. That's diappointing.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r-- | deco.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -10,6 +10,7 @@ * add_segment(pressure, gasmix, seconds) - add <seconds> at the given pressure, breathing gasmix * deco_allowed_depth(tissues_tolerance, surface_pressure, dive, smooth) * - ceiling based on lead tissue, surface pressure, 3m increments or smooth + * set_gf(gflow, gfhigh) - set Buehlmann gradient factors */ #include <math.h> #include "dive.h" @@ -244,3 +245,11 @@ unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressur return depth; } + +void set_gf(double gflow, double gfhigh) +{ + if (gflow != -1.0) + buehlmann_config.gf_low = gflow; + if (gfhigh != -1.0) + buehlmann_config.gf_high = gfhigh; +} |