Apply pm correction to display and led bar

This commit is contained in:
samuelbles07
2024-11-02 14:44:32 +07:00
parent 5867d0f1d5
commit 7b0381dea3
4 changed files with 51 additions and 8 deletions
+2 -2
View File
@@ -142,8 +142,8 @@ void StateMachine::co2handleLeds(void) {
*/
void StateMachine::pm25handleLeds(void) {
int pm25Value = value.get(Measurements::PM25);
if (config.isMonitorDisplayCompensatedValues() && config.hasSensorSHT) {
pm25Value = ag->pms5003.compensate(pm25Value, value.getFloat(Measurements::Humidity));
if (config.hasSensorSHT && config.isPMCorrectionEnabled()) {
pm25Value = (int)value.getCorrectedPM25(*ag, config);
}
if (pm25Value < 5) {