mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
07b74007f1
commit
8dfc4dccc5
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue