Update show PM compensate value on display and documents

This commit is contained in:
Phat Nguyen
2024-09-21 14:08:42 +07:00
parent 20245f2110
commit 9d01479406
3 changed files with 30 additions and 27 deletions
+5 -1
View File
@@ -141,7 +141,11 @@ void StateMachine::co2handleLeds(void) {
*
*/
void StateMachine::pm25handleLeds(void) {
int pm25Value = ag->pms5003.compensate(value.pm25_1, value.Humidity);
int pm25Value = value.pm25_1;
if (config.isMonitorDisplayCompensatedValues() && config.hasSensorSHT) {
pm25Value = ag->pms5003.compensate(value.pm25_1, value.Humidity);
}
if (pm25Value < 5) {
/** G; 1 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);