Use the correct model number from the final block
During the download, the model number is obtained from the hardware type because the model number isn't available before downloading the first dive. Since the list with available hardware types is incomplete, the correct model number is not always available. However, during parsing the correct model number is available in the final block.
This commit is contained in:
parent
ccd37d4fa3
commit
d1242a28cf
@ -524,6 +524,11 @@ shearwater_predator_parser_cache (shearwater_predator_parser_t *parser)
|
||||
divemode = data[parser->opening[4] + (pnf ? 1 : 112)];
|
||||
}
|
||||
|
||||
// Get the correct model number from the final block.
|
||||
if (parser->final != UNDEFINED) {
|
||||
parser->model = data[parser->final + 13];
|
||||
}
|
||||
|
||||
// Cache the data for later use.
|
||||
parser->pnf = pnf;
|
||||
parser->logversion = logversion;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user