download: don't warn on unknown gasmixes

Apparently libdivecomputer can return DC_GASMIX_UNKNOWN when
fetching tank info with
  dc_parser_get_field(parser, DC_FIELD_TANK, i, &tank);
This caused emission of a warning, which was annoying users.
Disable the warning in that case.

Fixes #2866

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-06-13 10:36:38 +02:00 committed by Dirk Hohndel
parent 56c6cd06c9
commit 23e8839182

View file

@ -195,7 +195,7 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
mbar_to_atm(cyl.type.workingpressure.mbar));
}
}
if (tank.gasmix != i) { // we don't handle this, yet
if (tank.gasmix != DC_GASMIX_UNKNOWN && tank.gasmix != i) { // we don't handle this, yet
shown_warning = true;
report_error("gasmix %d for tank %d doesn't match", tank.gasmix, i);
}