mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use the current dive mode instead of constant
In the if case above, we already conclude its a OC dive, but its cleaner to actually pass the current mode instead of a hard coded value. This also makes the code less prune to future bugs. Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
7da214a8c4
commit
15b6953438
1 changed files with 1 additions and 1 deletions
|
@ -1030,7 +1030,7 @@ void update_setpoint_events(struct dive *dive, struct divecomputer *dc)
|
|||
gasmix = get_gasmix_from_event(dive, ev);
|
||||
next = get_next_event(ev, "gaschange");
|
||||
}
|
||||
fill_pressures(&pressures, calculate_depth_to_mbar(dc->sample[i].depth.mm, dc->surface_pressure, 0), gasmix ,0, OC);
|
||||
fill_pressures(&pressures, calculate_depth_to_mbar(dc->sample[i].depth.mm, dc->surface_pressure, 0), gasmix ,0, dc->divemode);
|
||||
if (abs(dc->sample[i].setpoint.mbar - (int)(1000 * pressures.o2)) <= 50)
|
||||
dc->sample[i].setpoint.mbar = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue