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

Comment: Do not reset after calibration!

parent fbbb8e5d
Pipeline #4020 passed with stage
in 1 minute and 52 seconds
......@@ -158,12 +158,14 @@ namespace sensor {
switchState(PREPARE_CALIBRATION_UNSTABLE);
}
void calibrateAndRestart() {
void calibrate() {
Serial.print(F("Calibrating SCD30 now..."));
scd30.setAltitudeCompensation(config::altitude_above_sea_level);
scd30.setForcedRecalibrationFactor(config::co2_calibration_level);
Serial.println(F(" Done!"));
Serial.println(F("Sensor calibrated."));
//WARNING: Do not reset the ampel or the SCD30!
//At least one measurement needs to happen in order for the calibration to be correctly applied.
}
void logToSerial() {
......@@ -209,7 +211,7 @@ namespace sensor {
// leave them before calibration is done.
bool ready_for_calibration = countStableMeasurements();
if (ready_for_calibration) {
calibrateAndRestart();
calibrate();
}
} else if (co2 < 250) {
// Sensor should be calibrated.
......@@ -325,7 +327,7 @@ namespace sensor {
config::co2_calibration_level = calibrationLevel;
Serial.print(config::co2_calibration_level);
Serial.println(F(" ppm."));
calibrateAndRestart();
calibrate();
}
}
......
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