diff --git a/src/AgConfigure.cpp b/src/AgConfigure.cpp index 5425355a..4469006e 100644 --- a/src/AgConfigure.cpp +++ b/src/AgConfigure.cpp @@ -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; diff --git a/src/AgStateMachine.cpp b/src/AgStateMachine.cpp index b45c4155..27c2ce10 100644 --- a/src/AgStateMachine.cpp +++ b/src/AgStateMachine.cpp @@ -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 (" +