summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Willem Ferguson <willemferguson@zoology.up.ac.za>2018-04-07 17:52:16 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-14 23:47:00 +0300
commit2a2098bab2766eec8e0b1d18e1f965b76ff022b5 (patch)
treed542cf8ca8ddeb34a355d49ef6d64fffde04fe56 /core
parentcad4eb39c4ac0a46dbaab6932e9319704eb90e6d (diff)
downloadsubsurface-2a2098bab2766eec8e0b1d18e1f965b76ff022b5.tar.gz
Implement get_divemode() to find the divemode at a particular time
Replaced a rather cumbersome function that that did the above. Upon the suggestion of Robert Helling who proposed a much shorter way, this new function replaced the previous ones. This necessitated changes to divelist.c, profile.c and plannernotes.c, as well as dive.c/h. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Diffstat (limited to 'core')
-rw-r--r--core/profile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/profile.c b/core/profile.c
index be20c7ac7..229d7867a 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -1220,7 +1220,7 @@ static void calculate_gas_information_new(struct dive *dive, struct divecomputer
fn2 = (int)(1000.0 * entry->pressures.n2 / amb_pressure);
fhe = (int)(1000.0 * entry->pressures.he / amb_pressure);
if (dc->divemode == PSCR) // OC pO2 is calulated for PSCR with or without external PO2 monitoring.
- entry->scr_OC_pO2.mbar = (int) depth_to_mbar(entry->depth, dive) * get_o2(get_gasmix(dive, dc, entry->sec, &ev, gasmix)) / 1000;
+ entry->scr_OC_pO2.mbar = (int) depth_to_mbar(entry->depth, dive) * get_o2(get_gasmix(dive, dc, entry->sec, &evg, gasmix)) / 1000;
/* Calculate MOD, EAD, END and EADD based on partial pressures calculated before
* so there is no difference in calculating between OC and CC