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