Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Phat Nguyen
2024-03-10 08:27:40 +07:00
2 changed files with 12 additions and 12 deletions

View File

@@ -740,7 +740,7 @@ void setup() {
/** Show boot display */ /** Show boot display */
Serial.println("Firmware Version: " + ag.getVersion()); Serial.println("Firmware Version: " + ag.getVersion());
displayShowText("One V9", "FW Ver: " + ag.getVersion(), ""); displayShowText("AirGradient ONE", "FW Version: ", ag.getVersion());
delay(DISPLAY_DELAY_SHOW_CONTENT_MS); delay(DISPLAY_DELAY_SHOW_CONTENT_MS);
/** Init sensor */ /** Init sensor */
@@ -1490,7 +1490,7 @@ static void connectToWifi() {
ledSmState = APP_SM_WIFI_MANAGER_STA_CONNECTING; ledSmState = APP_SM_WIFI_MANAGER_STA_CONNECTING;
}); });
displayShowText("Connecting to", "config WiFi", "..."); displayShowText("Connecting to", "WiFi", "...");
wifiManager.autoConnect(wifiSSID.c_str(), WIFI_HOTSPOT_PASSWORD_DEFAULT); wifiManager.autoConnect(wifiSSID.c_str(), WIFI_HOTSPOT_PASSWORD_DEFAULT);
xTaskCreate( xTaskCreate(
[](void *obj) { [](void *obj) {
@@ -1768,18 +1768,18 @@ static void updateServerConfiguration(void) {
if (agServer.getCo2AbcDaysConfig() > 0) { if (agServer.getCo2AbcDaysConfig() > 0) {
if (hasSensorS8) { if (hasSensorS8) {
int newHour = agServer.getCo2AbcDaysConfig() * 24; int newHour = agServer.getCo2AbcDaysConfig() * 24;
Serial.printf("abcDays config: %d days(%d hours)\r\n", Serial.printf("Requested abcDays setting: %d days (%d hours)\r\n",
agServer.getCo2AbcDaysConfig(), newHour); agServer.getCo2AbcDaysConfig(), newHour);
int curHour = ag.s8.getAbcPeriod(); int curHour = ag.s8.getAbcPeriod();
Serial.printf("Current config: %d (hours)\r\n", curHour); Serial.printf("Current S8 abcDays setting: %d (hours)\r\n", curHour);
if (curHour == newHour) { if (curHour == newHour) {
Serial.println("Set 'abcDays' ignored"); Serial.println("'abcDays' unchanged");
} else { } else {
if (ag.s8.setAbcPeriod(agServer.getCo2AbcDaysConfig() * 24) == if (ag.s8.setAbcPeriod(agServer.getCo2AbcDaysConfig() * 24) ==
false) { false) {
Serial.println("Set S8 abcDays period calibration failed"); Serial.println("Set S8 abcDays period failed");
} else { } else {
Serial.println("Set S8 abcDays period calibration success"); Serial.println("Set S8 abcDays period success");
} }
} }
} else { } else {

View File

@@ -1234,18 +1234,18 @@ static void updateServerConfiguration(void) {
if (agServer.getCo2AbcDaysConfig() > 0) { if (agServer.getCo2AbcDaysConfig() > 0) {
if (hasSensorS8) { if (hasSensorS8) {
int newHour = agServer.getCo2AbcDaysConfig() * 24; int newHour = agServer.getCo2AbcDaysConfig() * 24;
Serial.printf("abcDays config: %d days(%d hours)\r\n", Serial.printf("Requested abcDays setting: %d days (%d hours)\r\n",
agServer.getCo2AbcDaysConfig(), newHour); agServer.getCo2AbcDaysConfig(), newHour);
int curHour = ag.s8.getAbcPeriod(); int curHour = ag.s8.getAbcPeriod();
Serial.printf("Current config: %d (hours)\r\n", curHour); Serial.printf("Current S8 abcDays setting: %d (hours)\r\n", curHour);
if (curHour == newHour) { if (curHour == newHour) {
Serial.println("Set 'abcDays' ignored"); Serial.println("'abcDays' unchanged");
} else { } else {
if (ag.s8.setAbcPeriod(agServer.getCo2AbcDaysConfig() * 24) == if (ag.s8.setAbcPeriod(agServer.getCo2AbcDaysConfig() * 24) ==
false) { false) {
Serial.println("Set S8 abcDays period calibration failed"); Serial.println("Set S8 abcDays period failed");
} else { } else {
Serial.println("Set S8 abcDays period calibration success"); Serial.println("Set S8 abcDays period success");
} }
} }
} }