On Sun, Jun 14, 2015 at 3:24 PM, Linus Torvalds
<[email protected]> wrote:
>
> Our handling of "air time remaining" events is pretty nasty. This is
> not new, but I noticed just because I added support for it to the EON
> steel backend now that the v1.1.15 release has airtime support.
Actually, I take that back.
I think I just misused the SAMPLE_EVENT_AIRTIME in the EON Steel
parser. I think it's meant to be an actual warning event, and
subsurface shows it correctly, and I was wrong to make the EON Steel
parser generate those events.
If we want to actually have a "dive computer reports an air time of X"
(the same way we have the ndl value), I think we'd have to add a new
interface for it.
So I think that we should just remove the EON Steel reporting for now.
Patch attached.
Linus
From 8bf08091ca84ac4e002827f25eb26b8be8e8d190 Mon Sep 17 00:00:00 2001
From: Linus Torvalds <[email protected]>
Date: Sun, 14 Jun 2015 18:56:16 -1000
Subject: [PATCH] EON Steel: don't report airtime remaining as a
libdivecomputer event
It looks like the SAMPLE_EVENT_AIRTIME is actually meant for just
airtime warnings (as in the dive computer warning about low air).
If we ever care, I think we'd need to add a new interface for this.
Signed-off-by: Linus Torvalds <[email protected]>
---
src/suunto_eonsteel_parser.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c
index 7f6a246f0f2e..01aea96617ef 100644
--- a/src/suunto_eonsteel_parser.c
+++ b/src/suunto_eonsteel_parser.c
@@ -520,9 +520,7 @@ static void sample_gastime(struct sample_data *info, short gastime)
if (gastime < 0)
return;
- sample.event.type = SAMPLE_EVENT_AIRTIME;
- sample.event.value = gastime;
- if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, info->userdata);
+ // Hmm. We have no good way to report airtime remaining
}
/*
--
2.4.2.387.gf86f31a
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface