From 2a2098bab2766eec8e0b1d18e1f965b76ff022b5 Mon Sep 17 00:00:00 2001 From: Willem Ferguson Date: Sat, 7 Apr 2018 17:52:16 +0200 Subject: 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 --- core/profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core') 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 -- cgit v1.2.3-70-g09d2