[PATCH] Remove duplicate of add_gas_switch_event in dive.c
Anton Lundin
glance at acc.umu.se
Wed Nov 20 11:24:36 UTC 2013
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
dive.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/dive.c b/dive.c
index 8ce1c95..bc62858 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[])
--
1.8.3.2
More information about the subsurface
mailing list