Validate raw pm before correction

This commit is contained in:
samuelbles07 committed 2024-11-02 16:11:47 +07:00
1 parent ade72ff3b8
commit c6961b3ca8
1 file changed
+3 -4
+3 -4
View File
@@ -314,11 +314,10 @@ void OledDisplay::showDashboard(const char *status) {
/** Draw PM2.5 value */
int pm25 = value.get(Measurements::PM25);
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25 = (int)value.getCorrectedPM25(*ag, config);
}
if (utils::isValidPm(pm25)) {
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25 = (int)value.getCorrectedPM25(*ag, config);
}
if (config.isPmStandardInUSAQI()) {
sprintf(strBuf, "%d", ag->pms5003.convertPm25ToUsAqi(pm25));
} else {