Skip to content

Commit 833fb33

Browse files
authored
Merge pull request mysensors#39 from mhansen/patch-1
Bugfix: COMPARE_BARO and COMPARE_HUM were unused.
2 parents f3dccf8 + bc6d6e4 commit 833fb33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/PressureSensor/PressureSensor.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void loop() {
243243
}
244244

245245
// Send humidity
246-
if (COMPARE_TEMP == 1 && abs(humidity - lastHumidity) < humThreshold) { // is the humidity difference bigger than the threshold?
246+
if (COMPARE_HUM == 1 && abs(humidity - lastHumidity) < humThreshold) { // is the humidity difference bigger than the threshold?
247247
Serial.print(humidity - lastHumidity);
248248
Serial.println("- BME280 - Humidity difference too small, so not sending the new measurement to the gateway.");
249249
} else {
@@ -253,7 +253,7 @@ void loop() {
253253
}
254254

255255
// Send pressure
256-
if (COMPARE_TEMP == 1 && abs(pressure - lastPressure) < presThreshold) { // is the pressure difference bigger than the threshold?
256+
if (COMPARE_BARO == 1 && abs(pressure - lastPressure) < presThreshold) { // is the pressure difference bigger than the threshold?
257257
Serial.print(pressure - lastPressure);
258258
Serial.println("- BME280 - Pressure difference too small, so not sending the new measurement to the gateway.");
259259
} else {

0 commit comments

Comments
 (0)