From f0e695b0891ccf9ebf039ed5fa5482ebcea1170a Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 3 Jan 2015 17:09:45 -0800 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- 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 afa99d6..86a60c4 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -576,6 +576,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); }