Commit dcc33bfa authored by Eric Duminil's avatar Eric Duminil
Browse files

co2_sensor: Replace (if + switch) with switch.

parent ea4f090d
......@@ -204,8 +204,8 @@ namespace sensor {
case BOOTUP:
led_effects::showWaitingLED(color::blue);
break;
// No special signaling, we want to show the CO2 value
case READY:
displayCO2OnLedRing();
break;
case NEEDS_CALIBRATION:
led_effects::showWaitingLED(color::magenta);
......@@ -261,12 +261,7 @@ namespace sensor {
logToSerial();
}
// We need to show LED effects for "old" data, too, as long as we get new data.
if (current_state == READY) {
displayCO2OnLedRing();
} else {
showState();
}
showState();
return freshData;
}
......
Supports Markdown
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