summaryrefslogtreecommitdiffstats
path: root/deco.c
diff options
context:
space:
mode:
authorGravatar willem ferguson <willemferguson@zoology.up.ac.za>2014-10-13 21:19:21 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-13 23:15:41 +0200
commitc8eb2dccc5acbd11388373bf70edb2f4e73d2323 (patch)
treef978624e58c084a9db092603ed26c828c0124248 /deco.c
parent5d1bc11ab75eee9f2f79d2cd40132ec1885ee1a6 (diff)
downloadsubsurface-c8eb2dccc5acbd11388373bf70edb2f4e73d2323.tar.gz
CCR patch: Reorganise the oxygen partial pressure calculations
This patch responds to the side effects that the CCR code has had with respect to ceilings in OC dives and dive plans. Dive ceilings are now calculated correctly again. The following were performed: 1) remove the oxygen sensor and setpoint fields from the gas_pressures structure. 2) Re-insert setpoint and oxygen sensor fields in the plot_data structure. 3) Remove the algorithm that reads the o2 sensor data and calculates the pressures.po2 value from function fill_pressures() in dive.c and save it as a separate function calc_ccr_po2() in profile.c. 4) Activate calc_ccr_po2 from function fill_pressures() in profile.c. 5) Move the relative position of the call to fill_pressures() within the function create_polt_info_new() in profile.c. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r--deco.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deco.c b/deco.c
index 42580d317..8dcfb7e8b 100644
--- a/deco.c
+++ b/deco.c
@@ -190,7 +190,7 @@ double add_segment(double pressure, const struct gasmix *gasmix, int period_in_s
int fo2 = get_o2(gasmix), fhe = get_he(gasmix);
struct gas_pressures pressures;
- fill_pressures(&pressures, pressure, gasmix, (double) ccpo2 / 1000.0, &(dive->dc));
+ fill_pressures(&pressures, pressure, gasmix, (double) ccpo2 / 1000.0);
if (buehlmann_config.gf_low_at_maxdepth && pressure > gf_low_pressure_this_dive)
gf_low_pressure_this_dive = pressure;