Fix the ndl/deco and rbt samples

The Air Time Remaining (ATR) and Dive Time Remaining (DTR) fields have
been swapped.
This commit is contained in:
Jef Driesen 2017-01-30 20:50:26 +01:00
parent ae954af768
commit 9cb6856bfb

View File

@ -945,14 +945,10 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
decotime = array_uint16_le(data + offset + 6);
have_deco = 1;
} else if (parser->model == ATOM31 || parser->model == VISION ||
parser->model == XPAIR) {
parser->model == XPAIR || parser->model == I550T) {
decostop = (data[offset + 5] & 0xF0) >> 4;
decotime = array_uint16_le(data + offset + 4) & 0x03FF;
have_deco = 1;
} else if (parser->model == I550T) {
decostop = (data[offset + 7] & 0xF0) >> 4;
decotime = array_uint16_le(data + offset + 6) & 0x03FF;
have_deco = 1;
}
if (have_deco) {
if (decostop) {
@ -974,10 +970,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
} else if (parser->model == I450T) {
rbt = array_uint16_le(data + offset + 8) & 0x01FF;
have_rbt = 1;
} else if (parser->model == I550T) {
rbt = array_uint16_le(data + offset + 4) & 0x03FF;
have_rbt = 1;
} else if (parser->model == VISION || parser->model == XPAIR) {
} else if (parser->model == VISION || parser->model == XPAIR ||
parser->model == I550T) {
rbt = array_uint16_le(data + offset + 6) & 0x03FF;
have_rbt = 1;
}