Correct LED bar show PM value use compensate

This commit is contained in:
Phat Nguyen
2024-09-17 10:15:47 +07:00
parent 335c29ebb1
commit 507b958fdf

View File

@ -141,7 +141,7 @@ void StateMachine::co2handleLeds(void) {
* *
*/ */
void StateMachine::pm25handleLeds(void) { void StateMachine::pm25handleLeds(void) {
int pm25Value = value.pm25_1; int pm25Value = ag->pms5003.compensate(value.pm25_1, value.Humidity);
if (pm25Value < 5) { if (pm25Value < 5) {
/** G; 1 */ /** G; 1 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1); ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);