From 9117b593fc4552b6140e9c51594a4289584df99c Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 5 Feb 2018 19:53:19 +0100 Subject: [PATCH] Suppress the warning if no O2 sensors are present The warning about disabling the O2 sensors due to factory default calibration values, applies only if there is at least one calibrated O2 sensor present. This has no effect on the calibration bits, because those are already zero if there are no calibrated O2 sensors present. --- src/shearwater_predator_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c index 62ae5c6..dd9992a 100644 --- a/src/shearwater_predator_parser.c +++ b/src/shearwater_predator_parser.c @@ -326,7 +326,7 @@ shearwater_predator_parser_cache (shearwater_predator_parser_t *parser) nsensors++; } } - if (nsensors == ndefaults) { + if (nsensors && nsensors == ndefaults) { // If all (calibrated) sensors still have their factory default // calibration values (2100), they are probably not calibrated // properly. To avoid returning incorrect ppO2 values to the