From c74118a922c6cc846ae944cd718e7809f54b7b5e Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Wed, 26 Mar 2014 15:42:44 +0100 Subject: [PATCH] Fix the initial gas mix for the D4i, D6i and D9tx. The initial gas mix index has been confirmed for the D6i only. For the other two models, it's an educated guess that the byte offset will be identical. --- src/suunto_d9_parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/suunto_d9_parser.c b/src/suunto_d9_parser.c index e3b97f4..4527d64 100644 --- a/src/suunto_d9_parser.c +++ b/src/suunto_d9_parser.c @@ -339,6 +339,9 @@ suunto_d9_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t ca unsigned int gasmix = 0; if (parser->model == HELO2) { gasmix = data[0x26]; + } else if (parser->model == D4i || parser->model == D6i || + parser->model == D9tx) { + gasmix = data[0x28]; } if (gasmix >= parser->ngasmixes) { ERROR (abstract->context, "Invalid initial gas mix.");