Commit 9f3c1eb6 authored by Eric Duminil's avatar Eric Duminil
Browse files

co2_sensor: co2 is unsigned, so cannot be negative

parent 7c772e66
......@@ -235,10 +235,10 @@ namespace sensor {
temperature = scd30.getTemperature();
humidity = scd30.getHumidity();
if (co2 <= 0) {
if (co2 == 0) {
// NOTE: Data is available, but it's sometimes erroneous: the sensor outputs
// zero ppm but non-zero temperature and non-zero humidity.
Serial.println(F("Invalid sensor data - CO2 concentration <= 0 ppm"));
Serial.println(F("Invalid sensor data - CO2 concentration supposedly 0 ppm"));
switchState(BOOTUP);
} else if ((current_state == PREPARE_CALIBRATION_UNSTABLE) || (current_state == PREPARE_CALIBRATION_STABLE)) {
// Check for pre-calibration states first, because we do not want to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment