mirror of
https://github.com/airgradienthq/arduino.git
synced 2026-04-29 10:23:19 +02:00
update CO2CalibrationAbcDays
This commit is contained in:
+2
-4
@@ -126,7 +126,7 @@ void Configuration::defaultConfig(void) {
|
||||
config.postDataToAirGradient = true;
|
||||
config.displayMode = true;
|
||||
config.useRGBLedBar = LedBarMode::LedBarModeCO2;
|
||||
config.abcDays = 7;
|
||||
config.abcDays = 8;
|
||||
config.tvocLearningOffset = 12;
|
||||
config.noxLearningOffset = 12;
|
||||
config.temperatureUnit = 'c';
|
||||
@@ -382,9 +382,7 @@ bool Configuration::parse(String data, bool isLocal) {
|
||||
if (JSON.typeof_(root["abcDays"]) == "number") {
|
||||
int abcDays = root["abcDays"];
|
||||
if (abcDays <= 0) {
|
||||
failedMessage = jsonTypeInvalidMessage("abcDaysabcDays", String(abcDays));
|
||||
jsonInvalid();
|
||||
return false;
|
||||
abcDays = 0;
|
||||
}
|
||||
if (abcDays != config.abcDays) {
|
||||
config.abcDays = abcDays;
|
||||
|
||||
@@ -276,7 +276,7 @@ void StateMachine::co2Calibration(void) {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.getCO2CalibrationAbcDays() > 0 && config.hasSensorS8) {
|
||||
if (config.getCO2CalibrationAbcDays() >= 0 && config.hasSensorS8) {
|
||||
int newHour = config.getCO2CalibrationAbcDays() * 24;
|
||||
logInfo("Requested abcDays setting: " +
|
||||
String(config.getCO2CalibrationAbcDays()) + "days (" +
|
||||
|
||||
Reference in New Issue
Block a user