From b4af03751dbb9492c70e84f83a6c7f117a8fb1e3 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Thu, 9 Feb 2023 20:19:38 +1300 Subject: [PATCH] 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 --- core/libdivecomputer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index baa250c5d..1769f3de9 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -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; }