mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cad4eb39c4
commit
2a2098bab2
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue