aboutsummaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2018-03-05 21:19:42 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-03-13 18:54:16 +0200
commit15b6953438fd45921fe7adc16995eb89d25339a9 (patch)
tree00ff0a9ea10564b23896f532ecc6c738f24199cb /core/dive.c
parent7da214a8c4af92c2027ab70056b14c639a8ac110 (diff)
downloadsubsurface-15b6953438fd45921fe7adc16995eb89d25339a9.tar.gz
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>
Diffstat (limited to 'core/dive.c')
-rw-r--r--core/dive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/dive.c b/core/dive.c
index 9ba180c6f..900677eb4 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -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;
}