diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-08 21:20:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-08 21:23:45 -0800 |
commit | 8dfc4dccc5b74626100952cf78fec8b10751fa33 (patch) | |
tree | 430b7d8469205f9521361ab556e82a761e23beb1 | |
parent | 07b74007f1731b6557ec05300d5734970fb9d29c (diff) | |
download | subsurface-8dfc4dccc5b74626100952cf78fec8b10751fa33.tar.gz |
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>
-rw-r--r-- | profile.c | 5 |
1 files changed, 5 insertions, 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) |