From: Linus Torvalds <[email protected]>
Date: Sat, 3 Jan 2015 17:09:45 -0800
Subject: [PATCH 2/2] EON Steel: expose the gas switch cylinder in the "flags" 
field

This seems to be the simplest extension to the SAMPLE_EVENT_GASCHANGE2
format: the "value" remains the oddly encoded gas mix, but the "flags"
value (if non-zero) now contains the actual cylinder number we switch
to.

This will need a trivial patch to subsurface to take advantage of the
new data too.  But then we can actually distinguish between cylinders
that have the same gas mix.

Signed-off-by: Linus Torvalds <[email protected]>
---

Hey, it sure is simple. 

 src/suunto_eonsteel_parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c
index 6296b2642ba0..40e3feb02a35 100644
--- a/src/suunto_eonsteel_parser.c
+++ b/src/suunto_eonsteel_parser.c
@@ -325,6 +325,7 @@ static void sample_gas_switch_event(struct sample_data 
*info, unsigned short idx
 
        sample.event.type = SAMPLE_EVENT_GASCHANGE2;
        sample.event.value = o2 | (he << 16);
+       sample.event.flags = idx;
 
        if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, 
info->userdata);
 }
-- 
2.2.1.212.gc5b9256

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to