summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-20 20:24:36 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-20 11:29:48 -0800
commitef06afde143cc6bb9a099b388c8d4855462aa761 (patch)
treedc88577bd83920d5387852af16a135721bb7f43e /dive.c
parent746e6da75af471cf674133a1fb7fa6d9814c8f9e (diff)
downloadsubsurface-ef06afde143cc6bb9a099b388c8d4855462aa761.tar.gz
Remove duplicate of add_gas_switch_event in dive.c
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/dive.c b/dive.c
index 8ce1c950f..bc628589d 100644
--- a/dive.c
+++ b/dive.c
@@ -1176,20 +1176,13 @@ static int find_cylinder_match(cylinder_t *cyl, cylinder_t array[], unsigned int
/* Force an initial gaschange event to the (old) gas #0 */
static void add_initial_gaschange(struct dive *dive, struct divecomputer *dc)
{
- int o2, he, value;
struct event *ev = get_next_event(dc->events, "gaschange");
if (ev && ev->time.seconds < 30)
return;
/* Old starting gas mix */
- o2 = get_o2(&dive->cylinder[0].gasmix);
- he = get_he(&dive->cylinder[0].gasmix);
- o2 = (o2 + 5) / 10;
- he = (he + 5) / 10;
- value = o2 + (he << 16);
-
- add_event(dc, 0, 25, 0, value, "gaschange"); /* SAMPLE_EVENT_GASCHANGE2 */
+ add_gas_switch_event(dive, dc, 0, 0);
}
static void dc_cylinder_renumber(struct dive *dive, struct divecomputer *dc, int mapping[])