Rename temperatureCompensated to compensateTemp and humidityCompensated to compensateHum

This commit is contained in:
Phat Nguyen
2024-08-30 19:17:58 +07:00
parent d39e10908d
commit 28d27ee8fd
5 changed files with 24 additions and 24 deletions

View File

@ -4,14 +4,14 @@ PMS5003TBase::PMS5003TBase() {}
PMS5003TBase::~PMS5003TBase() {}
float PMS5003TBase::temperatureCompensated(float temp) {
float PMS5003TBase::compensateTemp(float temp) {
if (temp < 10.0f) {
return temp * 1.327f - 6.738f;
}
return temp * 1.181f - 5.113f;
}
float PMS5003TBase::humidityCompensated(float hum) {
float PMS5003TBase::compensateHum(float hum) {
hum = hum * 1.259f + 7.34f;
if (hum > 100.0f) {