Don't print an initial gaschange event that just tells us the gas used

Some dive computers appear to tell us the gas used in a gaschange event
right at the beginning of the dive. We arbitrary have a cut-off that says
"a gas change in the first 30 seconds shouldn't get a marker".

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-12-08 21:20:00 -08:00
parent 07b74007f1
commit 8dfc4dccc5

View file

@ -357,6 +357,11 @@ static void plot_one_event(struct graphics_context *gc, struct plot_info *pi, st
}
}
}
if (event->time.seconds < 30 && !strcmp(event->name, "gaschange"))
/* a gas change in the first 30 seconds is the way of some dive computers
* to tell us the gas that is used; let's not plot a marker for that */
return;
for (i = 0; i < pi->nr; i++) {
struct plot_data *data = pi->entry + i;
if (event->time.seconds < data->sec)