diff options
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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[]) |