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.
This commit is contained in:
Jef Driesen 2018-02-05 19:53:19 +01:00
parent 85eef19f8f
commit 9117b593fc

View File

@ -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