We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5d2ac2 commit eadb75fCopy full SHA for eadb75f
src/hackair.cpp
@@ -178,3 +178,8 @@ void hackAIR::turnOff() {
178
#endif
179
}
180
181
+
182
+void humidityCompensation(hackAirData &data, float humidity) {
183
+ data.pm25 = data.pm25 / (3.72f * (1 + 7 * (humidity / 100.0f)));
184
+ data.pm10 = data.pm10 / (3.72f * (1 + 7 * (humidity / 100.0f)));
185
+}
src/hackair.h
@@ -90,6 +90,11 @@ class hackAIR {
90
*/
91
void turnOff();
92
93
+ /**
94
+ * Compensates the measurements for the given humidity
95
+ */
96
+ void humidityCompensation(hackAirData &data, float humidity);
97
98
private:
99
int _sensorType;
100
long _lastTime;
0 commit comments