diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-06-13 10:36:38 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-06-13 15:55:35 -0700 |
commit | 23e88391824385bf26e80ae570e52cca32738164 (patch) | |
tree | 03d271ef1d6df4edd1a2040d66db06e70daf7415 /core | |
parent | 56c6cd06c9ebc67e6c2d230e7283582e5b4c52e2 (diff) | |
download | subsurface-23e88391824385bf26e80ae570e52cca32738164.tar.gz |
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>
Diffstat (limited to 'core')
-rw-r--r-- | core/libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index f2bc9df41..a99d15ae8 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -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); } |