mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 00:47:17 +02:00
Validate raw pm before correction
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user