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 <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2015-01-03 17:09:45 -08:00 committed by Dirk Hohndel
parent fe2448e34f
commit f0e695b089

View File

@ -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);
}