Closed pnt325 closed 4 months ago
A few things: Only negative PM values (below 0) need to be ignored. 0..10 are valid readings and should be allowed.
Also, if a value is outside the range, the value should be completely ignored.
So for example Temperature -100 should NOT return -40 but be ignored. This would apply to all checks.
For this way we don't need to correct value in range, just need to verify it's valid or not before use(show on display or sync to cloud).
The correction method will be remove and replace check valid valid method.
bool utils::validTemperature(float value) {
if (value >= VALID_TEMPERATURE_MIN && value <= VALID_TEMPERATURE_MAX) {
return true;
}
return false;
}
@airgradienthq How do you think?
@pnt325 yes I think that's how it should work.
Correct sensor value has out of range #190