Other related class use new AgValue structure

This commit is contained in:
samuelbles07
2024-10-19 01:35:36 +07:00
parent 2e4f4643fa
commit 399b4ca1dc
4 changed files with 69 additions and 54 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ void StateMachine::sensorhandleLeds(void) {
*
*/
void StateMachine::co2handleLeds(void) {
int co2Value = value.CO2;
int co2Value = value.get(Measurements::CO2, false);
if (co2Value <= 600) {
/** G; 1 */
ag->ledBar.setColor(RGB_COLOR_G, ag->ledBar.getNumberOfLeds() - 1);
@@ -141,9 +141,9 @@ void StateMachine::co2handleLeds(void) {
*
*/
void StateMachine::pm25handleLeds(void) {
int pm25Value = value.pm25_1;
int pm25Value = value.get(Measurements::PM25, false);
if (config.isMonitorDisplayCompensatedValues() && config.hasSensorSHT) {
pm25Value = ag->pms5003.compensate(value.pm25_1, value.Humidity);
pm25Value = ag->pms5003.compensate(pm25Value, value.getFloat(Measurements::Humidity, false));
}
if (pm25Value < 5) {