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

calibrate! was broken

parent a60fc29f
Pipeline #3591 passed with stage
in 1 minute and 44 seconds
......@@ -201,7 +201,7 @@ namespace sensor {
Serial.print(F("Setting SCD30 timestep to "));
Serial.print(config::measurement_timestep);
Serial.println(F(" s."));
if (config::measurement_timestep < 10){
if (config::measurement_timestep < 10) {
Serial.println(F("WARNING: Timesteps shorter than 10s can lead to unreliable measurements!"));
}
scd30.setMeasurementInterval(config::measurement_timestep); // [s]
......@@ -322,7 +322,12 @@ namespace sensor {
}
void calibrateSensorRightNow(int32_t calibrationLevel) {
stable_measurements = config::stable_measurements_before_calibration;
calibrateSensorToSpecificPPM(calibrationLevel);
if (calibrationLevel >= 400 && calibrationLevel <= 2000) {
Serial.print(F("Force calibration, right now, at "));
config::co2_calibration_level = calibrationLevel;
Serial.print(config::co2_calibration_level);
Serial.println(F(" ppm."));
calibrateAndRestart();
}
}
}
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