Commit c6139baf authored by Käppler's avatar Käppler
Browse files

co2_sensor: Drop unused state 'CALIBRATION'

parent fe023428
......@@ -36,7 +36,6 @@ namespace sensor {
* INVALID -> sensor does output invalid CO2 measurements (== 0 ppm)
* NEEDS_CALIBRATION -> sensor measurements are too low (< 250 ppm)
* PREPARE_CALIBRATION -> forced calibration was initiated, waiting for stable measurements
* CALIBRATION -> the sensor does calibrate itself
*/
enum state {
INITIAL,
......@@ -45,8 +44,7 @@ namespace sensor {
INVALID,
NEEDS_CALIBRATION,
PREPARE_CALIBRATION_UNSTABLE,
PREPARE_CALIBRATION_STABLE,
CALIBRATION
PREPARE_CALIBRATION_STABLE
};
const char *state_names[] = {
"INITIAL",
......@@ -55,8 +53,7 @@ namespace sensor {
"INVALID",
"NEEDS_CALIBRATION",
"PREPARE_CALIBRATION_UNSTABLE",
"PREPARE_CALIBRATION_STABLE",
"CALIBRATION" };
"PREPARE_CALIBRATION_STABLE" };
state current_state = INITIAL;
void switchState(state);
......@@ -172,7 +169,6 @@ namespace sensor {
}
void calibrateAndRestart() {
switchState(CALIBRATION);
Serial.print(F("Calibrating SCD30 now..."));
scd30.setAltitudeCompensation(config::altitude_above_sea_level);
scd30.setForcedRecalibrationFactor(config::co2_calibration_level);
......@@ -269,8 +265,6 @@ namespace sensor {
case PREPARE_CALIBRATION_STABLE:
led_effects::showWaitingLED(color::green);
break;
case CALIBRATION: // Nothing to do, will restart soon.
break;
default:
Serial.println(F("Encountered unknown sensor state")); // This should not happen.
}
......
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