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

MQTT calibrate or calibrate to X PPM

parent 917f78a8
......@@ -86,7 +86,7 @@ namespace mqtt {
LedEffects::showKITTWheel(color::green, 1);
}
void calibrateSensor(String messageString) {
void calibrateSensorToSpecificPPM(String messageString) {
messageString.replace("calibrate ", "");
long int calibrationLevel = messageString.toInt();
if (calibrationLevel >= 400 && calibrationLevel <= 2000) {
......@@ -143,9 +143,10 @@ namespace mqtt {
setCO2forDebugging(messageString);
} else if (messageString.startsWith("timer ")) {
setTimer(messageString);
} else if (messageString == "calibrate") {
sensor::startCalibrationProcess();
} else if (messageString.startsWith("calibrate ")) {
calibrateSensor(messageString);
// config::atmospheric_co2_concentration
calibrateSensorToSpecificPPM(messageString);
} else if (messageString.startsWith("mqtt ")) {
setMQTTinterval(messageString);
} else if (messageString.startsWith("csv ")) {
......
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