Add AirGradient and Configuration object to AgValue

This commit is contained in:
samuelbles07
2025-01-23 03:33:47 +07:00
parent 89475ddf95
commit 1666923ab3
7 changed files with 204 additions and 204 deletions

View File

@@ -316,7 +316,7 @@ void OledDisplay::showDashboard(const char *status) {
int pm25 = round(value.getAverage(Measurements::PM25));
if (utils::isValidPm(pm25)) {
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25 = round(value.getCorrectedPM25(*ag, config, true));
pm25 = round(value.getCorrectedPM25(true));
}
if (config.isPmStandardInUSAQI()) {
sprintf(strBuf, "%d", ag->pms5003.convertPm25ToUsAqi(pm25));
@@ -377,7 +377,7 @@ void OledDisplay::showDashboard(const char *status) {
/** Set PM */
int pm25 = round(value.getAverage(Measurements::PM25));
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25 = round(value.getCorrectedPM25(*ag, config, true));
pm25 = round(value.getCorrectedPM25(true));
}
ag->display.setCursor(0, 12);