get value function consume

This commit is contained in:
samuelbles07
2024-10-20 22:30:49 +07:00
parent 43ca0a2c2e
commit f478dd16c8
4 changed files with 50 additions and 54 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ void StateMachine::sensorhandleLeds(void) {
*
*/
void StateMachine::co2handleLeds(void) {
int co2Value = value.get(Measurements::CO2, false);
int co2Value = value.get(Measurements::CO2);
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.get(Measurements::PM25, false);
int pm25Value = value.get(Measurements::PM25);
if (config.isMonitorDisplayCompensatedValues() && config.hasSensorSHT) {
pm25Value = ag->pms5003.compensate(pm25Value, value.getFloat(Measurements::Humidity, false));
pm25Value = ag->pms5003.compensate(pm25Value, value.getFloat(Measurements::Humidity));
}
if (pm25Value < 5) {