mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-23 13:37:16 +02:00
Better server configure for abcDays
debug message
This commit is contained in:
@ -774,7 +774,7 @@ void webServerMeasureCurrentGet(void) {
|
||||
webServer.send(200, "application/json", getServerSyncData());
|
||||
}
|
||||
|
||||
void webServerHandler(void* param) {
|
||||
void webServerHandler(void *param) {
|
||||
for (;;) {
|
||||
webServer.handleClient();
|
||||
}
|
||||
@ -1269,17 +1269,24 @@ static void serverConfigPoll(void) {
|
||||
if (agServer.isCo2Calib()) {
|
||||
co2Calibration();
|
||||
}
|
||||
|
||||
if (agServer.getCo2AbcDaysConfig() > 0) {
|
||||
int newHour = agServer.getCo2AbcDaysConfig() * 24;
|
||||
Serial.printf("abcDays config: %d days(%d hours)\r\n",
|
||||
agServer.getCo2AbcDaysConfig(),
|
||||
agServer.getCo2AbcDaysConfig() * 24);
|
||||
agServer.getCo2AbcDaysConfig(), newHour);
|
||||
int curHour = ag.s8.getAbcPeriod();
|
||||
Serial.printf("Current config: %d (hours)\r\n", ag.s8.getAbcPeriod());
|
||||
if (ag.s8.setAbcPeriod(agServer.getCo2AbcDaysConfig() * 24) == false) {
|
||||
Serial.println("Set S8 abcDays period calib failed");
|
||||
if (curHour == newHour) {
|
||||
Serial.println("set 'abcDays' ignored");
|
||||
} else {
|
||||
Serial.println("Set S8 abcDays period calib success");
|
||||
if (ag.s8.setAbcPeriod(agServer.getCo2AbcDaysConfig() * 24) == false) {
|
||||
Serial.println("Set S8 abcDays period calib failed");
|
||||
} else {
|
||||
Serial.println("Set S8 abcDays period calib success");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (agServer.isLedBarTestRequested()) {
|
||||
if (agServer.getCountry() == "TH") {
|
||||
ledTest2Min();
|
||||
|
Reference in New Issue
Block a user