mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 17:13:23 +00:00
Improve accuracy of the 'unlikely dive gas' warning.
Change the values supplied in the warning to be fractions. This is what is actually reported by libdivecomputer. The currently used thousandths are hard to interpret for users, as they are only used internally in Subsurface. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
a1a834568a
commit
b4af03751d
1 changed files with 2 additions and 2 deletions
|
@ -135,14 +135,14 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
|
|||
if (o2 + he <= O2_IN_AIR || o2 > 1000) {
|
||||
if (!shown_warning) {
|
||||
shown_warning = true;
|
||||
report_error("unlikely dive gas data from libdivecomputer: o2 = %d he = %d", o2, he);
|
||||
report_error("unlikely dive gas data from libdivecomputer: o2 = %.3f he = %.3f", gasmix.oxygen, gasmix.helium);
|
||||
}
|
||||
o2 = 0;
|
||||
}
|
||||
if (he < 0 || o2 + he > 1000) {
|
||||
if (!shown_warning) {
|
||||
shown_warning = true;
|
||||
report_error("unlikely dive gas data from libdivecomputer: o2 = %d he = %d", o2, he);
|
||||
report_error("unlikely dive gas data from libdivecomputer: o2 = %.3f he = %.3f", gasmix.oxygen, gasmix.helium);
|
||||
}
|
||||
he = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue