summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-01-19 11:32:27 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-20 06:16:15 +1200
commit837dcde0c180883e3d75e90459b06bde9789b797 (patch)
treee215894a21c7bc305a2fa6bc4bfd85f018c75bff /profile.c
parent86c961614bfa8ab9057319ea5f22816351a7f61a (diff)
downloadsubsurface-837dcde0c180883e3d75e90459b06bde9789b797.tar.gz
Use SAC from preferences for PSCR oxygen drop
The ratio between SAC and oxygen metabolism rate can be assumed constant but not the metabolism rate. So we better base our calculation on the ratio that uses the SAC from the preferences as that pairs well with the O2 consumption from the preferences. Hence we ran remove the sac parameter from fill_pressures(). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/profile.c b/profile.c
index 8246a961b..026b87187 100644
--- a/profile.c
+++ b/profile.c
@@ -442,9 +442,8 @@ static void check_setpoint_events(struct dive *dive, struct divecomputer *dc, st
}
-struct plot_info calculate_max_limits_new(struct dive *dive)
+struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer *dc)
{
- struct divecomputer *dc = &dive->dc;
static struct plot_info pi;
int maxdepth = dive->maxdepth.mm;
int maxtime = 0;
@@ -946,7 +945,7 @@ static void calculate_gas_information_new(struct dive *dive, struct plot_info *p
amb_pressure = depth_to_mbar(entry->depth, dive) / 1000.0;
- fill_pressures(&entry->pressures, amb_pressure, &dive->cylinder[cylinderindex].gasmix, entry->o2pressure.mbar / 1000.0, dive->dc.divemode, entry->sac);
+ fill_pressures(&entry->pressures, amb_pressure, &dive->cylinder[cylinderindex].gasmix, entry->o2pressure.mbar / 1000.0, dive->dc.divemode);
fn2 = (int)(1000.0 * entry->pressures.n2 / amb_pressure);
fhe = (int)(1000.0 * entry->pressures.he / amb_pressure);