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>
This commit is contained in:
Anton Lundin 2013-11-20 20:24:36 +01:00 committed by Dirk Hohndel
parent 746e6da75a
commit ef06afde14

9
dive.c
View file

@ -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[])