Skip to content

Commit bc6d6e4

Browse files
authored
Bugfix: COMPARE_BARO and COMPARE_HUM were unused.
All if-statements were just using COMPARE_TEMP.
1 parent cedd69d commit bc6d6e4

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)