forked from airgradienthq/arduino
add atmp_compensated and rhum_compensated to sync data
This commit is contained in:
1 parent
25ef1ced9e
commit
e1115659e2
4 files changed
+44
-2
No files matched your search
@@ -201,3 +201,19 @@ void PMS5003T::handle(void) { pms.handle(); }
|
||||
* @return false Communication timeout or sensor has removed
|
||||
*/
|
||||
bool PMS5003T::isFailed(void) { return pms.isFailed(); }
|
||||
|
||||
float PMS5003T::temperatureCompensated(float temp) {
|
||||
if (temp < 10.0f) {
|
||||
return temp * 1.327f - 6.738f;
|
||||
}
|
||||
return temp * 1.181f - 5.113f;
|
||||
}
|
||||
|
||||
float PMS5003T::humidityCompensated(float hum) {
|
||||
hum = hum * 1.259f + 7.34f;
|
||||
|
||||
if (hum > 100.0f) {
|
||||
hum = 100.0f;
|
||||
}
|
||||
return hum;
|
||||
}
|
||||
Reference in new issue
Block a user