Fix the gas mix parsing.

The Suunto D9tx stores the gas mix definitions at a different offset
compared to the D4i and D6i.
This commit is contained in:
Jef Driesen 2012-09-21 19:28:48 +02:00
parent 2487167778
commit 136f1d1fe1

View File

@ -219,7 +219,10 @@ suunto_d9_parser_get_field (parser_t *abstract, parser_field_type_t type, unsign
if (parser->model == HELO2) {
gasmix->helium = data[0x58 - SKIP + 6 * flags + 2] / 100.0;
gasmix->oxygen = data[0x58 - SKIP + 6 * flags + 1] / 100.0;
} else if (parser->model == D4i || parser->model == D6i || parser->model == D9tx) {
} else if (parser->model == D9tx) {
gasmix->helium = data[0x87 + 6 * flags + 2] / 100.0;
gasmix->oxygen = data[0x87 + 6 * flags + 1] / 100.0;
} else if (parser->model == D4i || parser->model == D6i) {
gasmix->helium = data[0x5F + 6 * flags + 2] / 100.0;
gasmix->oxygen = data[0x5F + 6 * flags + 1] / 100.0;
} else {