aboutsummaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2016-05-31 09:57:20 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-31 10:16:20 -0700
commit7bbd8cc9744d2a083569c46bd0c546a107f12023 (patch)
tree055c5020cbba0620e2a8884288c5ff7b728ebdd2 /core/libdivecomputer.c
parent25829721211d8e9295cd3539b3ef05ee49a968e0 (diff)
downloadsubsurface-7bbd8cc9744d2a083569c46bd0c546a107f12023.tar.gz
Don't ignore surface events from libdivecomputer
There are cases where we actually want to keep them, as exemplified by this situation from Richard Yorke: "I have just come across a situation when ignoring the surface marker is a disadvantage. I have just had a problem with my BC feed seeping, slowly filling my BC and as I control my buoyancy on the bottom using the air in my drysuit, I did not notice, so that when I came to ascend the expanding air in my BC caused a loss of control. Fortunately not from a great depth and no untoward consequences. However, the Subsurface profile only shows me rising to 4m and descending to 5.5m for my safety stop. However I actually broke the surface and descented to 5.5 but the frequency of recording depth was not fast enough to show this as it was so brief" so remove the code that ignores the surface events entirely. I think we'll have to come up with some smarter filtering model for showing them, but that is predicated on getting these events to come through in the first place. Reported-by: Richard Yorke <yorke.richard@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r--core/libdivecomputer.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 549b894ce..e7f88a517 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -208,14 +208,6 @@ static void handle_event(struct divecomputer *dc, struct sample *sample, dc_samp
};
const int nr_events = sizeof(events) / sizeof(const char *);
const char *name;
- /*
- * Just ignore surface events. They are pointless. What "surface"
- * means depends on the dive computer (and possibly even settings
- * in the dive computer). It does *not* necessarily mean "depth 0",
- * so don't even turn it into that.
- */
- if (value.event.type == SAMPLE_EVENT_SURFACE)
- return;
/*
* Other evens might be more interesting, but for now we just print them out.