Fix the gas mixes for the Aeris A300AI.

The Aeris A300AI supports 4 instead of 3 gas mixes. The offset where the
gas mixes are stored was wrong too.
This commit is contained in:
Janice McLaughlin 2014-10-28 09:14:25 +01:00 committed by Jef Driesen
parent 1d2ebd7af1
commit 69fec57ed7

View File

@ -321,7 +321,8 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns
// Get the offset to the header and footer sample.
unsigned int header = headersize - PAGESIZE / 2;
unsigned int footer = size - footersize;
if (parser->model == VT4 || parser->model == VT41) {
if (parser->model == VT4 || parser->model == VT41 ||
parser->model == A300AI) {
header = 3 * PAGESIZE;
}
@ -361,7 +362,7 @@ oceanic_atom2_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, uns
if (parser->model == DATAMASK || parser->model == COMPUMASK) {
*((unsigned int *) value) = 1;
} else if (parser->model == VT4 || parser->model == VT41 ||
parser->model == OCI) {
parser->model == OCI || parser->model == A300AI) {
*((unsigned int *) value) = 4;
} else if (parser->model == TX1) {
*((unsigned int *) value) = 6;
@ -456,7 +457,8 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_
// Get the offset to the header sample.
unsigned int header = headersize - PAGESIZE / 2;
if (parser->model == VT4 || parser->model == VT41) {
if (parser->model == VT4 || parser->model == VT41 ||
parser->model == A300AI) {
header = 3 * PAGESIZE;
}