[PATCH 2/3] Suunto EON Steel: initialize the tank 'gasmix' index
Linus Torvalds
torvalds at linux-foundation.org
Mon Aug 29 15:34:19 PDT 2016
From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Mon, 29 Aug 2016 15:03:02 -0700
Subject: [PATCH 2/3] Suunto EON Steel: initialize the tank 'gasmix' index
The gasmix query interface considers cylinders and gas mixes independent
things, so the tank data structure has a pointer to the gasmix index.
But the EON Steel treats cylinders as just having a gasmix (and so does
subsurface, for that matter), so the gasmix index for the tank is just
the same as the tank index.
But we never filled it in, so you'd always see a "gas index" of zero,
and subsurface would end up warning each time about how the gasmix index
doesn't match the cylinder index (but because subsurface actually agreed
with EON Steel, it worked despite the warning).
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
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 bba26ef71fda..8a7d3d15cbc8 100644
--- a/src/suunto_eonsteel_parser.c
+++ b/src/suunto_eonsteel_parser.c
@@ -1034,6 +1034,7 @@ suunto_eonsteel_parser_get_field(dc_parser_t *parser, dc_field_type_t type, unsi
* that metric is (at least so far) always whole liters
*/
tank->volume = eon->cache.tanksize[flags];
+ tank->gasmix = flags;
/*
* The pressure reported is NOT the pressure the user enters.
--
2.10.0.rc0.2.g0a9fa47
More information about the devel
mailing list