mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
746e6da75a
commit
ef06afde14
1 changed files with 1 additions and 8 deletions
9
dive.c
9
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[])
|
||||
|
|
Loading…
Add table
Reference in a new issue